Results 1 to 2 of 2
  1. #1
    gib65 is offline Member
    Join Date
    Jun 2010
    Rep Power

    Default java web start not working

    I know this is the forum for java applets and not JWS, but applets are the closest thing to JWS I could find on these forums. Please accept my apologies and move this to where it belongs if this is inappropriate.

    Also, this is a cross-post from here. I'm cross-posting because I need an answer to this ASAP and I don't seem to be getting one fast enough at (no offense to them :D).

    Anyway, here's the OP from there:

    I have a java application uploaded as a JWS program: Maze Mania

    Under the MazeMania folder, I have:


    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:

    Java Code:
    <title>Maze Mania</title>
    <script src=""></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');
    My jnlp file looks like this:

    Java Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" 
            <title>Maze Mania</title>
            <vendor>Gibran shah</vendor>
            <!-- Application Resources -->
            <j2se version="1.6+"
            <jar href="MazeMania.jar" main="true" />
             name="Maze Mania"
         <update check="background"/>
    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.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power


    I'm not sure, but can you do a web start program that isn't jarred?
    I don't think I've ever seen it.
    I think the whole point behind the resources section is to list all the jar files required to run the program, which includes the one with the program entry point (Main in your case).

Similar Threads

  1. web start in java
    By prabhug1987 in forum NetBeans
    Replies: 3
    Last Post: 04-28-2011, 10:39 AM
  2. Replies: 1
    Last Post: 01-18-2011, 07:27 PM
  3. Replies: 5
    Last Post: 03-20-2009, 11:04 PM
  4. Java Web Start
    By hitmen in forum New To Java
    Replies: 0
    Last Post: 03-11-2009, 12:42 PM
  5. Replies: 8
    Last Post: 05-28-2008, 07:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts