yes,  I understand that Tomcat 5.5 uses the JDT compiler (by default).
Nonetheless, the doc still says that tools.jar is loaded - and of course, if Tomcat is running
under a JRE, it will not be there (ok, fix the documentation).

I, that is the external jar using the javac, will use the default class loader, which should then work, provided this is running under the JDK and the documentation is accurate.

One of the variants I did try and failed was to stick tools.jar into the shared/lib directory. I can see why that's maybe not such a splendid idea and/or prohibited, but heck, what _do_ I need to do to get access to tools.jar ? And firstly, why is the behavior different on Windows
and Solaris?  Nominally these are the exact same versions, 1.5.0_06.

I thought there would be someone out there, who has seen this behavior before?

Thanks!
  Martin

Leon Rosenberg wrote:
as far as I know the 5.5 branch doesn't use the sun's java compiler
anymore but uses the jdt compiler from eclipse. Therefor it could just
take your systems jre (each jdk contains a jre) and add the jdt
compiler to the classpath.
Which classloader do you use to access the javac?

leon


On 4/2/06, Martin Schulz <[EMAIL PROTECTED]> wrote:
did I mention that I use the JDK 1.5.0_06...
the tools.jar is well in $JAVA_HOME/lib.

Any deeper ideas anybody?

   Martin

Larry Meadors wrote:
Sounds like you may have a JRE instead of a JDK.

>From a command like do:
 cd $JAVA_HOME
 find -iname javac

You should see one listed as './bin/javac' after running that second command.

Larry



On 4/1/06, Martin Schulz <[EMAIL PROTECTED]> wrote:

My webapps needs to access the javac compiler classes from tools.jar.

This appears to work on dev environment on Windows, but it doesn't
in a deployment environment:
Solaris 9
JDK 1.5.0_06

The app hits a java.lang.ClassNotFoundException: com.sun.tools.javac.Main

According to the documentation, tools.jar should always be in the
class path:
http://tomcat.apache.org/tomcat-5.5-doc/class-loader-howto.html

Looking at the startup scripts (I think I saw it in the doumentation too
somewhere) there is a 'javac' option (in catalina.sh), which appears
to be in some state of disrepair.  At least the order of arguments
passed from startup.sh does not match how catalina.sh looks at the args,
nor does catalina.sh actually consume the 'javac', or evaluate it
as a valid command.

I guess I'm confused at this stage as to what to believe and how to proceed.

   Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to