com.sun.tools.javac.Main ..API docs?

  • Thread starter Andrew Thompson
  • Start date
A

Andrew Thompson

I was stumbling around Sun's site the other
night looking for API docs for the com.sun.tools
packages, but could not find any.

Does anyone know if they exist, where I
can get them?
 
A

Andrew Thompson

Roedy Green said:
see http://mindprod.com/jgloss/javacexe.html

Once you have found one tool, you should be able to find the others.

I'm not sure if I understand you correctly Roedy.

I had a look around the page and followed some
of the likely looking links (including the one to the
javaworld tech tip and some back to Sun) but could
not see the 'com.sun.tools' equivalent of..
http://java.sun.com/j2se/1.4.2/docs/api/

It is that stuff I am after. I suppose I could
explore the tools jar using Reflection to get
some idea of possibilities, it's just I am feeling
lazy.
 
S

Sudsy

Andrew said:
I was stumbling around Sun's site the other
night looking for API docs for the com.sun.tools
packages, but could not find any.

Does anyone know if they exist, where I
can get them?

Andrew,
The reason they're hard to find is that Sun STRONGLY recommends
against their use. They could change or even disappear entirely in
a future release. Caveat emptor.
 
A

Andrew Thompson

| Andrew Thompson wrote:
| > I was stumbling around Sun's site the other
| > night looking for API docs for the com.sun.tools
| > packages, but could not find any.
| >
| > Does anyone know if they exist, where I
| > can get them?
|
| Andrew,
| The reason they're hard to find is that Sun STRONGLY
recommends
| against their use.

You mean - they do _exist_?
[ Got a link to Sun that mentions that 'not recommend'?
I cannot find my way round that (damn) site.. ]

| ..They could change or even disappear entirely in
| a future release.

I was unawarte of that, but I reason that , the jars
have existed for a long while, I cannot see why Sun'd
bother suddenly changing them unless they discovered
some fatal flaw and wanted to _stop_ people using them.

| ..Caveat emptor.

I think I'll risk it, it would be a pity if my
server side compiling and what not failed
in the future, but I may as well make use
of it while it exists..
 
S

Sudsy

Andrew Thompson wrote:
| ..They could change or even disappear entirely in
| a future release.

I was unawarte of that, but I reason that , the jars
have existed for a long while, I cannot see why Sun'd
bother suddenly changing them unless they discovered
some fatal flaw and wanted to _stop_ people using them.

The way it works is that the "public" (not to be confused with the
access modifier by the same name) java.* and javax.* classes and
interfaces are well-defined and won't measurably change in the future.
The com.sun.* classes/interfaces are typically used to provide the
lower-level functionality.
Sometimes the capability eventually gets released in a standard
extension, e.g. JAI (Java Advanced Imaging). It uses the under-
lying com.sun.* classes but you don't access them directly.
| ..Caveat emptor.

I think I'll risk it, it would be a pity if my
server side compiling and what not failed
in the future, but I may as well make use
of it while it exists..

A number of people and companies have taken the risk, sometimes
successfully.
But ask yourself one question, punk: did I shoot five or six...
Sorry! Flashback...
It might work today, it might work in six months, but eventually
you're going to have to deal with the fallout.
I prefer to subscribe to the published and supported standards.
YMMV

ps. Thanks for the laughs on that Roman beer issue!
 
N

Neal Gafter

They're not documented because they're not supported as APIs. We expect to
document com.sun.tools.javac.Main in 1.5 (Tiger), but not most of the javac
internals.
 
A

Andrew Thompson

| Andrew Thompson wrote:
....
| But ask yourself one question, punk: did I shoot five or six...
| Sorry! Flashback... *

Checks phasor. Well, I started with a clip
of 1500 and my LED readout incidates '1495
remaining' (in very small letters) so I suppose
that'd be ..5.
Sorry! Flashforward...

* I actually went out and bought my favorite
Clint Eastwood on DVD for XMas, ..way before
the Dirty Harry series.
"The Good, The Bad and the Ugly"

So perhaps I _should_ respond
"When you got to shoot, ..shoot. Don't talk!"

| ps. Thanks for the laughs on that Roman beer issue!

Thanks for the beer! ;-)
 
R

Roedy Green

'm not sure if I understand you correctly Roedy.

Perhaps you want to find out how for example to call javac.exe as a
class, not on the command line, using the Java API??

