知乎專欄 | 多維度架構 | | | 微信號 netkiller-ebook | | | QQ群:128659835 請註明“讀者” |
目錄
安裝 jre
[root@localhost ~]# dnf install java-latest-openjdk
安裝 jdk
[root@localhost ~]# dnf install java-latest-openjdk-devel
預設是 jdk1.8,使用 alternatives 切換 java 預設版本為 java 14
[root@localhost ~]# java -version openjdk version "1.8.0_262" OpenJDK Runtime Environment (build 1.8.0_262-b10) OpenJDK 64-Bit Server VM (build 25.262-b10, mixed mode) [root@localhost ~]# alternatives --config java There are 2 programs which provide 'java'. Selection Command ----------------------------------------------- 1 java-latest-openjdk.x86_64 (/usr/lib/jvm/java-14-openjdk-14.0.2.12-1.rolling.el8.x86_64/bin/java) *+ 2 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.262.b10-0.el8_2.x86_64/jre/bin/java) Enter to keep the current selection[+], or type selection number: 1 [root@localhost ~]# java -version openjdk version "14.0.2" 2020-07-14 OpenJDK Runtime Environment 20.3 (build 14.0.2+12) OpenJDK 64-Bit Server VM 20.3 (build 14.0.2+12, mixed mode, sharing)
解壓
chmod +x jdk-6u1-linux-i586.bin ./jdk-6u1-linux-i586.bin 輸入"yes"回車 mv jdk1.6.0_01 /usr/local/ ln -s /usr/local/jdk1.6.0_01/ /usr/local/java
/etc/profile.d/java.sh
例 1.1. /etc/profile.d/java.sh
################################################ ### Java environment by neo ################################################ export JAVA_HOME=/usr/local/java export JRE_HOME=/usr/local/java/jre export PATH=$PATH:/usr/local/java/bin:/usr/local/java/jre/bin export CLASSPATH="./:/usr/local/java/lib:/usr/local/java/jre/lib:/usr/local/memcached/api/java" export JAVA_OPTS="-Xms128m -Xmx1024m"
在docker中運行java
neo@MacBook-Pro ~ % docker pull openjdk:12-jdk
docker run -it openjdk:12-jdk /bin/jshell
docker run -it openjdk:12-jdk /bin/bash root@44d1d18351a8:/# java -version
# java -verbose:class hello [Opened /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Object from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.Serializable from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Comparable from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.CharSequence from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.String from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.reflect.AnnotatedElement from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.reflect.GenericDeclaration from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.reflect.Type from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Class from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Cloneable from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ClassLoader from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.System from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Throwable from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Error from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ThreadDeath from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Exception from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.RuntimeException from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.SecurityManager from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.ProtectionDomain from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.AccessControlContext from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.SecureClassLoader from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ReflectiveOperationException from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ClassNotFoundException from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.LinkageError from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.NoClassDefFoundError from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ClassCastException from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ArrayStoreException from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.VirtualMachineError from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.OutOfMemoryError from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.StackOverflowError from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.IllegalMonitorStateException from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ref.Reference from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ref.SoftReference from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ref.WeakReference from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ref.FinalReference from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ref.PhantomReference from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.Cleaner from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ref.Finalizer from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Runnable from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Thread from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Thread$UncaughtExceptionHandler from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ThreadGroup from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Map from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Dictionary from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Hashtable from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Properties from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.reflect.AccessibleObject from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.reflect.Member from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.reflect.Field from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.reflect.Parameter from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.reflect.Executable from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.reflect.Method from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.reflect.Constructor from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.MagicAccessorImpl from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.MethodAccessor from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.MethodAccessorImpl from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.ConstructorAccessor from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.ConstructorAccessorImpl from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.DelegatingClassLoader from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.ConstantPool from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.FieldAccessor from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.FieldAccessorImpl from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.UnsafeFieldAccessorImpl from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.UnsafeStaticFieldAccessorImpl from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.annotation.Annotation from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.CallerSensitive from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.MethodHandle from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.DirectMethodHandle from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.MemberName from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.MethodHandleNatives from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.LambdaForm from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.MethodType from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.BootstrapMethodError from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.CallSite from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.ConstantCallSite from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.MutableCallSite from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.VolatileCallSite from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Appendable from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.AbstractStringBuilder from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.StringBuffer from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.StringBuilder from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.Unsafe from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.AutoCloseable from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.Closeable from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.InputStream from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.ByteArrayInputStream from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.File from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.net.URLClassLoader from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.net.URL from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.jar.Manifest from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.Launcher from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.Launcher$AppClassLoader from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.Launcher$ExtClassLoader from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.CodeSource from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.StackTraceElement from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.Buffer from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Boolean from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Character from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Number from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Float from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Double from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Byte from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Short from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Integer from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Long from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.NullPointerException from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ArithmeticException from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.ObjectStreamField from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Comparator from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.String$CaseInsensitiveComparator from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.Guard from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.Permission from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.BasicPermission from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.RuntimePermission from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.AccessController from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.reflect.ReflectPermission from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.PrivilegedAction from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.ReflectionFactory$GetReflectionFactoryAction from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.cert.Certificate from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Iterable from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Collection from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.List from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.RandomAccess from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.AbstractCollection from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.AbstractList from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Vector from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Stack from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.ReflectionFactory from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ref.Reference$Lock from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ref.Reference$ReferenceHandler from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ref.ReferenceQueue from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ref.ReferenceQueue$Null from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ref.ReferenceQueue$Lock from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ref.Finalizer$FinalizerThread from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Map$Entry from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Hashtable$Entry from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.VM from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Math from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.charset.Charset from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.charset.spi.CharsetProvider from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.cs.FastCharsetProvider from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.cs.StandardCharsets from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.AbstractMap from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.util.PreHashedMap from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.cs.StandardCharsets$Aliases from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.cs.StandardCharsets$Classes from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.cs.StandardCharsets$Cache from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ThreadLocal from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.atomic.AtomicInteger from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.IncompatibleClassChangeError from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.NoSuchMethodError from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.ArrayList from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Collections from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Set from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.AbstractSet from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Collections$EmptySet from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Collections$EmptyList from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Collections$EmptyMap from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Collections$UnmodifiableCollection from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Collections$UnmodifiableList from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Collections$UnmodifiableRandomAccessList from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.Reflection from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.HashMap from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.HashMap$Node from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Class$3 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Class$ReflectionData from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Class$Atomic from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.generics.repository.AbstractRepository from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.generics.repository.GenericDeclRepository from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.generics.repository.ClassRepository from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Class$AnnotationData from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.annotation.AnnotationType from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.WeakHashMap from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ClassValue$ClassValueMap from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.reflect.Modifier from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.LangReflectAccess from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.reflect.ReflectAccess from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Arrays from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.cs.HistoricallyNamedCharset from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.cs.Unicode from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.cs.UTF_8 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Class$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.ReflectionFactory$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.NativeConstructorAccessorImpl from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.DelegatingConstructorAccessorImpl from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.StringCoding from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ThreadLocal$ThreadLocalMap from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ThreadLocal$ThreadLocalMap$Entry from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.StringCoding$StringDecoder from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.cs.ArrayDecoder from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.charset.CharsetDecoder from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.cs.UTF_8$Decoder from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.charset.CodingErrorAction from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Hashtable$EntrySet from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Collections$SynchronizedCollection from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Collections$SynchronizedSet from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Objects from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Enumeration from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Iterator from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Hashtable$Enumerator from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Runtime from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.Version from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.FileInputStream from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.FileDescriptor from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.JavaIOFileDescriptorAccess from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.FileDescriptor$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.SharedSecrets from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.Flushable from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.OutputStream from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.FileOutputStream from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.FilterInputStream from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.BufferedInputStream from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.atomic.AtomicReferenceFieldUpdater from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.PrivilegedExceptionAction from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.reflect.misc.ReflectUtil from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.FilterOutputStream from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.PrintStream from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.BufferedOutputStream from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.Writer from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.OutputStreamWriter from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.cs.StreamEncoder from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.security.action.GetPropertyAction from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.cs.ArrayEncoder from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.charset.CharsetEncoder from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.cs.UTF_8$Encoder from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.ByteBuffer from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.HeapByteBuffer from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.Bits from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.ByteOrder from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.JavaNioAccess from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.Bits$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.BufferedWriter from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.DefaultFileSystem from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.FileSystem from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.UnixFileSystem from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.ExpiringCache from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.LinkedHashMap from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.ExpiringCache$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Enum from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.File$PathStatus from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.file.Watchable from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.file.Path from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.StringCoding$StringEncoder from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ClassLoader$3 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.ExpiringCache$Entry from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.LinkedHashMap$Entry from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ClassLoader$NativeLibrary from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Terminator from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.SignalHandler from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Terminator$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.Signal from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.NativeSignalHandler from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Integer$IntegerCache from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.OSEnvironment from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.JavaLangAccess from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.System$2 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.IllegalArgumentException from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Compiler from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Compiler$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.net.URLStreamHandlerFactory from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.Launcher$Factory from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.security.util.Debug from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ClassLoader$ParallelLoaders from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.WeakHashMap$Entry from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Collections$SetFromMap from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.WeakHashMap$KeySet from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.JavaNetAccess from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.net.URLClassLoader$7 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.StringTokenizer from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.Launcher$ExtClassLoader$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.MetaIndex from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Readable from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.Reader from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.BufferedReader from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.InputStreamReader from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.FileReader from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.cs.StreamDecoder from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.CharBuffer from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.HeapCharBuffer from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.charset.CoderResult from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.charset.CoderResult$Cache from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.charset.CoderResult$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.charset.CoderResult$2 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.reflect.Array from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.HashMap$TreeNode from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.FileInputStream$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.net.www.ParseUtil from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.BitSet from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Locale from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.util.locale.LocaleObjectCache from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Locale$Cache from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.ConcurrentMap from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.ConcurrentHashMap from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.locks.Lock from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.locks.ReentrantLock from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.ConcurrentHashMap$Segment from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.ConcurrentHashMap$Node from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.ConcurrentHashMap$CounterCell from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.ConcurrentHashMap$CollectionView from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.ConcurrentHashMap$KeySetView from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.ConcurrentHashMap$ValuesView from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.ConcurrentHashMap$EntrySetView from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.util.locale.BaseLocale from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.util.locale.BaseLocale$Cache from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.util.locale.BaseLocale$Key from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.util.locale.LocaleObjectCache$CacheEntry from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.Locale$LocaleKey from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.util.locale.LocaleUtils from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.CharacterData from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.CharacterDataLatin1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.net.Parts from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.net.URLStreamHandler from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.net.www.protocol.file.Handler from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.JavaSecurityAccess from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.ProtectionDomain$JavaSecurityAccessImpl from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.JavaSecurityProtectionDomainAccess from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.ProtectionDomain$2 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.ProtectionDomain$Key from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.Principal from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.HashSet from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.URLClassPath from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.net.www.protocol.jar.Handler from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.Launcher$AppClassLoader$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.SystemClassLoaderAction from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.MethodHandleImpl from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.MethodHandleImpl$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.function.Function from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.MethodHandleImpl$2 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.MethodHandleImpl$3 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ClassValue from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.MethodHandleImpl$4 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ClassValue$Entry from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ClassValue$Identity from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.ClassValue$Version from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.MemberName$Factory from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.MethodHandleStatics from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.invoke.MethodHandleStatics$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.PostVMInitHook from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.usagetracker.UsageTrackerClient from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.concurrent.atomic.AtomicBoolean from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.usagetracker.UsageTrackerClient$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.usagetracker.UsageTrackerClient$4 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.usagetracker.UsageTrackerClient$3 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.FileOutputStream$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.launcher.LauncherHelper from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.net.URLClassLoader$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.net.util.URLUtil from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.URLClassPath$3 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.URLClassPath$Loader from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.URLClassPath$JarLoader from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.zip.ZipConstants from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.zip.ZipFile from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.JavaUtilZipFileAccess from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.util.zip.ZipFile$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.URLClassPath$FileLoader from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.Resource from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.URLClassPath$FileLoader$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.ByteBuffered from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.PerfCounter from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.Perf$GetPerfAction from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.Perf from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.misc.PerfCounter$CoreCounters from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.nio.ch.DirectBuffer from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.MappedByteBuffer from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.DirectByteBuffer from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.LongBuffer from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.nio.DirectLongBufferU from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.PermissionCollection from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.Permissions from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.net.URLConnection from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.net.www.URLConnection from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.net.www.protocol.file.FileURLConnection from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded sun.net.www.MessageHeader from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.FilePermission from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.FilePermission$1 from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.io.FilePermissionCollection from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.AllPermission from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.UnresolvedPermission from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.security.BasicPermissionCollection from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded hello from file:/root/java/] [Loaded sun.launcher.LauncherHelper$FXHelper from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Class$MethodArray from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Void from /srv/jdk1.8.0_60/jre/lib/rt.jar] Hello [Loaded java.lang.Shutdown from /srv/jdk1.8.0_60/jre/lib/rt.jar] [Loaded java.lang.Shutdown$Lock from /srv/jdk1.8.0_60/jre/lib/rt.jar]
$ java -version java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
neo@MacBook-Pro ~ % java --list-modules java.activation@10.0.1 java.base@10.0.1 java.compiler@10.0.1 java.corba@10.0.1 java.datatransfer@10.0.1 java.desktop@10.0.1 java.instrument@10.0.1 java.jnlp@10.0.1 java.logging@10.0.1 java.management@10.0.1 java.management.rmi@10.0.1 java.naming@10.0.1 java.prefs@10.0.1 java.rmi@10.0.1 java.scripting@10.0.1 java.se@10.0.1 java.se.ee@10.0.1 java.security.jgss@10.0.1 java.security.sasl@10.0.1 java.smartcardio@10.0.1 java.sql@10.0.1 java.sql.rowset@10.0.1 java.transaction@10.0.1 java.xml@10.0.1 java.xml.bind@10.0.1 java.xml.crypto@10.0.1 java.xml.ws@10.0.1 java.xml.ws.annotation@10.0.1 javafx.base@10.0.1 javafx.controls@10.0.1 javafx.deploy@10.0.1 javafx.fxml@10.0.1 javafx.graphics@10.0.1 javafx.media@10.0.1 javafx.swing@10.0.1 javafx.web@10.0.1 jdk.accessibility@10.0.1 jdk.aot@10.0.1 jdk.attach@10.0.1 jdk.charsets@10.0.1 jdk.compiler@10.0.1 jdk.crypto.cryptoki@10.0.1 jdk.crypto.ec@10.0.1 jdk.deploy@10.0.1 jdk.deploy.controlpanel@10.0.1 jdk.dynalink@10.0.1 jdk.editpad@10.0.1 jdk.hotspot.agent@10.0.1 jdk.httpserver@10.0.1 jdk.incubator.httpclient@10.0.1 jdk.internal.ed@10.0.1 jdk.internal.jvmstat@10.0.1 jdk.internal.le@10.0.1 jdk.internal.opt@10.0.1 jdk.internal.vm.ci@10.0.1 jdk.internal.vm.compiler@10.0.1 jdk.internal.vm.compiler.management@10.0.1 jdk.jartool@10.0.1 jdk.javadoc@10.0.1 jdk.javaws@10.0.1 jdk.jcmd@10.0.1 jdk.jconsole@10.0.1 jdk.jdeps@10.0.1 jdk.jdi@10.0.1 jdk.jdwp.agent@10.0.1 jdk.jfr@10.0.1 jdk.jlink@10.0.1 jdk.jshell@10.0.1 jdk.jsobject@10.0.1 jdk.jstatd@10.0.1 jdk.localedata@10.0.1 jdk.management@10.0.1 jdk.management.agent@10.0.1 jdk.management.cmm@10.0.1 jdk.management.jfr@10.0.1 jdk.management.resource@10.0.1 jdk.naming.dns@10.0.1 jdk.naming.rmi@10.0.1 jdk.net@10.0.1 jdk.pack@10.0.1 jdk.packager@10.0.1 jdk.packager.services@10.0.1 jdk.plugin@10.0.1 jdk.plugin.server@10.0.1 jdk.rmic@10.0.1 jdk.scripting.nashorn@10.0.1 jdk.scripting.nashorn.shell@10.0.1 jdk.sctp@10.0.1 jdk.security.auth@10.0.1 jdk.security.jgss@10.0.1 jdk.snmp@10.0.1 jdk.unsupported@10.0.1 jdk.xml.bind@10.0.1 jdk.xml.dom@10.0.1 jdk.xml.ws@10.0.1 jdk.zipfs@10.0.1 oracle.desktop@10.0.1 oracle.net@10.0.1
模組所在位置 /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/jmods
cd /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/jmods neo@MacBook-Pro /Library/Java/JavaVirtualMachines/jdk-10.0.1.jdk/Contents/Home/jmods % ll -1 java.activation.jmod java.base.jmod java.compiler.jmod java.corba.jmod java.datatransfer.jmod java.desktop.jmod java.instrument.jmod java.jnlp.jmod java.logging.jmod java.management.jmod java.management.rmi.jmod java.naming.jmod java.prefs.jmod java.rmi.jmod java.scripting.jmod java.se.ee.jmod java.se.jmod java.security.jgss.jmod java.security.sasl.jmod java.smartcardio.jmod java.sql.jmod java.sql.rowset.jmod java.transaction.jmod java.xml.bind.jmod java.xml.crypto.jmod java.xml.jmod java.xml.ws.annotation.jmod java.xml.ws.jmod javafx.base.jmod javafx.controls.jmod javafx.deploy.jmod javafx.fxml.jmod javafx.graphics.jmod javafx.media.jmod javafx.swing.jmod javafx.web.jmod jdk.accessibility.jmod jdk.aot.jmod jdk.attach.jmod jdk.charsets.jmod jdk.compiler.jmod jdk.crypto.cryptoki.jmod jdk.crypto.ec.jmod jdk.deploy.controlpanel.jmod jdk.deploy.jmod jdk.dynalink.jmod jdk.editpad.jmod jdk.hotspot.agent.jmod jdk.httpserver.jmod jdk.incubator.httpclient.jmod jdk.internal.ed.jmod jdk.internal.jvmstat.jmod jdk.internal.le.jmod jdk.internal.opt.jmod jdk.internal.vm.ci.jmod jdk.internal.vm.compiler.jmod jdk.internal.vm.compiler.management.jmod jdk.jartool.jmod jdk.javadoc.jmod jdk.javaws.jmod jdk.jcmd.jmod jdk.jconsole.jmod jdk.jdeps.jmod jdk.jdi.jmod jdk.jdwp.agent.jmod jdk.jfr.jmod jdk.jlink.jmod jdk.jshell.jmod jdk.jsobject.jmod jdk.jstatd.jmod jdk.localedata.jmod jdk.management.agent.jmod jdk.management.cmm.jmod jdk.management.jfr.jmod jdk.management.jmod jdk.management.resource.jmod jdk.naming.dns.jmod jdk.naming.rmi.jmod jdk.net.jmod jdk.pack.jmod jdk.packager.jmod jdk.packager.services.jmod jdk.plugin.jmod jdk.plugin.server.jmod jdk.rmic.jmod jdk.scripting.nashorn.jmod jdk.scripting.nashorn.shell.jmod jdk.sctp.jmod jdk.security.auth.jmod jdk.security.jgss.jmod jdk.snmp.jmod jdk.unsupported.jmod jdk.xml.bind.jmod jdk.xml.dom.jmod jdk.xml.ws.jmod jdk.zipfs.jmod oracle.desktop.jmod oracle.net.jmod
查看包中的檔案列表 jar -tf package.war/package.jar
$ /srv/java/bin/jar -tf mis.netkiller.cn-0.0.1.war |more META-INF/ META-INF/MANIFEST.MF WEB-INF/ WEB-INF/jsp/ WEB-INF/jsp/include/ WEB-INF/jsp/system/ WEB-INF/jsp/banner/
包類依賴分析器
[net@netkiller lib]$ jdeps jersey-client-1.18.1.jar jersey-client-1.18.1.jar -> not found jersey-client-1.18.1.jar -> /usr/java/jdk1.8.0_73/jre/lib/rt.jar com.sun.jersey.api.client (jersey-client-1.18.1.jar) -> com.sun.jersey.api.client.async jersey-client-1.18.1.jar -> com.sun.jersey.api.client.config jersey-client-1.18.1.jar -> com.sun.jersey.api.client.filter jersey-client-1.18.1.jar -> com.sun.jersey.client.impl jersey-client-1.18.1.jar -> com.sun.jersey.client.impl.async jersey-client-1.18.1.jar -> com.sun.jersey.client.proxy jersey-client-1.18.1.jar -> com.sun.jersey.client.urlconnection jersey-client-1.18.1.jar -> com.sun.jersey.core.header not found -> com.sun.jersey.core.provider not found -> com.sun.jersey.core.reflection not found -> com.sun.jersey.core.spi.component not found -> com.sun.jersey.core.spi.component.ioc not found -> com.sun.jersey.core.spi.factory not found -> com.sun.jersey.core.util not found -> com.sun.jersey.spi not found -> com.sun.jersey.spi.inject not found -> com.sun.jersey.spi.service not found -> java.io -> java.lang -> java.lang.annotation -> java.lang.reflect -> java.net -> java.util -> java.util.concurrent -> java.util.logging -> javax.ws.rs.core not found -> javax.ws.rs.ext not found com.sun.jersey.api.client.async (jersey-client-1.18.1.jar) -> com.sun.jersey.api.client jersey-client-1.18.1.jar -> java.lang -> java.util.concurrent com.sun.jersey.api.client.config (jersey-client-1.18.1.jar) -> com.sun.jersey.core.util not found -> java.lang -> java.util com.sun.jersey.api.client.filter (jersey-client-1.18.1.jar) -> com.sun.jersey.api.client jersey-client-1.18.1.jar -> com.sun.jersey.core.util not found -> java.io -> java.lang -> java.net -> java.nio.charset -> java.security -> java.util -> java.util.logging -> java.util.regex -> java.util.zip -> javax.ws.rs not found -> javax.ws.rs.core not found com.sun.jersey.client.impl (jersey-client-1.18.1.jar) -> com.sun.jersey.api.client jersey-client-1.18.1.jar -> com.sun.jersey.core.header not found -> java.io -> java.lang -> java.net -> java.util -> java.util.concurrent.atomic -> javax.ws.rs.core not found com.sun.jersey.client.impl.async (jersey-client-1.18.1.jar) -> com.sun.jersey.api.client jersey-client-1.18.1.jar -> com.sun.jersey.api.client.async jersey-client-1.18.1.jar -> java.lang -> java.util.concurrent com.sun.jersey.client.proxy (jersey-client-1.18.1.jar) -> com.sun.jersey.api.client jersey-client-1.18.1.jar -> com.sun.jersey.api.client.async jersey-client-1.18.1.jar -> java.lang -> java.util.concurrent com.sun.jersey.client.urlconnection (jersey-client-1.18.1.jar) -> com.sun.jersey.api.client jersey-client-1.18.1.jar -> com.sun.jersey.core.header not found -> com.sun.jersey.spi not found -> java.io -> java.lang -> java.lang.reflect -> java.net -> java.security -> java.util -> java.util.logging -> javax.net.ssl -> javax.ws.rs.core not found com.sun.ws.rs.ext (jersey-client-1.18.1.jar) -> com.sun.jersey.core.spi.factory not found -> java.lang -> javax.ws.rs.core not found
JShell,即 Java Shell。從java9開始,java開始引入了 REPL(Read-Eval-Print Loop,讀取-求值-輸出 循環)工具
neo@MacBook-Pro ~ % jshell | Welcome to JShell -- Version 12 | For an introduction type: /help intro jshell>
jshell> /help | Type a Java language expression, statement, or declaration. | Or type one of the following commands: | /list [<name or id>|-all|-start] | list the source you have typed | /edit <name or id> | edit a source entry | /drop <name or id> | delete a source entry | /save [-all|-history|-start] <file> | Save snippet source to a file | /open <file> | open a file as source input | /vars [<name or id>|-all|-start] | list the declared variables and their values | /methods [<name or id>|-all|-start] | list the declared methods and their signatures | /types [<name or id>|-all|-start] | list the type declarations | /imports | list the imported items | /exit [<integer-expression-snippet>] | exit the jshell tool | /env [-class-path <path>] [-module-path <path>] [-add-modules <modules>] ... | view or change the evaluation context | /reset [-class-path <path>] [-module-path <path>] [-add-modules <modules>]... | reset the jshell tool | /reload [-restore] [-quiet] [-class-path <path>] [-module-path <path>]... | reset and replay relevant history -- current or previous (-restore) | /history [-all] | history of what you have typed | /help [<command>|<subject>] | get information about using the jshell tool | /set editor|start|feedback|mode|prompt|truncation|format ... | set configuration information | /? [<command>|<subject>] | get information about using the jshell tool | /! | rerun last snippet -- see /help rerun | /<id> | rerun snippets by ID or ID range -- see /help rerun | /-<n> | rerun n-th previous snippet -- see /help rerun | | For more information type '/help' followed by the name of a | command or a subject. | For example '/help /list' or '/help intro'. | | Subjects: | | intro | an introduction to the jshell tool | keys | a description of readline-like input editing | id | a description of snippet IDs and how use them | shortcuts | a description of keystrokes for snippet and command completion, | information access, and automatic code generation | context | a description of the evaluation context options for /env /reload and /reset | rerun | a description of ways to re-evaluate previously entered snippets
介紹信息
jshell> /help intro | | intro | ===== | | The jshell tool allows you to execute Java code, getting immediate results. | You can enter a Java definition (variable, method, class, etc), like: int x = 8 | or a Java expression, like: x + x | or a Java statement or import. | These little chunks of Java code are called 'snippets'. | | There are also the jshell tool commands that allow you to understand and | control what you are doing, like: /list | | For a list of commands: /help