File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes JavaC classpath och JSObject Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JavaC classpath och JSObject" Watch "JavaC classpath och JSObject" New topic
Author

JavaC classpath och JSObject

John Larssen
Greenhorn

Joined: Aug 27, 2003
Posts: 5
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

Joined: Dec 10, 2001
Posts: 7023
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?


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
John Larssen
Greenhorn

Joined: Aug 27, 2003
Posts: 5
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

Joined: Aug 27, 2003
Posts: 5
CLASSPATH that is, ofcourse. Hmm maybe I didnt get it right?
John Larssen
Greenhorn

Joined: Aug 27, 2003
Posts: 5
Nevermind, I solved the problem.
Wrong PATH settings.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JavaC classpath och JSObject