Search code examples
javaeclipsetomcatclassloaderbootclasspath

bootclasspath in tomcat


I'm trying to provide a slightly different implementation of java.util.Date (for experimental purposes) . I rewrote it, packaged my java.util.Date in a jar and used -Xbootclasspath/p:fullpathto.jar as a VM parameter. When running a standalone, it picks it up and works nicely. However, when I try to set this bootclasspath argument in Tomcat (using WTP eclipse) it doesn't use my modified java.util.Date.

I configured it in VM arguments under Launch configuration.

Anybody has an idea of why this could be?

Cheers


Solution

  • I suggest that you try to take a look at the command arguments that are being used when Eclipse (?) launches the JVM to run Tomcat. On Linux, I'd use ps -efl | grep java to find this out ...

    For reference: this Eclipse forum post gives 2 ways to set the bootclasspath in an Eclipse Launcher:

    • You can add a -Xbootclasspath option to the JVM args.
    • You can change the bootclasspath in the classpath tab.