0

I've created a JLNP file for an application and can not get the main method to run.

I have a feeling that this is because I should be immediately reading data from an XML file located in the projects bin file, aswell as a few images.

My question is do I need to reference it in some way from the JNLP file because once I click the link in the HTML file, it brings up the security question to ask if you trust this source, and then once you click yes nothing happens.

I've only been introduced to this recently and this may be a stupid error but all tutorials I've been following only really look into the code and not any external files that may have been used with it.

test.JNLP:

 <?xml version="1.0" encoding="utf-8"?>
 <jnlp spec="1.0+"
  codebase="file:///C:/IzPack/bin/IndigoDataMapper"
  href="userLib/Test.jnlp">
<information>
    <title>Test Example</title>
    <vendor>indigo.co.uk</vendor>
    <homepage href="www.indigo.co.uk" />
    <description>A test to see if the data mapper will work</description>
    <description>Data Mapper Example</description>
</information>

<security>
    <j2ee-application-client-permissions />
</security>

<resources>
    <j2se version="1.6+" />
    <jar href="userLib/WMSDataMapper.jar"  main="true" />
    <jar href="userLib/bonecp-0.8.0.RELEASE.jar" />
    <jar href="userLib/forms-1.3.0.jar" />
    <jar href="userLib/guava-14.0.1.jar" />
    <jar href="userLib/IndigoLibraryAPI.jar" />
    <jar href="userLib/jt400.jar" />
    <jar href="userLib/junit.jar" />
    <jar href="userLib/log4j-1.2.17.jar" />
    <jar href="userLib/miglayout15-swing.jar" />
    <jar href="userLib/slf4j-api-1.7.5.jar" />
    <jar href="userLib/slf4j-log4j12-1.7.5.jar" />
</resources>

<application-desc main-class="uk.co.indigo.datamapperGui.Main" />

HTML Test Link:

<html>
<body>

  <p>
  <a href="C:\IzPack\bin\IndigoDataMapper\userLib\Test.jnlp">Launch DataMapper Application</a>
  </p>

</body>
</html>

Any tutorials/ Examples that include multiple JAR files aswell as external files, such as XML, would be greatly appreciated but i'll keep looking !

Thanks in advance

Nathan
  • 266
  • 2
  • 16
  • 1
    1) Be sure to check the JNLP using JaNeLA, available [here](https://drive.google.com/folderview?id=0B5B9wDXIGw9lUnJaUjA2cmlVRE0). 2) *"Examples that include multiple JAR files"* Well ..your does! Validate it then go with that *"..aswell as external files, such as XML"* The thing with JNLP/JWS resources is, ***everything*** needs to be in a Jar. Being an [tag:embedded-resource], the resource must be accessed by `URL` instead of `File`. See the [info page](http://stackoverflow.com/tags/embedded-resource/info) for the tag, for a way to form an `URL`. – Andrew Thompson Apr 01 '14 at 04:50
  • Great thanks for your comment, I may have to look at a different deployment method as I'd need an area on the hosts PC to be able to store the XML files/Enc files (ENC more important!) so they can be unique to each user. Original solution I had was to install it using IzPack so I guess its back to that ! Thanks for your help – Nathan Apr 01 '14 at 08:07
  • Funnily enough between the time of you responding and me seeing this, I've done exactly that. Great minds think alike and all that hah – Nathan Apr 01 '14 at 10:39

0 Answers0