Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dr. Java = cannot find symbol; command line compiles\runs fine

 
Anthony Sparky
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have two classes:
api.java
test.java

The api.java has one dependency class called StdOut located in a file named file.jar

I can compile and run these files with no errors using the command line (javac *.java java test).

However when I try to compile api.java using Dr. Java, I get a "cannot find symbol symbol : variable StdOut" error.

My question is, why is Dr. Java not able to compile my classes even though I have no problem doing so using the command line?

Thanks in advance.
 
Campbell Ritchie
Sheriff
Pie
Posts: 48976
60
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Since Dr Java is an IDE, it appears to me that this question would fit better into our IDEs forum.
 
gurpeet singh
Ranch Hand
Posts: 924
1
Fedora Java Netbeans IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anthony Sparky wrote:Hello,

I have two classes:
api.java
test.java

The api.java has one dependency class called StdOut located in a file named file.jar

I can compile and run these files with no errors using the command line (javac *.java java test).

However when I try to compile api.java using Dr. Java, I get a "cannot find symbol symbol : variable StdOut" error.

My question is, why is Dr. Java not able to compile my classes even though I have no problem doing so using the command line?

Thanks in advance.


did you add file.jar in classpath of dr java ? ? ?
 
Anthony Sparky
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
gurpeet singh wrote:
Anthony Sparky wrote:Hello,

I have two classes:
api.java
test.java

The api.java has one dependency class called StdOut located in a file named file.jar

I can compile and run these files with no errors using the command line (javac *.java java test).

However when I try to compile api.java using Dr. Java, I get a "cannot find symbol symbol : variable StdOut" error.

My question is, why is Dr. Java not able to compile my classes even though I have no problem doing so using the command line?

Thanks in advance.


did you add file.jar in classpath of dr java ? ? ?



Thanks for your reply.

No I did not add file.jar to class path of Dr. Java. I only added file.jar to the classpath in Environmental variables. How do I add it to Dr.Java?

EDIT: 1 Thanks a lot, I added it to Dr.Java's classpath and it worked. Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic