In Sun's doc: The tools classes in tools.jar are only used to run javac and javadoc. Does it mean that: In Windows,when I run C:\>javac HelloWorld.java The JVM will find javac.exe in the SDK's/lib/tools.jar Not the program in the SDK's/bin/tools.jar Do it right? I need your help! Thanks in advance!! [ March 22, 2004: Message edited by: ChenSanHau ]
I think it's safe to say that the tools (under the tools section in the sdk documentation) are actually Java programs located in the tools.jar file. So, when you invoke any of these things, they are merely a wrapper for programs in the tools.jar file. However, since this is the first time I've heard any sort of special attention on the direct usage of tools.jar, I'm going to say that this is a bit of an advanced topic. I would recommend that you just use the OS programs supplied in the bin directory, and leave it at that. That is, unless you have some real reason for devoting your attention to the tools.jar file--which you should feel free to explain so we can be of further assistance.
No -- inside the jar files there are only Java class files and supporting files for who knows what. The EXE files are just a wrapper to invoke the tools. EXE files are invoked by the operating system and so have nothing really to do with Java. There won't be any corresponding EXE files in the tools.jar file--just the corresponding classes with main functions to invoke by javac, etc. I believe that the tools.jar file can be used within other programs to compile programs, etc. For instance, Tomcat will use the tools.jar file to compile translated JSP pages, and so forth. In your case, I think you're getting a ClassNotFoundException because you haven't set the tools.jar file to be part of your classpath when you are invoking whatever program you are trying to invoke. (If I remember correctly, the doc says something about it, but I didn't read it too well).
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com