File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes Classpath variable in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Classpath variable in Eclipse" Watch "Classpath variable in Eclipse" New topic
Author

Classpath variable in Eclipse

Fred Victa
Ranch Hand

Joined: May 01, 2008
Posts: 78
I have both Java 1.5 and Eclipse installed on my computer. When I try to execute a program using Eclipse, I get a message that says that it cannot find, C:\apps\Java\jre1.5.0_11/lib/tools.jar

I know that the file, tools.jar, is found in C:\apps\Java\jre1.5.0_11. Should I change the classpath variable from C:\apps\Java\jre1.5.0_11 to C:\apps\Java\jdk1.5.0_11? If so, how would I do that?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

(not sure about English menus)
In Windows->Settings...->Java->Installed JRE, make sure that your JRE is there. If it's not, add it.


[My Blog]
All roads lead to JavaRanch
Fred Victa
Ranch Hand

Joined: May 01, 2008
Posts: 78
I already have JRE installed. My program is saying that it cannot find tools.jar in JRE. Is tools.jar supposed to be in JRE? I know that tools.jar is found in JDK. If the program is supposed to look for tools.jar in JDK, but not in JRE, how would I change that?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

I already have JRE installed.

Does it point to your JDK ? (not JRE only) It should be associated to C:\apps\Java\jdk1.5.0_11
Fred Victa
Ranch Hand

Joined: May 01, 2008
Posts: 78
I don't think it points to JDK. How would I make it point to it?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

In Windows->Settings...->Java->Installed JRE, click the Add... button. In JRE Home Directory, click the Search... button, and select your JDK directory (C:\apps\Java\jdk1.5.0_11). Give it the name you want, and click OK. Back to the Installed JRE window, check the JDK you have added (this will make it the default JRE for your projects.).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Classpath variable in Eclipse
 
Similar Threads
About Tomcat
how to compile and run java??
classpath
Ant script error in Websphere Application server 6.1
include tools.jar for JBoss ?