Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compile Problem

 
Lawrence Keeney
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my .java file I have the statement:


I have generated a pde.jar file that contains the following files
\netscape\javascript\JSException.class
and
\netscape\javascript\JSObject.class

The pde.jar file is in the same directory as the .java file I am trying to compile, yet the compiler can not find the two .class files. What am I missing?
 
Anthony Watson
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Add the jar file to the classpath explicitly. Make sure you keep the .jar extension when doing so.
 
Lawrence Keeney
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anthony,

I did a set classpath=C:\0xfer\pcquest - applet to script
This (c:\0xfer\pcquest - applet to script) is the location of the .jar file yet it still does not work.

[ June 22, 2004: Message edited by: Lawrence Keeney ]
[ June 22, 2004: Message edited by: Lawrence Keeney ]
 
Anthony Watson
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to explicitly state that the .jar file is on the classpath. It does not work to put the directory that the .jar is in on the classpath. Make one addition to your classpath for each .jar file you are using. Make sure to include the .jar extension when adding the file to the classpath.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the handy-dandy JavaRanch guide to CLASSPATH. Have a look-see.
 
Lawrence Keeney
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anthony & Ernest,

Thanks for the help.

I finally got it to work. After following all the instructions it still did not work. I found the file I thought was called pde.jar was actually called pde.zip. Unfortunately this does not show in the XP directory. I found it by going back to DOS.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic