Board index » jbuilder » compile cannot see the classes in a .jar file

compile cannot see the classes in a .jar file


2004-01-19 05:14:04 AM
jbuilder14
When I run make on my project, I get the error message:
"Cannot access the directory PLCmon at line 2"
for the source for a java class file which has the statement:
import PLCmon.*;
at line 2.
If I include the .jar file in the project, I can see the classes correctly
displayed in the
tree control in the project pane under the node PLCmon. I looked at the
.library file
that the IDE generated, and it looks ok . . . points to the .jar file with
the correct path.
If I go through the hassle of running the compile through the command line
in a dos
window (and setting the CLASSPATH to point to the PLCmon.jar file), then the
.java
class files compile ok.
What do I have to do to use the .jar file (and it's classes) in the JBuilder
IDE? This would seem to be a
very basic thing to do. What am I doing wrong?
Thanks,
John
 
 

Re:compile cannot see the classes in a .jar file

You did not say that you added the library containing your
JAR to the project classpath. Use Project | Project
Properties | Paths | Required Libraries for that purpose.
Adding a JAR to the Project Pane just makes it easily
accessible for viewing.
Libraries are in general a global resource. Just creating
one does not add it as a required library to any project.
"John" < XXXX@XXXXX.COM >wrote in message
When I run make on my project, I get the error message:
"Cannot access the directory PLCmon at line 2"
for the source for a java class file which has the
statement:
import PLCmon.*;
at line 2.
If I include the .jar file in the project, I can see the
classes correctly
displayed in the
tree control in the project pane under the node PLCmon. I
looked at the
.library file
that the IDE generated, and it looks ok . . . points to the
.jar file with
the correct path.
If I go through the hassle of running the compile through
the command line
in a dos
window (and setting the CLASSPATH to point to the PLCmon.jar
file), then the
.java
class files compile ok.
What do I have to do to use the .jar file (and it's classes)
in the JBuilder
IDE? This would seem to be a
very basic thing to do. What am I doing wrong?
Thanks,
John