Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

how to define other server's file in classpath  RSS feed

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

e.g
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.

thanks,
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot. it works if I mapped.

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

Regards,
 
Java Cowboy
Sheriff
Posts: 16084
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Eung maeng
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks,
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.

thanks,
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!