This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills and have John Sonmez on-line!
See this thread for details.
The moose likes Java in General and the fly likes Can't find javac in tools.jar javadocs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Can Watch "Can New topic
Author

Can't find javac in tools.jar javadocs

David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
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)
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
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
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't find javac in tools.jar javadocs