[JMP] Getting my .jnlp to deploy

I apologize if this is a totally noob question, I have never worked with .jnlp before so this is a first time learning experience for me.

Alright, so I set .jnlp distribution to be built through JmonkeyPlatform.

Codebase = web application deployment ($$codebase), self signed and use applications main class are selected.



Alright, so now I go to the web server side:



I uploaded

dist/lib/*

dist/launch.html

dist/launch.jnlp

and

dist/MyGame.jar (i think this is needed right?)



So, I open up launch.html through my firefox across the internet, everything looks as expected. I get the generic “Test page for launching the application via JNLP” with the Launch button



the problem is, when I click the launch button, it simply takes me to launch.jnlp as if it was an .html page, and shows me all the code. It does not run anything.



So, I am just curious what I am doing wrong (probably many things because this is my first time).

Thanks for any help! :slight_smile:

The codebase is wrong, you should select “http deployment” and enter the root url (incl folder) of the place of the jnlp there.

Ok, I think I am missing something here. Is there any configuration or systems which need to be running for .jnlp to work on my webserver?



I got

lib folder

launch.jnlp

launch.html

and

MyGame.jar



all at mywebsite/jnlp/

now, i configure in JMP as follows:



user defined (e.g. html deployment)

for codebase i have tried http://www.mywebsite.com/jnlp/

http://www.mywebsite.com/jnlp

and

http://www.mywebsite.com/jnlp/launch.jnlp



*self signed and Application Descriptor selected



none of these have worked, and the same exact thing happens where it displays the code of launch.jnlp

is there something not running correctly on the webserver?



edit::

so i can get it to run locally if i set it to a local deployment and run launch.html, the .jnlp file deploys just fine. NOTE: problem is still not fixed

this makes me even more curious, is the web server telling it to view the .jnlp instead of running it or something? is that even a configuration?



Thanks a ton!!

Yes, your web server is misconfigured. Its about MIME types

ok, so I am now 1 step closer.



i set up the MIME type application/x-java-jnlp-file for all .jnlp extensions, so now it opens the jnlp with the java webstart launcher, but once it downloads the .jnlp, it throws an error, “Unsigned entry in resource: assets.jar”



I dont quite understand what signing means or is. Is anyone able to educate me on what it is and how I may fix it?



Thank you. :slight_smile:

Signing is embedding your public key into the jar files so people know they are from you, you should see the signing in the output of your build process, check if assets.jar gets signed too.

ok, so I have looked into the problem



when I build this is displayed,

[java]C:UsersadminjMonkeyProjectsSpacebuildassets.jar is a directory or can’t be read. Not copying the libraries.

Not copying the libraries.[/java]



Ok, so I checked that out and it seems there is no assets.jar at that location. So I copied it in there. The problem is, every time i build, it deletes assets.jar out of the build directory and continues to throw the above error. It seems if I turn off Applet creation, it does not blow this file away.



Alright, so I build and upload without losing assets.jar

I still get the same error in firefox, and the output of the build says:

[java]Signing JAR: C:UsersadminjMonkeyProjectsSpacedistlibassets.jar to C:UsersadminjMonkeyProjectsSpacedistlibassets.jar as nb-jws



Warning:

The signer certificate will expire within six months.

Enter Passphrase for keystore: Enter key password for nb-jws: [/java]



So, what can I do about this, applet deleting stuff and signing?



Thanks, sorry for such an ongoing problem.

ok sorry, I forgot to do one thing which puts us very close to completing this problem.



So, I forgot to upload the new /lib folder. Now that that is done, firefox is no longer throwing any errors. The problem still happens however that after the jnlp downloads my program, nothing deploys (firefox only). On internet explorer, however, it deploys.



Also, Applet Creation deleting stuff in /build folder still remains.

Thanks!

Did you by any chance also import an eclipse project?

I at one point might have. But this project is not from eclipse. What does that do?

Idk, some guy is having problems with his eclipse imported project but I guess there is no problem with that.