Search code examples
javaidejava-web-start

Any Java IDE which can quickly establish a local project based on a remote JNLP file for instant debugging?


Given a remote JNLP which works (all jars are available etc) but you need to run a debug session on the code.

Is there any facility that easily allows you to create a local project in ANY reasonably modern IDE which consists of a local copy of the resources stated in the JNLP and can run said code in debug mode? Assume that a decompiler is available so it is just a matter of getting the debug session running.

Are there any IDE's (Eclipse, Netbeans, IntelliJ, JDeveloper, etc. etc. - even a commercial offering) which can do this just given the JNLP URL?


Solution

  • I have a pre-defined project in Eclipse which is blank except for a utility that parses a JNLP file and downloads all the jars specified in the jnlp codebase. Optionally, you can replace any jars with updated code you want to test here. It uses reflection to add all the jars to the classpath (which is a hack) and then reflectivly invokes the main method of the class specified as the main-class in the JNLP with any arguments.

    Unfortunately I can't share the source for this but it only took me a day to get it running.

    The class path hack is available here: How should I load Jars dynamically at runtime?

    Should work well with any debugging.