Better observe Java running

Source: Internet
Author: User
Tags print print

When compiling Java programs and running Java programs, you can add a command to better understand the Java program's package import and code parsing operations !!!!

The following describes how the helloworld program works:

Public class helloworld
{
Public static void main (string [] ARGs)
{
Print print = new print ("Hello World ");
System. Out. println (print );
}
}
Class print
{
Private string STR;
Public print (string str1)
{
STR = str1;
}
Public String tostring ()
{
Return STR;
}
}

In the next compilation, add-verbose: javac-verbose helloworld. Java to view the console output:

Then run it with Java-verbose; output:

[Loaded java. lang. Comparable from shared objects file]
[Loaded java. lang. CharSequence from shared objects file]
[Loaded java. lang. String from shared objects file]
[Loaded java. lang. reflect. GenericDeclaration from shared objects file]
[Loaded java. lang. reflect. Type from shared objects file]
[Loaded java. lang. reflect. AnnotatedElement from shared objects file]
[Loaded java. lang. Class from shared objects file]
[Loaded java. lang. Cloneable from shared objects file]
[Loaded java. lang. ClassLoader from shared objects file]
[Loaded java. lang. System from shared objects file]
[Loaded java. lang. Throwable from shared objects file]
[Loaded java. lang. Error from shared objects file]
[Loaded java. lang. ThreadDeath from shared objects file]
[Loaded java. Lang. Exception from shared objects file]
[Loaded java. Lang. runtimeexception from shared objects file]
[Loaded java. Security. protectiondomain from shared objects file]
[Loaded java. Security. accesscontrolcontext from shared objects file]
[Loaded java. Lang. classnotfoundexception from shared objects file]
[Loaded java. Lang. linkageerror from shared objects file]
[Loaded java. Lang. noclassdeffounderror from shared objects file]
[Loaded java. Lang. classcastexception from shared objects file]
[Loaded java. Lang. arraystoreexception from shared objects file]
[Loaded java. Lang. virtualmachineerror from shared objects file]
[Loaded java. Lang. outofmemoryerror from shared objects file]
[Loaded java. Lang. stackoverflowerror from shared objects file]
[Loaded java. lang. ref. Reference from shared objects file]
[Loaded java. lang. ref. SoftReference from shared objects file]
[Loaded java. lang. ref. WeakReference from shared objects file]
[Loaded java. lang. ref. FinalReference from shared objects file]
[Loaded java. lang. ref. PhantomReference from shared objects file]
[Loaded java. lang. ref. Finalizer from shared objects file]
[Loaded java. lang. Runnable from shared objects file]
[Loaded java. lang. Thread from shared objects file]
[Loaded java. lang. Thread $ UncaughtExceptionHandler from shared objects fi
[Loaded java. lang. ThreadGroup from shared objects file]
[Loaded java. util. Dictionary from shared objects file]
[Loaded java. util. Map from shared objects file]
[Loaded java. util. Hashtable from shared objects file]
[Loaded java. util. properties from shared objects file]
[Loaded java. Lang. Reflect. accessibleobject from shared objects file]
[Loaded java. Lang. Reflect. Member from shared objects file]
[Loaded java. Lang. Reflect. Field from shared objects file]
[Loaded java. Lang. Reflect. method from shared objects file]
[Loaded java. Lang. Reflect. constructor from shared objects file]
[Loaded sun. Reflect. magicaccessorimpl from shared objects file]
[Loaded sun. Reflect. methodaccessor from shared objects file]
[Loaded sun. Reflect. methodaccessorimpl from shared objects file]
[Loaded sun. Reflect. constructoraccessor from shared objects file]
[Loaded sun. Reflect. constructjavascessorimpl from shared objects file]
[Loaded sun. Reflect. delegatingclassloader from shared objects file]
[Loaded sun. reflect. ConstantPool from shared objects file]
[Loaded java. lang. Iterable from shared objects file]
[Loaded java. util. Collection from shared objects file]
[Loaded java. util. AbstractCollection from shared objects file]
[Loaded java. util. List from shared objects file]
[Loaded java. util. AbstractList from shared objects file]
[Loaded java. util. RandomAccess from shared objects file]
[Loaded java. util. Vector from shared objects file]
[Loaded java. lang. Appendable from shared objects file]
[Loaded java. lang. AbstractStringBuilder from shared objects file]
[Loaded java. lang. StringBuffer from shared objects file]
[Loaded java. lang. StackTraceElement from shared objects file]
[Loaded java. nio. Buffer from shared objects file]
[Loaded sun. Misc. atomiclong from shared objects file]
[Loaded sun. Misc. atomiclongcsimpl from shared objects file]
[Loaded java. Lang. boolean from shared objects file]
[Loaded java. Lang. character from shared objects file]
[Loaded java. Lang. Number from shared objects file]
[Loaded java. Lang. Float from shared objects file]
[Loaded java. Lang. Double from shared objects file]
[Loaded java. Lang. byte from shared objects file]
[Loaded java. Lang. Short from shared objects file]
[Loaded java. Lang. Integer from shared objects file]
[Loaded java. Lang. Long from shared objects file]
[Loaded java. Lang. Management. memoryusage from shared objects file]
[Loaded java. Lang. strictmath from shared objects file]
[Loaded java. Io. objectstreamfield from shared objects file]
[Loaded java. util. Comparator from shared objects file]
[Loaded java. lang. String $ CaseInsensitiveComparator from shared objects f
[Loaded java. security. Guard from shared objects file]
[Loaded java. security. Permission from shared objects file]
[Loaded java. security. BasicPermission from shared objects file]
[Loaded java. lang. RuntimePermission from shared objects file]
[Loaded java. util. AbstractMap from shared objects file]
[Loaded sun. misc. SoftCache from shared objects file]
[Loaded java. lang. ref. ReferenceQueue from shared objects file]
[Loaded java. lang. ref. ReferenceQueue $ Null from shared objects file]
[Loaded java. lang. ref. ReferenceQueue $ Lock from shared objects file]
[Loaded java. util. HashMap from shared objects file]
[Loaded java. io. ObjectStreamClass from shared objects file]
[Loaded java. security. PrivilegedAction from shared objects file]
[Loaded sun. reflect. ReflectionFactory $ GetReflectionFactoryAction from sh
Ects file]
[Loaded java. security. AccessController from shared objects file]
[Loaded java. util. Stack from shared objects file]
[Loaded sun. reflect. ReflectionFactory from shared objects file]
[Loaded java. util. Map $ Entry from shared objects file]
[Loaded java. util. HashMap $ Entry from shared objects file]
[Loaded java. lang. IncompatibleClassChangeError from shared objects file]
[Loaded java. lang. NoSuchMethodError from shared objects file]
[Loaded java. lang. annotation. Annotation from shared objects file]
[Loaded java. lang. reflect. ReflectPermission from shared objects file]
[Loaded java. lang. ref. Reference $ Lock from shared objects file]
[Loaded java. lang. ref. Reference $ ReferenceHandler from shared objects fil
[Loaded java. lang. ref. Finalizer $ FinalizerThread from shared objects file
[Loaded java. util. Enumeration from shared objects file]
[Loaded java. util. Hashtable $ EmptyEnumerator from shared objects file]
[Loaded java. util. Iterator from shared objects file]
[Loaded java. util. Hashtable $ EmptyIterator from shared objects file]
[Loaded java. util. Hashtable $ Entry from shared objects file]
[Loaded java. nio. charset. Charset from shared objects file]
[Loaded java. nio. charset. spi. CharsetProvider from shared objects file]
[Loaded sun. nio. cs. FastCharsetProvider from shared objects file]
[Loaded sun. nio. cs. StandardCharsets from shared objects file]
[Loaded sun. util. PreHashedMap from shared objects file]
[Loaded sun. nio. cs. StandardCharsets $ Aliases from shared objects file]
[Loaded sun. nio. cs. StandardCharsets $ Classes from shared objects file]
[Loaded sun. nio. cs. StandardCharsets $ Cache from shared objects file]
[Loaded java. lang. ThreadLocal from shared objects file]
[Loaded java. nio. charset. Charset $3 from C:/Program Files/Java/jre1.5.0/l
R]
[Loaded sun. reflect. Reflection from shared objects file]
[Loaded java. util. Collections from shared objects file]
[Loaded java. util. Random from shared objects file]
[Loaded java. util. concurrent. atomic. AtomicLong from shared objects file]
[Loaded sun. misc. Unsafe from shared objects file]
[Loaded java. lang. Class $3 from shared objects file]
[Loaded java. lang. reflect. Modifier from shared objects file]
[Loaded sun. reflect. LangReflectAccess from shared objects file]
[Loaded java. lang. reflect. ReflectAccess from shared objects file]
[Loaded java. util. Set from shared objects file]
[Loaded java. util. AbstractSet from shared objects file]
[Loaded java. util. Collections $ EmptySet from shared objects file]
[Loaded java. util. Collections $ EmptyList from shared objects file]
[Loaded java. util. Collections $ EmptyMap from shared objects file]
[Loaded java. util. Collections $ ReverseComparator from shared objects file
[Loaded java. util. Collections $ SynchronizedMap from shared objects file]
[Loaded sun. nio. cs. AbstractCharsetProvider from C:/Program Files/Java/jr
Ib/rt. jar]
[Loaded sun. nio. cs. ext. ExtendedCharsets from C:/Program Files/Java/jre1.
Charsets. jar]
[Loaded java. lang. Class $1 from shared objects file]
[Loaded sun. reflect. ReflectionFactory $1 from shared objects file]
[Loaded sun. reflect. nativeconstructextends cessorimpl from shared objects fi
[Loaded sun. reflect. delegatingconstructextends cessorimpl from shared object
[Loaded java. util. SortedMap from shared objects file]
[Loaded java. util. TreeMap from shared objects file]
[Loaded sun. misc. ASCIICaseInsensitiveComparator from shared objects file
[Loaded java. util. TreeMap $ Entry from shared objects file]
[Loaded sun. misc. VM from shared objects file]
[Loaded java. lang. StringBuilder from shared objects file]
[Loaded sun. nio. cs. ext. GBK from C:/Program Files/Java/jre1.5.0/lib/chars

[Loaded java. lang. StringCoding from shared objects file]
[Loaded java. lang. ThreadLocal $ ThreadLocalMap from shared objects file]
[Loaded java. lang. ThreadLocal $ ThreadLocalMap $ Entry from shared objects f
[Loaded java. lang. StringCoding $ StringDecoder from shared objects file]
[Loaded java. lang. StringCoding $ CharsetSD from shared objects file]
[Loaded java. nio. charset. CharsetDecoder from shared objects file]
[Loaded sun. nio. cs. ext. DoubleByteDecoder from C:/Program Files/Java/jre1
/Charsets. jar]
[Loaded sun. nio. cs. ext. GBK $ Decoder from C:/Program Files/Java/jre1.5.0/l
Ets. jar]
[Loaded java. nio. charset. CodingErrorAction from shared objects file]
[Loaded java. nio. ByteBuffer from shared objects file]
[Loaded java. nio. HeapByteBuffer from shared objects file]
[Loaded java. nio. Bits from shared objects file]
[Loaded java. nio. ByteOrder from shared objects file]
[Loaded java. lang. Readable from shared objects file]
[Loaded java. nio. CharBuffer from shared objects file]
[Loaded java. nio. HeapCharBuffer from shared objects file]
[Loaded java. nio. charset. CoderResult from shared objects file]
[Loaded java. nio. charset. CoderResult $ Cache from shared objects file]
[Loaded java. nio. charset. CoderResult $1 from shared objects file]
[Loaded java. nio. charset. CoderResult $2 from shared objects file]
[Loaded sun. misc. Version from shared objects file]
[Loaded java. io. Closeable from shared objects file]
[Loaded java. io. InputStream from shared objects file]
[Loaded java. io. FileInputStream from shared objects file]
[Loaded java. io. FileDescriptor from shared objects file]
[Loaded java. io. Flushable from shared objects file]
[Loaded java. io. OutputStream from shared objects file]
[Loaded java. io. FileOutputStream from shared objects file]
[Loaded java. io. FilterInputStream from shared objects file]
[Loaded java. io. BufferedInputStream from shared objects file]
[Loaded java. util. concurrent. atomic. AtomicReferenceFieldUpdater from sha
Cts file]
[Loaded java. util. concurrent. atomic. AtomicReferenceFieldUpdater $ AtomicRe
IeldUpdaterImpl from shared objects file]
[Loaded java. io. FilterOutputStream from shared objects file]
[Loaded java. io. PrintStream from shared objects file]
[Loaded java. io. BufferedOutputStream from shared objects file]
[Loaded java. io. Writer from shared objects file]
[Loaded java. io. OutputStreamWriter from shared objects file]
[Loaded sun. nio. cs. StreamEncoder from shared objects file]
[Loaded sun. io. Converters from shared objects file]
[Loaded sun. security. action. GetPropertyAction from shared objects file]
[Loaded sun. nio. cs. StreamEncoder $ CharsetSE from shared objects file]
[Loaded java. nio. charset. CharsetEncoder from shared objects file]
[Loaded sun. nio. cs. ext. DoubleByteEncoder from C:/Program Files/Java/jre1
/Charsets. jar]
[Loaded sun. nio. cs. ext. GBK $ Encoder from C:/Program Files/Java/jre1.5.0/l
Ets. jar]
[Loaded sun. nio. cs. Surrogate $ Parser from shared objects file]
[Loaded sun. nio. cs. Surrogate from shared objects file]
[Loaded java. io. BufferedWriter from shared objects file]
[Loaded java. lang. Runtime from shared objects file]
[Loaded java. io. File from shared objects file]
[Loaded java. io. FileSystem from shared objects file]
[Loaded java. io. Win32FileSystem from shared objects file]
[Loaded java. io. WinNTFileSystem from shared objects file]
[Loaded java. io. ExpiringCache from shared objects file]
[Loaded java. util. javashashmap from shared objects file]
[Loaded java. io. ExpiringCache $1 from shared objects file]
[Loaded java. util. javashashmap $ Entry from shared objects file]
[Loaded java. lang. ClassLoader $3 from shared objects file]
[Loaded java. io. ExpiringCache $ Entry from shared objects file]
[Loaded java. lang. ClassLoader $ NativeLibrary from shared objects file]
[Loaded java. Lang. stringcoding $ stringencoder from shared objects file]
[Loaded java. Lang. stringcoding $ charsetse from shared objects file]
[Loaded java. Lang. Terminator from shared objects file]
[Loaded sun. Misc. signalhandler from shared objects file]
[Loaded java. Lang. Terminator $1 from shared objects file]
[Loaded sun. Misc. signal from shared objects file]
[Loaded sun. Misc. nativesignalhandler from shared objects file]
[Loaded sun. Misc. javalangaccess from shared objects file]
[Loaded java. Lang. System $2 from shared objects file]
[Loaded sun. Misc. sharedsecrets from shared objects file]
[Loaded java. Lang. nullpointerexception from shared objects file]
[Loaded java. Lang. arithmeticexception from shared objects file]
[Loaded java. Lang. compiler from shared objects file]
[Loaded java. lang. Compiler $1 from shared objects file]
[Loaded sun. misc. Launcher from shared objects file]
[Loaded java.net. URLStreamHandlerFactory from shared objects file]
[Loaded sun. misc. Launcher $ Factory from shared objects file]
[Loaded java. security. SecureClassLoader from shared objects file]
[Loaded java.net. URLClassLoader from shared objects file]
[Loaded sun. misc. Launcher $ ExtClassLoader from shared objects file]
[Loaded sun. security. util. Debug from shared objects file]
[Loaded java. util. StringTokenizer from shared objects file]
[Loaded java. security. PrivilegedExceptionAction from shared objects file
[Loaded sun. misc. Launcher $ ExtClassLoader $1 from shared objects file]
[Loaded sun.net. www. ParseUtil from shared objects file]
[Loaded java. util. BitSet from shared objects file]
[Loaded java.net. URL from shared objects file]
[Loaded java. util. Locale from shared objects file]
[Loaded java. lang. CharacterDataLatin1 from shared objects file]
[Loaded java.net. Parts from shared objects file]
[Loaded java.net. URLStreamHandler from shared objects file]
[Loaded sun.net. www. protocol. file. Handler from shared objects file]
[Loaded java. util. HashSet from shared objects file]
[Loaded sun. misc. URLClassPath from shared objects file]
[Loaded java. util. ArrayList from shared objects file]
[Loaded sun.net. www. protocol. jar. Handler from shared objects file]
[Loaded sun. misc. Launcher $ AppClassLoader from shared objects file]
[Loaded sun. misc. Launcher $ AppClassLoader $1 from shared objects file]
[Loaded java. lang. SystemClassLoaderAction from shared objects file]
[Loaded java.net. URLClassLoader $1 from shared objects file]
[Loaded sun. misc. URLClassPath $3 from shared objects file]
[Loaded sun. misc. URLClassPath $ Loader from shared objects file]
[Loaded sun. misc. URLClassPath $ JarLoader from shared objects file]
[Loaded sun. misc. FileURLMapper from shared objects file]
[Loaded java.util.zip. ZipConstants from shared objects file]
[Loaded java.util.zip. ZipFile from shared objects file]
[Loaded java. util. jar. JarFile from shared objects file]
[Loaded sun. security. action. LoadLibraryAction from shared objects file]
[Loaded sun. misc. JavaUtilJarAccess from shared objects file]
[Loaded java. util. jar. JavaUtilJarAccessImpl from shared objects file]
[Loaded sun. misc. JarIndex from shared objects file]
[Loaded sun. misc. ExtensionDependency from shared objects file]
[Loaded java.util.zip. ZipEntry from shared objects file]
[Loaded java. util. jar. JarEntry from shared objects file]
[Loaded java. util. jar. JarFile $ JarFileEntry from shared objects file]
[Loaded java. io. DataInput from shared objects file]
[Loaded java. io. DataInputStream from shared objects file]
[Loaded java.util.zip. ZipFile $ ZipFileInputStream from shared objects fil
[Loaded java.util.zip. InflaterInputStream from shared objects file]
[Loaded java.util.zip. ZipFile $2 from shared objects file]
[Loaded java.util.zip. Inflater from shared objects file]
[Loaded java. lang. Math from shared objects file]
[Loaded java. Security. privilegedactionexception from shared objects File
[Loaded sun. Misc. urlclasspath $ fileloader from shared objects file]
[Loaded java. Io. Reader from shared objects file]
[Loaded java. Io. bufferedreader from shared objects file]
[Loaded java. Io. inputstreamreader from shared objects file]
[Loaded sun. NiO. cs. streamdecoder from shared objects file]
[Loaded sun. NiO. cs. historicallynamedcharset from shared objects file]
[Loaded sun. NiO. cs. utf_8 from shared objects file]
[Loaded sun. NiO. cs. streamdecoder $ charsetsd from shared objects file]
[Loaded sun. NiO. cs. utf_8 $ decoder from shared objects file]
[Loaded sun. NiO. cs. Surrogate $ generator from shared objects file]
[Loaded java. util. abstractsequentiallist from shared objects file]
[Loaded java. util. queue from shared objects file]
[Loaded java. util. writable list from shared objects file]
[Loaded java. util. writable list $ entry from shared objects file]
Exception in thread "Main" Java. Lang. noclassdeffounderror: helloword
[Loaded java. Lang. Shutdown From shared objects file]
[Loaded java. Lang. Shutdown $ lock from shared objects file]

You can compile a smaller class L;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.