I'm sorry if this is in the wrong forum but I couldn't find a place for questions on java web start. Anyway...
I have a java application uploaded as a JWS program: Maze Mania
Under the MazeMania folder, I have:
MazeMania.html
MazeMania.jar
MazeMania.jnlp
I also have a "classes" folder in here with all my un-jarred class files in the appropriate packages (folders), but I don't think they're being used.
My html file looks like this:
<html> <head> <title>Maze Mania</title> </head> <body> <script src="http://www.java.com/js/deployJava.js"></script> <script> // using JavaScript to get location of JNLP file relative to HTML page var dir = location.href.substring(0, location.href.lastIndexOf('/')+1); var url = dir + "MazeMania.jnlp"; deployJava.createWebStartLaunchButton(url, '1.6.0'); </script> </body> </html>
My jnlp file looks like this:
<?xml version="1.0" encoding="UTF-8"?> <jnlp spec="1.0+" codebase="http://www.shahspace.com/JWS/MazeMania" href="MazeMania.jnlp"> <information> <title>Maze Mania</title> <vendor>Gibran shah</vendor> </information> <resources> <!-- Application Resources --> <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/> <jar href="MazeMania.jar" main="true" /> </resources> <application-desc name="Maze Mania" main-class="classes.Main"> </application-desc> <update check="background"/> </jnlp>
The jar file was created with the following command:
jar cvf MazeMania.jar classes
This was just above the classes folder. In the folder was the class file Main.class along with all subfolders containing class files belonging to whatever package was named after that folder. The jar file was then uploaded to my server.
The problem is that when I try to launch this from the website, it says that it cannot find the Main class. Can anyone see why?
P.S. - I tried changing main-class="classes.Main" to main-class="Main" but I get the same error.