• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Classpath variable in Eclipse

 
Fred Victa
Ranch Hand
Posts: 185
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(not sure about English menus)
In Windows->Settings...->Java->Installed JRE, make sure that your JRE is there. If it's not, add it.
 
Fred Victa
Ranch Hand
Posts: 185
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 185
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think it points to JDK. How would I make it point to it?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic