Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JavaC classpath och JSObject

 
John Larssen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Im a newbe and need som help compiling .java to .class.
in the .java a class JSObject is used, and I understand this is a part of Netscape.javascript.* but as I don't want to install Netscape I found the Mayscript.jar containing the JSObject.class. Now I wonder how to compile with this external class. The JavaC compiler wont accept it, I have tried with the classpath parameter. Grateful for any help.
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, John!
If the JAR file contains the required class(es), then you should be able to compile your source file(s) if the CLASSPATH is configured correctly.
What is your CLASSPATH value? What is the exact command you're using to compile? What is the error message?
 
John Larssen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Managed to get the classfile right. But now I got another error when compiling: Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/Main
And I have absolutely no idea what this means
Please help me.
 
John Larssen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CLASSPATH that is, ofcourse. Hmm maybe I didnt get it right?
 
John Larssen
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nevermind, I solved the problem.
Wrong PATH settings.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic