- -Xbootclasspath/p:
/data/patches/NewArrayList.jar
-Xbootclasspath
At start-up, JVM load its internal classes and the java.* pacages
- -Xbootclasspath:bootclasspath
- Specify a semicolon-separated list of directories, JAR archives, and ZIP archives to search for boot class files. These are used in place of the boot class files included in the Java 2 SDK.
- Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.
- -Xbootclasspath/a:path
- Specify a semicolon-separated path of directires, JAR archives, and ZIP archives to append to the default bootstrap class path.
- -Xbootclasspath/p:path
- Specify a semicolon-separated path of directires, JAR archives, and ZIP archives to prepend in front of the default bootstrap class path.
- Note: Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license.
How to Verify
To verity the effect of -Xbootclasspath, you can use the following option:
- -verbose:class
[Opened /data/patches/NewArrayList.jar]
[Opened /data/JVMs/nmt_test/jre/lib/alt-rt.jar]
[Opened /data/JVMs/nmt_test/jre/lib/rt.jar]
[Loaded java.lang.Object from /data/JVMs/nmt_test/jre/lib/rt.jar]
[Loaded java.io.Serializable from /data/JVMs/nmt_test/jre/lib/rt.jar] ...
[Loaded java.lang.NoSuchMethodError from /data/JVMs/nmt_test/jre/lib/rt.jar]
[Loaded java.util.ArrayList from /data/patches/NewArrayList.jar]
[Loaded java.util.Collections from /data/JVMs/nmt_test/jre/lib/rt.jar]
From the above highlighted lines, you can see that java.util.Array.List was indeed loaded from the new jar file (i.e., NewArrayList.jar).
In summary, to diagnose any class loading issue, you can use -verbose:class. There are other useful options which enable verbose output:
- -verbose[:class|gc|jni]
Note
- We have started WebLogic Server with the following line:
- bin/startManagedWebLogic.sh CRMDemo_server1 http://myserver:7001 > logs/CRMDemo_server1.log 2>&1 < /dev/null &
In other words, we have redirected stdout and stderr from WLS window to CRMDemo_server1.log
References
- Using the BootClasspath--Tweaking the Java Runtime API
- WebLogic's Classloading Framework
- Oracle® JRockit Command-Line Reference Release R28
- -Xbootclasspath directories and zips/jars separated by ; (Windows) or : (Linux and Solaris)
- java - the Java application launcher
No comments:
Post a Comment