In that case, there are no official docs, but there are unofficial
ones people have like Dion Gillard have created by decompiling.
 
A

Andrew Thompson

| Andrew Thompson wrote:
| > I was stumbling around Sun's site the other
| > night looking for API docs for the com.sun.tools
| > packages, but could not find any.
....
| They're not documented because they're not supported as APIs.
We expect to
| document com.sun.tools.javac.Main in 1.5 (Tiger), but not most
of the javac
| internals.

Cool! The use of 'We' indicates that you
are an employee of Sun. Do I understand
that correctly?

I don't need the exotic and arcane 'internal' classes,
just an entry point into the main process, ...with
the option of getting the output would be nice.

I am not ure what the Main class covers, so I'll
ask specifically, will these docs cover:
javac (we've already deteremined 'yes')
java
javadoc
jar
jarsigner..

[ Ultimately I'd like the server to accept a zip
of source and provide a JWS app. back.. ]
 
A

Andrew Thompson

"Roedy Green" <[email protected]>
wrote in message
| On Sun, 04 Jan 2004 17:25:33 GMT, "Andrew Thompson"
....
| Perhaps you want to find out how for example to call javac.exe
as a
| class, not on the command line, using the Java API??

Yup. I actually want to call it on
a full java (JSP/Servlets) web server

| In that case, there are no official docs, but there are
unofficial
| ones people have like Dion Gillard have created by decompiling.

Neal Gafter also mentioned that partial
docs were expected in 1.5. I'd like to check
any (read 'Dion's') docs now, and get further
info from 'the horses mouth' when it is released.

Searched on the net and found lots
of references to Dion Gillard but not
the docs, do you have a link handy?

(I _think_ I have a valid email address for
him, and his blog address, just thought I'd
check here first..)
 
N

Neal Gafter

Andrew said:
| Andrew Thompson wrote:
| > I was stumbling around Sun's site the other
| > night looking for API docs for the com.sun.tools
| > packages, but could not find any.
...
| They're not documented because they're not supported as APIs.
We expect to
| document com.sun.tools.javac.Main in 1.5 (Tiger), but not most
of the javac
| internals.

Cool! The use of 'We' indicates that you
are an employee of Sun. Do I understand
that correctly?

Yes. I maintain javac.
I don't need the exotic and arcane 'internal' classes,
just an entry point into the main process, ...with
the option of getting the output would be nice.

See JSR199 and <http://groups.yahoo.com/group/javax_compiler/>.
I'm sorry to say most of what is desired won't happen in 1.5. However, try
using this:

package com.sun.tools.javac;
public class Main {
public static int compile(String[] args, PrintWriter out);
}
I am not ure what the Main class covers, so I'll
ask specifically, will these docs cover:
javac (we've already deteremined 'yes')
Yes.

java

Um. The API docs already document all the public APIs. There is no "main"
entry point for the VM, or rather any class can be an entry point.
javadoc
jar
jarsigner..

Not in 1.5.
 
A

Andrew Thompson

| Andrew Thompson wrote:
| > | Andrew Thompson wrote:
| > | > | > I was stumbling around Sun's site the other
| > | > night looking for API docs for the com.sun.tools
| > | > packages, but could not find any.
....
| See JSR199 and <http://groups.yahoo.com/group/javax_compiler/>.
| I'm sorry to say most of what is desired won't happen in 1.5.
However, try
| using this:
|
| package com.sun.tools.javac;
| public class Main {
| public static int compile(String[] args,
PrintWriter out);
| }

Great! (mutters) I can redirect the otuput
to a file, reload it, match it up with the code..
online compiler, hear we come!

| > I am not ure what the Main class covers, so I'll
| > ask specifically, will these docs cover:
| > javac (we've already deteremined 'yes')
|
| Yes.
|
| > java
|
| Um. The API docs already document all the public APIs. There
is no "main"
| entry point for the VM, or rather any class can be an entry
point.

D'uh! I'm having an attack of "the Stupid's"
....somebody slap me.

| > javadoc
| > jar
| > jarsigner..
|
| Not in 1.5.

....hmm. I can do without javadoc, that almost
seems redundant if I can pull the source code
straight from a zip/jar archive, format it, and
display it on the net.

I can replace jar, I have already managed to
write my own primitive 'jartool' using the
standard classes..

jarsigner would be _very_ handy,
but ..one step at a time. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top