• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Compile Problem

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
And then we all jump out and yell "surprise! we got you this tiny ad!"
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic