Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Testing JNLP Applications using JNLP APIs: can it be done?

843802Mar 23 2007
I've found out on my own skin that it's very hard to test JNLP applications.

This is because the jnlp services such as PersistenceServiceImpl and BasicServiceImpl get only loaded at JVM startup time when java is launched from the javaws executable, which needs a jnlp file. This makes testing jnlp-based classes very hard, since automated testing or debugging with an IDE is out of discussion.

I've tried manually including my Mac OS X Java6 javaws.jar (which contains the system-dependent implementation classes for the JNLP interfaces) and manually initializing and loading the services, but it all fails horribly because of several missing things (mostly missing system properties, which impl classes expect, and are probably set up by javaws or some other yet-to-be-found class).

It can PROBABLY be done by tinkering with it and slowly adding everything needed by going exception and after exception manually putting in the tidbits impl classes expect, but it's for sure a long and tedious work, and I guess it would be strongly platform-dependent (for example, I've noticed the impl classes in javaws varies consistently on the various platforms, and so do JNLP expected system properties).

Or, maybe, if I am REALLY lucky, I can find a JNLPInitializerWhatever class, with a 'startmeup' method for setting everything. Dreaming is not a crime you know? :P

Any help here is SERIOUSLY appreciated, I'm currently losing hours and hours each day because I have to deploy a full JNLP java package in order to test jnlp-enabled application, and I can't debug them at all.

Anyone knows a solution, or can give me some hints about this problem?

Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2007
Added on Mar 23 2007
0 comments
258 views