I've been adding some of my own special modifications to a utility, when I got a few messages pointing out that sun.tools.javac.Main has been deprecated. I would like to just update the program to whatever the current interface is, but finding the javadocs for anything in tools.jar besides Doclets has been more frustrating than I would expect. Where can I find out a non-deprecated way to use javac from a java program without creating a new process? (I suppose I could try decompiling tools.jar and poking around, but there must be a better way)
Where did you find info on this class originally? My impression is that the code in the com.sun hierarchy is intentionally omitted from public APIs because Sun reserves the right to change things within it. They don't want to be locked into supporting it yet. So using anthing here is automatically putting your code at risk whenever you upgrade to a new SDK. Having said that, obviously there may be reasons why you need to do this anyway, so the best way I can see to do it is, yes, decompile the files in tools.jar and see what you can figure out. If this is for SDK 1.3 you could also download the SDK source code from Sun here - but I don't see anywhere you can do this for 1.4. (I already looked in src.jar - nothing's there from com.sun.tools.*). Good luck - and I'd be interested in hearing if you can get this to work, or if you find a good source of info.
"I'm not back." - Bill Harding, Twister
Joined: Jul 27, 2001
This JDK 1.2 tooldocs page at least mentions the class near the bottom. Could it be some old feature that Sun regrets having made public in the first place? I'm pretty sure I've seen other software before that required tools.jar in the classpath for java compiling. Weird.