GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes simple compiling problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "simple compiling problem" Watch "simple compiling problem" New topic
Author

simple compiling problem

John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
It's been awhile since I've compiled at the command line. My file Demo.java is in the same directory as the jar (spsswdemo.jar) it depends on. So I type:

javac -classpath ".;spsswdemo.jar" Demo.java

But this doesn't work. Demo cannot find classes in the jar (I checked, they are there)

Somebody please straighten me out on this matter!

Thanks

Eic
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39095
    
  23
I had a look at the java tool website where it tells you about the -classpath option, and this link about classpaths. I don't think you need to specify . when adding to the classpath, and I don't think you are supposed to use quotes.

Try missing out the .; bit or the "s and if that doesn't work try the absolute classpath for spsswdemo.jar, ie starting with C:\
John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
Thanks. The problem turned out to be the lack import statements in the Demo class. I love to download demos of a product that are broken!

Eric
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39095
    
  23
You're welcome
 
GeeCON Prague 2014
 
subject: simple compiling problem