This discussion is archived
11 Replies Latest reply: Feb 12, 2013 3:22 AM by 902665 RSS

Bad package name of main-class

902665 Newbie
Currently Being Moderated
Hello guys,

after our company have update the jre to the actual version (7u13), our applet throws the following error.

ExitException[ 3]java.lang.SecurityException: Bad package name of main-class
     at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
     at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
     at java.lang.Thread.run(Unknown Source)

our jar file look like this:

jar
-gui
--Main.fx

To change the name of the package (gui to gui2 as Example) didnt work. How can i solve this problem ?

Hope anybody can help us
  • 1. Re: Bad package name of main-class
    Kayaman Guru
    Currently Being Moderated
    Is this JavaFX?

    What is the package name of Main?
  • 2. Re: Bad package name of main-class
    902665 Newbie
    Currently Being Moderated
    Yes, it is javafx (1.3.1) , but i thought, it is a general problem, so i posted it here in this forum. Our new version of this applet(with javafx2.2) is not ready to use at the moment, so i must fix this problem.



    the jar file have the name Persoware. So the jar file look like this:

    Persoware.jar
    - gui (Folder /package-name)
    --Main.fx

    the Main.fx look like this:
    package gui;
    import controls.CustomStage;
    import persoware.Versioning;
    
    /**
     * @author maier
     */
    
    public class Main extends CustomStage{
    
        init{
            var design:MainWindow = MainWindow{};
            this.title = "Persoware {Versioning.getMajorRelease()}.{Versioning.getMinorRelease()}";
            this.scene = design.getDesignScene();
        }
    }
    
    function run (): Void {
        Main{};
    }
  • 3. Re: Bad package name of main-class
    379208 Newbie
    Currently Being Moderated
    I don't have a solution yet, but we are also seeing the same exception when launching a JavaFX 1.3.1 based app via Java Web Start.
  • 4. Re: Bad package name of main-class
    EJP Guru
    Currently Being Moderated
    What are you guys specifying as the main class?
  • 5. Re: Bad package name of main-class
    902665 Newbie
    Currently Being Moderated
    the main-class is in my opinion the class, which have the run-method to start the hole applet. In my case it is the Main.fx .
  • 6. Re: Bad package name of main-class
    EJP Guru
    Currently Being Moderated
    How are you specifying it? What are you writing?
  • 7. Re: Bad package name of main-class
    902665 Newbie
    Currently Being Moderated
    My Main.fx - code can you see in my second post here in this thread. In Netbeans, under projectproperties-> run, you must register it.
  • 8. Re: Bad package name of main-class
    380405 Newbie
    Currently Being Moderated
    The main-class used in our JavaFX 1.3.1 based app launched by WebStart is:
    <application-desc main-class="com.sun.javafx.runtime.main.Main">
  • 9. Re: Bad package name of main-class
    EJP Guru
    Currently Being Moderated
    899662 wrote:
    My Main.fx - code can you see in my second post here in this thread.
    Once again that's not what I asked. I can see what you've already posted.
    In Netbeans, under projectproperties-> run, you must register it.
    Register what? That's what I asked before. Twice.

    Your question is about 'bad package name of main-class', yet you haven't told us what the value of the main-class attribute actually is. You can't possibly get any assistance here until you do.
  • 10. Re: Bad package name of main-class
    386817 Newbie
    Currently Being Moderated
    This bug is apparently caused by a security update in Java 7U13. It now blocks unsigned, sandboxed applications (either applets or Java WebStart applications) from running. The error that is shown is a bit deceptive but at the root it is a signing issue.

    To work with it you need to sign your jars and add the following to your jnlp file:

    <security>
    <all-permissions/>
    </security>

    Unfortunately the alternative seems to be to stick with an earlier version of 7 or use JRE 6.


    I have not got my project working properly yet with U13 but this seems to be the way to go.
  • 11. Re: Bad package name of main-class
    902665 Newbie
    Currently Being Moderated
    Sorry, some days, i stand right beside me. ;)


    The main class is the same like csiourba posted before. I tried the solution of pmgrundy, but it didn't work for me. Actually, we will still work with 7u11 and try the next update, which will come in the next days.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points