Hello, I’ve written a car racing program , WIP but I want to test running from the Web.
I compiled the program, copied the dist folder to my localhost folder and created a simple html file to launch the program.
On pressing the [Lanch] button I get the following
HTTP Error 404.3 - Not Found
The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.
Most likely causes:
It is possible that a handler mapping is missing. By default, the static file handler processes all content.
The feature you are trying to use may not be installed.
The appropriate MIME map is not enabled for the Web site or application. (Warning: Do not create a MIME map for content that users should not download, such as .ASPX pages or .config files.)
If ASP.NET is not installed.
What do I need to do now ?
PS Do I need to sign the application in order to run on my own PC ? Are there docs about how to sign a JME application ?
Is it possible that you browser does not knows what .jnlp extension is? Check if you have enabled java content in browsers (Java control panel).
Anyway, if you want to use JNLP or applets you need to sign your code with certificate or tell your users to lower the security settings, which is a very bad idea. Unfortunately Java is a bad choice for browser apps.
When the link is clicked, a page appears with the launch button. The source code for this page is
<!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>
While Java Web Start and JNLP rely on existing technologies like HTTP
and a Web server, there is one configuration issue that must be
addressed for JNLP to work properly. It isn’t always sufficient to just
create a .jnlp file and put it on your Web
server with the rest of the application; the Web server must be
configured to return the proper MIME type for the JNLP content – and
that MIME type must be application/x-java-jnlp-file.
Try on another web server, contact your server’s administrator or configure it, if it’s your own server.
Thanks for putting me on the right track. I just had to add a MIME type for .jnlp using IIS manager. It still won’t run because of security, but that’s another issue. I suppose that means I need to buy a signing certificate from someone ? What’s the procedure for doing this ?
Find an certificate authority and buy one, look for ‘code signing certificates’. There are many step by step instructions about how to install such certificate. I’m not able to tell you how, because I just don’t remember, it is not something that you do every day