• Post Reply Bookmark Topic Watch Topic
  • New Topic

tools.jar  RSS feed

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey folks.
Ok, ok its a novice question.
as I know, the standard java compiler is found in tools.jar , and to develop a Java application, you don't need this jar in your classpath,but why some people add this jar to their classpath !?
in which situations should I include this jar in my classpath (like installing J2EE RI or ....) ?
what is the name of jar that contains the compiled java library (javax.swing.*, java.net.*......) ?
thanks.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You only need tools.jar in your path if you're specifically invoking one of the tools classes -- i.e., sun.tools.javac.Main , which implements javac. Note that Sun specifically discourages this, as all the "sun.*" packages are unsupported and subject to change without notice.

As you point out, though, some software uses this jar file -- for example, some JSP containers may use sun.tools.javac.Main to compile Java code generated from JSPs. You should put this JAR on your classpath if, and only if, some software you're installing tells you to do so.

The main Java libraries are in rt.jar ("Run Time") which is in typically in the directory j2sdkXXX/jre/lib .
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!