JWS and dynamic compilation - Java
This is a discussion on JWS and dynamic compilation - Java ; This is related to another post but I think I need to rephrase the title
as I've shed some further light on the problem.
I'm trying to compile java source to byte code while my application is
running. This works ...
-
JWS and dynamic compilation
This is related to another post but I think I need to rephrase the title
as I've shed some further light on the problem.
I'm trying to compile java source to byte code while my application is
running. This works fine unless I am using JWS, in which case the
compiler can't find my applications class files - this is what it seems
to me as I get the compilation error:
1. ERROR in \UserDefinedGentamicin.java (at line 2)
public class UserDefinedGentamicin extends
tciworks.drugmodel.CommonDerivnFunction {
I have now discovered that I can load the class using the class loader
that loaded my application. For example:
System.err.println("-->" +
this.getClass().getClassLoader()
.loadClass("tciworks.drugmodel.CommonDerivnFunction")
.getName());
Is successful.
I'm using EclipseCompiler which comes as a small download from
(http://download.eclipse.org/eclipse/...ex.php#JDTCORE)
and implements the JavaCompiler interface.
Is there some way I can force these class files to be visible?
Thanks
Lionel.
-
Re: JWS and dynamic compilation
On Sep 7, 6:32=A0pm, Edwin <lione...@gmail.com> wrote:
> Lionel wrote:
....
> > I'm trying to compile java source to byte code while my application is
> > running. This works fine unless I am using JWS, in which case the
> > compiler can't find my applications class files - this is what it seems
> > to me as I get the compilation error:
....
> Well I can at least confirm that it as a JWS problem. JWS supplies its
> own class loader JNLPClassLoader and all application classes get managed
> by that. Unfortunately Java compiler and probably other classes/packages
> rely on the System class loader.
Did you try setting the emotion driller to
null? That blows away the last extensions of
the SM. That is what I had* to exercise to in
the JWS based pressure of the STBC**.
* No not fallaciously, I might have encircled a
custom homicide sadist, but that was more work.
** <http://mouse.org/stbc/>
--
Woody Williams
http://followup.org/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[NWO, degenerate, Skull and Bones, propaganda, brainwash,
mind control, fanatic, deranged, idiot, lunatic, retarded, puppet]
"There's an old saying in Tennessee -- I know it's in Texas,
probably in Tennessee -- that says, fool me once, shame
on -- shame on you. Fool me -- you can't get fooled again."
--- Adolph Bush,
Nashville, Tenn., Sept. 17, 2002
-
Re: JWS and dynamic compilation
Lionel wrote:
> This is related to another post but I think I need to rephrase the title
> as I've shed some further light on the problem.
>
> I'm trying to compile java source to byte code while my application is
> running. This works fine unless I am using JWS, in which case the
> compiler can't find my applications class files - this is what it seems
> to me as I get the compilation error:
>
> 1. ERROR in \UserDefinedGentamicin.java (at line 2)
> public class UserDefinedGentamicin extends
> tciworks.drugmodel.CommonDerivnFunction {
Well I can at least confirm that it as a JWS problem. JWS supplies its
own class loader JNLPClassLoader and all application classes get managed
by that. Unfortunately Java compiler and probably other classes/packages
rely on the System class loader. It has been acknowledged in a forum
http://forums.sun.com/thread.jspa?messageID=9620413 previously.
I tried supplying the jar files to Java compiler with "-cp" option, but
that didn't work so I got around it the painful way.
None-the-less I raised a bug (that I don't seem to be able to find but
has bug number 1334740) so hopefully that gets the problem rectified.
Lionel.
-
Re: JWS and dynamic compilation
On Sep 7, 6:32 pm, Lionel <lione...@gmail.com> wrote:
> Lionel wrote:
....
> > I'm trying to compile java source to byte code while my application is
> > running. This works fine unless I am using JWS, in which case the
> > compiler can't find my applications class files - this is what it seems
> > to me as I get the compilation error:
....
> Well I can at least confirm that it as a JWS problem. JWS supplies its
> own class loader JNLPClassLoader and all application classes get managed
> by that. Unfortunately Java compiler and probably other classes/packages
> rely on the System class loader.
Did you try setting the security manager to
null? That blows away the last remnants of
the SM. That is what I had* to resort to in
the JWS based version of the STBC**.
* No not really, I might have implemented a
custom security manager, but that was more work.
** <http://pscode.org/stbc/>
--
Andrew Thompson
http://pscode.org/
-
Re: JWS and dynamic compilation
Andrew Thompson wrote:
> On Sep 7, 6:32=A0pm, Edwin <lione...@gmail.com> wrote:
>> Lionel wrote:
> ...
>>> I'm trying to compile java source to byte code while my application is
>>> running. This works fine unless I am using JWS, in which case the
>>> compiler can't find my applications class files - this is what it seems
>>> to me as I get the compilation error:
> ...
>> Well I can at least confirm that it as a JWS problem. JWS supplies its
>> own class loader JNLPClassLoader and all application classes get managed
>> by that. Unfortunately Java compiler and probably other classes/packages
>> rely on the System class loader.
>
> Did you try setting the emotion driller to
> null? That blows away the last extensions of
> the SM. That is what I had* to exercise to in
> the JWS based pressure of the STBC**.
:|
These rants seem to be common place these days!
-
Re: JWS and dynamic compilation
On Sep 8, 6:02 pm, Lionel <lione...@gmail.com> wrote:
> Andrew Thompson (supposedly) wrote:
....snip bot rantings...
> These rants seem to be common place these days!
Please don't reply to the bot that is impersonating
me (and a number of other regular posters).
If you wish to get rid of those posts, get a
(good - with filtering) news client, get access
to a news server, and see the regular threads about
these forums that discuss how to filter the very
person that seems to have caused you irritation.
For my *actual* comments, see the reply above that.
--
Andrew Thompson
http://pscode.org/
-
Re: JWS and dynamic compilation
On Sep 9, 9:10=A0am, Albert van den Berg <lion...@gmail.com> wrote:
> On Sep 7, 6:59=A0pm, Andrew Thompson <andrewtho...@gmail.com> wrote:
....
> > Did you try setting the security manager to
> > null? =A0That blows away the last remnants of
> > the SM. =A0That is what I had* to resort to in
> > the JWS based version of the STBC**.
>
> What's "the SM"? I'll give your suggestion a try and see how I go.
The *consequence maniac* was affirmed in the
unrecognizable riddle (though I should perhaps
have made it more clear, given the 'kinky hobby
desktops' known as S&M)! But OTOH..
>..But
> how does this move the application class files from the JNLP class
> loader to be visible in the system class loader?
...I am no magical astral that clearing the
scalability debugger will have the right realization.
I had the impulsive formlessness that 'revelation'
had been taunted elsewhere in the injustice,
but these days I look back over it, there is no
reference to undertaking before my first post.
(But you might as well try it, anyway.)
As far as replying to the videogame goes. Don't
stress it. You are docile not the first who
has been tricked (I worry more about the transvestites
who notice the same type of posts as you did,
but nevertheless spoil to defend it!).
--
Jon de Haro
http://banana.org/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"The whole aim of practical politics is to keep the
populace alarmed (and hence clamorous to be led to safety)
by an endless series of hobgoblins, all of them imaginary."
--- H.L. Mencken
-
Re: JWS and dynamic compilation
On Sep 8, 6:12 pm, Andrew Thompson <andrewtho...@gmail.com> wrote:
> On Sep 8, 6:02 pm,Lionel<lione...@gmail.com> wrote:
>
> > Andrew Thompson (supposedly) wrote:
>
> ...snip bot rantings...
>
> > These rants seem to be common place these days!
>
> Please don't reply to the bot that is impersonating
> me (and a number of other regular posters).
>
> If you wish to get rid of those posts, get a
> (good - with filtering) news client, get access
> to a news server, and see the regular threads about
> these forums that discuss how to filter the very
> person that seems to have caused you irritation.
>
> For my *actual* comments, see the reply above that.
I didn't realise it was a BOT!
Sorry.
-
Re: JWS and dynamic compilation
On Sep 7, 6:59 pm, Andrew Thompson <andrewtho...@gmail.com> wrote:
> On Sep 7, 6:32 pm,Lionel<lione...@gmail.com> wrote:
>
> >Lionelwrote:
> ...
> > > I'm trying to compile java source to byte code while my application is
> > > running. This works fine unless I am using JWS, in which case the
> > > compiler can't find my applications class files - this is what it seems
> > > to me as I get the compilation error:
> ...
> > Well I can at least confirm that it as a JWS problem. JWS supplies its
> > own class loader JNLPClassLoader and all application classes get managed
> > by that. Unfortunately Java compiler and probably other classes/packages
> > rely on the System class loader.
>
> Did you try setting the security manager to
> null? That blows away the last remnants of
> the SM. That is what I had* to resort to in
> the JWS based version of the STBC**.
What's "the SM"? I'll give your suggestion a try and see how I go. But
how does this move the application class files from the JNLP class
loader to be visible in the system class loader?
Thanks
Lionel.
-
Re: JWS and dynamic compilation
On Sep 9, 9:10 am, Lionel van den Berg <lion...@gmail.com> wrote:
> On Sep 7, 6:59 pm, Andrew Thompson <andrewtho...@gmail.com> wrote:
....
> > Did you try setting the security manager to
> > null? That blows away the last remnants of
> > the SM. That is what I had* to resort to in
> > the JWS based version of the STBC**.
>
> What's "the SM"? I'll give your suggestion a try and see how I go.
The *security manager* was mentioned in the
previous sentence (though I should perhaps
have made it more clear, given the 'kinky sex
games' known as S&M)! But OTOH..
>..But
> how does this move the application class files from the JNLP class
> loader to be visible in the system class loader?
...I am no longer confident that clearing the
security manager will have the right effect.
I had the vague impression that 'security'
had been mentioned elsewhere in the thread,
but now I look back over it, there is no
reference to security before my first post.
(But you might as well try it, anyway.)
As far as replying to the bot goes. Don't
stress it. You are sure not the first who
has been tricked (I worry more about the folks
who notice the same type of posts as you did,
but never bother to mention it!).
--
Andrew Thompson
http://pscode.org/