user3845894
user3845894

Reputation: 373

Classpath in JVM settings in WAS server

I am using IBM WAS server version 8.0 on a Windows machine and I want to set classpath in the "Generic JVM arguments" and not in the "Classpath" itself. I tried giving -Dclasspath but it's not working. Is there any way I can do that?

Also, I need the same information about a Linux machine.

Thanks!

Upvotes: 0

Views: 1496

Answers (2)

Jarid
Jarid

Reputation: 2018

The best answer here would be "don't modify the JVM classpath". Except in exceedingly rare cases (an example of which I can't even think of off the top of my head), there is very little that you accomplish by modifying the JVM classpath that can't be done by using shared libraries or simply packaging the necessary code in your application. Modifying the classpath at the JVM level carries the risk of overriding core server classes and subverts the standard Java EE class loader hierarchy.

If you REALLY think a classpath entry is necessary, the JVM argument to specify the classpath is either "-cp" or "-classpath" (as in "-cp C:\temp\file.jar"), without the "D". WebSphere's launcher will tack anything in that property onto the end of the existing server classpath.

Upvotes: 1

user3845894
user3845894

Reputation: 373

Just give -classpath "PATH ITSELF" and restart your server and it should work just fine. Thanks!

Upvotes: 0

Related Questions