• Post Reply Bookmark Topic Watch Topic
  • New Topic

Classpath problem - VERY URGENT  RSS feed

mike seluker
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I'm on the stage of submitting my assignment but facing a common weird problem wrt classpath. I've a shared.jar file which will be used by my client.jar and server.jar executables
The problem is i'm not able to set the classpath
I tried the following options
A) set classpath=%classpath%;./shared.jar
java -jar client.jar
getting "FileNotFoundException" suncertify/coreclasses/FBNConstants file not found
B) java -classpath ./shared.jar -jar client.jar
still getting the same exception
I've read somewhere in the post that -jar ignores the classpath variable. So is there any solution for this??
I've one solution, I dunno whether it is acceptable or not?
In the manifest file of client.jar I've set
Main-Class: suncertify.gui.StartUp
Class-Path: ./shared.jar
and now if i run
java -jar client.jar everything works great. The only limitation is that the shared.jar has to be present whereever client.jar is. But still, the user has the liberty of copying(client.jar and shared.jar) anywhere.
Is this acceptable? Guys Please reply ASAP....
thnx in adv.
PS: "When you use -jar option, jar file is the source of all user classes and other classpath settings are ignored".
Found this comment in the java docs..
[This message has been edited by mike seluker (edited December 13, 2001).]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!