Inject my code into someone else's JNLP app?

C

Chris Kelly

I need to modify someone else's JNLP app which is downloaded from
their website, but I can't ask them to make the changes I need.
Instead, I need to somehow get my code into their app. For instance, I
have the source code of their main class and I'd like to modify their
source and then have my modified version be used instead of the one
that's in their app. I'm using JRE 1.6.3 on Windows, and I have
complete control over that setup.

So far I've tried downloading all their jars, putting them in one big
jar, and then self-signing the new jar. Although less than optimal,
that would be one way to inject my code. That doesn't seem to have
worked for an unknown reason.

However, is there another way to do this that would be easier to
update? For instance, one complicated possibility would be to use a
proxy server to change the JNLP file as it's downloaded to include a
local jar containing a new version of their main class. If the user
has to click an extra dialog that's OK, but it doesn't seem like the
latest version of the JRE has a version of JNLP that allows jars
signed by different parties.

I've also tried to use an extension jar containing a class I modified,
resulting in a NoClassDefFoundError for a class used by the class I
modified.

A possibility I haven't tried yet involves creating a custom version
of javaw.exe that would pass in my own command line arguments, or
using JDPA. If there are easier/better ways please let me know.
 
C

Chris Kelly

Where? (URL for the website and/or app.)

Unfortunately, I can't give out the URL, but it's something that a
registered user of an app wants me to figure out for them.
 
A

Andrew Thompson

Unfortunately, I can't give out the URL,

Pity. These things are far simpler to figure
if we can see the details of the app.
..but it's something that a
registered user of an app wants me to figure out for them.

The registered user is probably better off
approaching the app. authors/deployers directly.
If it makes sense for one registered user, it might
make (business) sense for others as well. Besides
that, the deployers are the ones in the best position
to alter the app.
 
S

Silvio Bierman

Chris said:
I need to modify someone else's JNLP app which is downloaded from
their website, but I can't ask them to make the changes I need.
Instead, I need to somehow get my code into their app. For instance, I
have the source code of their main class and I'd like to modify their
source and then have my modified version be used instead of the one
that's in their app. I'm using JRE 1.6.3 on Windows, and I have
complete control over that setup.

So far I've tried downloading all their jars, putting them in one big
jar, and then self-signing the new jar. Although less than optimal,
that would be one way to inject my code. That doesn't seem to have
worked for an unknown reason.

However, is there another way to do this that would be easier to
update? For instance, one complicated possibility would be to use a
proxy server to change the JNLP file as it's downloaded to include a
local jar containing a new version of their main class. If the user
has to click an extra dialog that's OK, but it doesn't seem like the
latest version of the JRE has a version of JNLP that allows jars
signed by different parties.

I've also tried to use an extension jar containing a class I modified,
resulting in a NoClassDefFoundError for a class used by the class I
modified.

A possibility I haven't tried yet involves creating a custom version
of javaw.exe that would pass in my own command line arguments, or
using JDPA. If there are easier/better ways please let me know.

Hello Chris,

If this where generally feasible it would open up very interesting
possibilities on the Web :)
The only thing I can think of is implementing some kind of proxy (an
HTTP proxy comes to mind) and adjust the users network settings in such
a way that they access the application through the proxy.
If you find a way to do all this from the outside please post your
solution here. I am sure this would interest people.

Regards,

Silvio
 
A

Andrew Thompson

...
If this where generally feasible ...

For some applications it would be relatively
simple, for others, damn near impossible. For
still others, it might be quite simple, but
effectively prohibited by the EULA.

...
If you find a way to do all this from the outside please post your
solution here. I am sure this would interest people.

If that assertion is correct, it might also
apply to the first thread started on the Sun
forums as well.
<http://forum.java.sun.com/thread.jspa?threadID=5259523>
Though there, noone seems inclined to help with
what might seem, to the overly suspicious*, to be
an attempt to circumvent parts of an application
in a way that would violate the EULA of that app.

* And yes, I am one of them.
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top