From: Mark_Galeck on
Is there a way to run an applet's .java file, without compiling it
to .class file? (the java command expects main)

thank you,

Mark
From: Abhijat Vatsyayan on
Mark_Galeck wrote:
> Is there a way to run an applet's .java file, without compiling it
> to .class file? (the java command expects main)
>
> thank you,
>
> Mark
What do you really need to do? Applets do not need a main for starting
up. You can compile and launch an applet using appletviewer (or a
supported browser).
Abhijat
From: conrad on
On Jul 16, 2:05 pm, r...(a)zedat.fu-berlin.de (Stefan Ram) wrote:
> Mark_Galeck <mark_galeck_spam_mag...(a)yahoo.com> writes:
> >Is there a way to run an applet's .java file, without compiling it
> >to .class file?  (the java command expects main)
>
>   IIRC, one can use the in-memory-compilation capabilities of
>   the JDK to load a class compiled from a source file without
>   the creation of a class file in the filesystem.

However, that does not satisfy the OP's condition, that it not be
compiled to a class file. That condition is, of course, impossible.

--
Lew
From: Mark_Galeck on
>that it not be
> compiled to a class file.  That condition is, of course, impossible.


Thank you Lew. Regarding IIRC's answer - I did not know you can
compile .java file without the resulting .class file. So let me
restate the question: Is there a way to run an applet's .java file,
that is, interpret it from the source, without previously compiling it
at all?

Is this also "of course" impossible, Lew? Also, could you please
expound on why "of course". Because, one can intepret a .java
application file without compiling - this shortens the debugging
cycle. So why not an applet?

Thank you for your insights. Mark
From: Lew on
Mark_Galeck wrote:
> Is this also "of course" impossible, Lew? Also, could you please
> expound on why "of course". Because, one can intepret a .java
> application file without compiling - this shortens the debugging
> cycle. So why not an applet?

One can? How?

--
Lew