It's not a secret anymore!
The moose likes Websphere and the fly likes Classpath variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Classpath variables" Watch "Classpath variables" New topic

Classpath variables

Dirk Lombard

Joined: Jul 27, 2005
Posts: 18
Can anybody try and explain to me what happens to the class path variables that you define in WASD or RAD once you move you application to the application server.

What a I did is right click on the application project in the workspace go to properties and click on the Java Build Path and than on the Libraries tab. Then click on Add Variable -> Configure Variable -> New and a variable name and the path to the library or the jar that you want to include. eg. Create a LOG4_J variable that points to you log4j.jar.

You can now use classes inside the jar inside your applications that you develop. My question is what happens if you jar up your application and deploy it to an application server. How does your Websphere Application Server map the LOG4_J variable to the log4j.jar on the application server?

The path is not the same that it was on you PC how will it find the jar?

SCJP 1.4<br />SCWCD 1.4
Ranvir Dalal

Joined: Jan 31, 2003
Posts: 8
Did you check the jar/ear file created(which you eventually upload to the WAS server)
I think it includes this jar file(what you defined in variable) to the ear file. So it is alwayse available to your classes.
I agree. Here's the link:
subject: Classpath variables
It's not a secret anymore!