Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tools.jar

 
Ravissant Markandey
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

Can anyone please tell me what exactly the tools.jar is for? Its present im the lib folder of JBOSS and also in the JRE's lib folder and both need to be in sync for the application to run. But can anyone tell me what exactly the files in this jar do?


Regards,
Ravissant Markenday
 
Jaikiran Pai
Marshal
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravissant Markandey wrote: Its present im the lib folder of JBOSS and also in the JRE's lib folder and both need to be in sync for the application to run. But can anyone tell me what exactly the files in this jar do?




It's not present in the JBoss lib. Where did you get the JBoss from? Maybe someone manually copied that jar into JBoss. That jar belongs to the JDK and not JBoss.
 
Ravissant Markandey
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Jaikishan, well yes the JBoss I have on my system has tools.jar in a lot of places , i kept getting a version 49/49 error until i replaced the tools.jar in my Jboss with the version in my JRE. So i believe the system looks for this jar, i havent tried removing it from my JBoss and running the application yet.
But can you still tell me what really happens in there when you DO have tools.jar in your JBoss and the versions are mismatched?
 
Ravissant Markandey
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Jaikishan, well yes the JBoss I have on my system has tools.jar in a lot of places , i kept getting a version 49/49 error until i replaced the tools.jar in my Jboss with the version in my JRE. So i believe the system looks for this jar, i havent tried removing it from my JBoss and running the application yet.
But can you still tell me what really happens in there when you DO have tools.jar in your JBoss and the versions are mismatched?
 
Ravissant Markandey
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply Jaikishan, well yes the JBoss I have on my system has tools.jar in a lot of places , i kept getting a version 49/49 error until i replaced the tools.jar in my Jboss with the version in my JRE. So i believe the system looks for this jar, i havent tried removing it from my JBoss and running the application yet.
But can you still tell me what really happens in there when you DO have tools.jar in your JBoss and the versions are mismatched?
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there an echo in here???

The tools.jar files contains classes used by the JDK, classes that are not needed by the JRE. Examples include classes for things such as javac, javadoc, and many of the other executables found in the JDK bin directory.

As Jaikiran pointed out, that file should only ever exist in the JDK's lib directory and nowhere else (if you have several JDKs installed, each one will have its own copy). The version of tools.jar must match the version of the JDK and also the version of rt.jar (the primary JRE set of classes). This (making sure all of the versions match) is why it is important to set JAVA_HOME properly to the JDK installation directory.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic