Hi,
I have a Java application that creates a temp file, calls
sun.tools.javac.Main, and executes the class.
The class that it executes makes reference to some classes in the
application. Everything is fine.
Now I'm trying to do the same in a signed applet. I can invoke the
compiler, however I can't get it to notice the classes in the jar since
it doesn't have the class files. Can I point the compiler towards the
jar that it is being executed from?? Can javac even compile against a
jar or does it need .class files?
Thank you in advance for help on this complicated question.
Dan
Raymond DeCampo - 06 Mar 2006 21:31 GMT
> Hi,
>
[quoted text clipped - 9 lines]
> jar that it is being executed from?? Can javac even compile against a
> jar or does it need .class files?
A couple of things to try:
1) Put a URL to your jar file in the classpath (e.g.
http://localhost/myApplet.jar)
2) Download the applet file locally and point the classpath at the
temporary file.
3) Try to discover where the java plug-in keeps its temporary copy of
your jar file and use that. (This may be fragile across platforms,
versions, etc.)
HTH,
Ray

Signature
This signature intentionally left blank.
daniel.w.gelder@gmail.com - 06 Mar 2006 21:45 GMT
I found a way. I have to compile the class files along with the temp
file....how annoying! As if javac wasn't slow enough already.