aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Dr. Java = cannot find symbol; command line compiles\runs fine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Dr. Java = cannot find symbol; command line compiles\runs fine" Watch "Dr. Java = cannot find symbol; command line compiles\runs fine" New topic
Author

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

Anthony Sparky
Greenhorn

Joined: Aug 21, 2012
Posts: 3
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

Joined: Oct 13, 2005
Posts: 39416
    
  28
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

Joined: Apr 04, 2012
Posts: 924
    
    1

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

Joined: Aug 21, 2012
Posts: 3
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!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Dr. Java = cannot find symbol; command line compiles\runs fine