This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes how to define other server's file in classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to define other server Watch "how to define other server New topic

how to define other server's file in classpath

Eung maeng
Ranch Hand

Joined: Feb 10, 2002
Posts: 68
Does anyone can explain to me

how to define other server's file in classpath

I have a batchfile to set classpath for all jar file. However, I need to
set a specific .jar where is in other server like below

set JDBC_Home=\\QIBM\ProdData\HTTP\Public\jt400\lib\jt400.jar(i need to set this in CLASSPATH)

set CLASSPATH=%CLASSPATH%;..\lib\vertex_tax.jar
set CLASSPATH=%CLASSPATH%;..\lib\vertex_taxgis.jar
set CLASSPATH=%CLASSPATH%;..\lib\vertex_util.jar
set CLASSPATH=%CLASSPATH%;..\lib\xercesImpl.jar

How do I set to CLASSPATH,
What I tried
set CLASSPATH=%CLASSPATH%;\\QIBM\ProdData\HTTP\Public\jt400\lib\jt400

it's not working.

Please give me a hand.

Haris Karameh
Ranch Hand

Joined: Oct 17, 2002
Posts: 38
what is \\QIBM - remote machine?
if it is jvm won't look there.
If it is windows try mapping drive letter to \\QIBM\ProdData.
something like
net use x: \\QIBM\ProdData
set CLASSPATH=%CLASSPATH%;X:\HTTP\Public\jt400\lib\jt400
If necessary map this drive as part of user profile of account under which your server is running
Eung maeng
Ranch Hand

Joined: Feb 10, 2002
Posts: 68
thanks a lot. it works if I mapped.

otherwise, it's not possbile to access without mapped or?

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074

Wouldn't it be easier to copy the file (jt400.jar) from the remote server to your local machine and put the local copy of the file in the classpath?

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Eung maeng
Ranch Hand

Joined: Feb 10, 2002
Posts: 68
Yes, i can copy of all .jar from window server in classpath. However, there are lots of things to copy.
I found an one thing related this matter. I defind that classpath like ;q:\\qibm\....(mapped) in java to execute.

everytime, I have to access window server manually before access a window server via classpath. Which meant the classpath can not access themselves, unless access before.

Please give me how to solve if you have any suggestion.

jQuery in Action, 2nd edition
subject: how to define other server's file in classpath
Similar Threads
How do I setup a DB2 datasource in WSAD test environment?
Jun Hong need help java.lang.NoClassDefFoundError:
New to packages, works in 1.5 not 1.4
Having Trouble Compiling
Adding a package statement makes jar not visible during runtime?