Certificate for web publication


I’ve written a BasicGame which I want to publish on the web.

I got some space on Amazon S3 and copied my program there and tried to use the Launch.html file to get it running.

Then ran up against security issues and said unsigned or self signed programs can’t be run.

As you can see I’m not a professional IT person so can someone point me to a tutorial of what I need to do to get this running off the Web ?

I assume I need a digital certificate ? How do I get one and then how do I sign a JME3 program with it ?

Presumably this is a common problem and others must have had it, but I couldn’t find much on searching this forum.

There needs to be a newbie tutorial.

Thank you all.

cost: https://www.digicert.com/code-signing/code-signing.htm
how to: https://www.digicert.com/code-signing/java-code-signing-guide.htm

Are you trying to use Java applets? If so - forget it, don’t go this way. Applets are dead.

1 Like

Whatever Launch.html runs. If that runs an applet, what are the alternatives ?

This is launch.html

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
>     <head>
>         <title>Test page for launching the application via JNLP</title>
>     </head>
>     <body>
>         <h3>Test page for launching the application via JNLP</h3>
>         <script src="http://java.com/js/deployJava.js"></script>
>         <script>
>             deployJava.createWebStartLaunchButton("launch.jnlp")
>         </script>
>         <!-- Or use the following link element to launch with the application -->
>         <!--
>         <a href="launch.jnlp">Launch the application</a>
>         -->
>     </body>
> </html>

Ah, JNLP… As far as I remember I’m using it on my first game. It downloads and launch an jar file so user does not need to do anything manually. But it still needs the code to be signed. No, it is not the applet.

The alternative is to pack your game together with all necessary files, including JRE files, to a self extracting archive/installer. This have a great advantages - end user does not need to have java installed and you don’t need to sign the code.

Thanks. The self extracting archive sounds the way to go.

Do you have any tips on the best way to do this ?

Does [GameName]-Windows.zip have all the necessary files to run without a client Java installed ? If so then the only thing to do is turn that zip file into an exe file to self extract. How to do this ?

Use Launch4j or Janel to wrap jar or just launch it using exe file.
JVM is just another exec, it needs to be attached to your files, just add the whole jre folder into your installation/archive and provide a correct path to that jre in Launch4j/Janel. Both of them have an option to use bundled JRE, so this is an easy task. If you are beginner then try with Launch4j first, all you need is to run it and fill the necessary fields.

1 Like

Thanks I will try that.

I tried Launch4J and although it created the exe file, when I ran the program from that exe the screen stayed black (although it did show a splash screen).

What am I missing (apart from brains) ?

If I run this program from the JMonkey IDE but right clicking on the Main file and selecting Run File the program works properly.

If I Clean and Build then extract the Windows.zip file from the dist folder to another program then run the exe file within that, it runs, but when I ebter the game loop the screen stays black. I can’t work out why.

Could be any of 100 things we can’t see.

Make a simple test project of just the blue cube and see if it works. (Probably will.) Then start adding stuff like your game and see what finally breaks.

One common case for new users is doing something strange with assets. Don’t know if that is what’s going on here as I can’t see your project setup.

Did you try to launch the exe from the prompt and see if it prints some useful informations?

No messages on prompt when program run.