This discussion is archived
4 Replies Latest reply: Mar 21, 2013 6:44 AM by 995795 RSS

Bad package name of main-class, javafx 1.3, java 7u15

995795 Newbie
Currently Being Moderated
Hello,

I'm facing the same problem as what I read in this previous thread from someone else:
Bad package name of main-class

I originally tried to hijack it and rip ownership of that thread away for my own issue but a kind forum moderator has split my post away to let it stand on its own, as I should have done to begin with.

My question is ...
... and I don't have any solution. I am using a javaFX app (1.3) which works perfectly with jre 1.6_11 and 1.7_11, but not with 1.7_15. The exception "Bad package name of main-class" is logged in the console.

I read on the Internet that fixes in java 1.7_13 cause problems to all self-signed applet. So I signed mine with a trusted certificate delivered by my company, and I checked what pmgrundy said 2 posts before, but it didn't solve the problem.

My jnlp file is corresponding to the example given in the official tutorial for applet deployment (http://docs.oracle.com/javafx/1.3/tutorials/deploy-applet/#configure), so the main targeted class is "com.sun.javafx.runtime.adapter.Applet".

Do you have information that can help me in solving this problem ?

Thanks in advance,
Sébastien.
  • 1. Re: Bad package name of main-class
    995795 Newbie
    Currently Being Moderated
    wow...
    I apologize if my original post was not submitted where it should have been, but of course I didn't want to hijack or rip ownership of that thread. I just wanted to add some information to the problem that seems not to be solved, and seems to be the same as mine.
  • 2. Re: Bad package name of main-class
    gimbal2 Guru
    Currently Being Moderated
    sebadavi wrote:
    wow...
    I apologize if my original post was not submitted where it should have been, but of course I didn't want to hijack or rip ownership of that thread. I just wanted to add some information to the problem that seems not to be solved, and seems to be the same as mine.
    No you didn't, as this line proves:
    Do you have information that can help me in solving this problem ?
    You don't aim to add information, you only care about this being solved so -you- are no longer stuck. Which is absolutely fine, but then you create your own thread and not lift on the thread of someone else for your own purposes. That is why it is called a hijack.
  • 3. Bad package name of main-class, javafx 1.3, java 7u15
    995795 Newbie
    Currently Being Moderated
    Some additional information to the problem, if it can help :

    With JRE 6u43 : the applet is initialized and working properly. So the problem might not be due to the security fixes, as this version is including them.

    With JRE 7u15 & 7u17 : I tried to run the applet with the runtime v1.3.0_b412, then v1.3.1_b101a, but the problem is the same.

    When tracing is enabled through the Java Control Panel, the following lines are displayed at the end of the log :
    ...
    basic: passing security checks; secureArgs:true, allSigned:false
    basic: continuing launch in this VM
    preloader: Delivering: DownloadEvent[type=verify,loaded=1, total=1, percent=100]
    preloader: Start progressCheck thread
    basic: exception: Bad package name of main-class.
    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)
    preloader: Delivering: ErrorEvent[url=null label=Bad package name of main-class cause=Bad package name of main-class
    preloader: Stop progressCheck thread
    ui: Show default error panel
    security: Reset deny session certificate store
    I think that the lines preceding those lines are about the validation of the different jars included, using the certificates. When the certificates are not installed on the user workstation, 2 dialog boxes are displayed during the applet validation, so as to ask the users if the applet should be run (and the JavaFX runtime). The certificates are well displayed as trusted. Then, after acceptance, the error occurs.

    Edited by: sebadavi on Mar 13, 2013 5:07 AM
  • 4. Re: Bad package name of main-class, javafx 1.3, java 7u15
    995795 Newbie
    Currently Being Moderated
    Hi,

    We found a solution to the problem, through this post : https://bugzilla.mozilla.org/show_bug.cgi?id=748343#c75.

    It seems that the referenced main-class com.sun.javafx.runtime.adapter.Applet is now blocked by java. The solution is to create our own class (an empty one) which extends this class. Then , it is referenced as the main-class. That's all...

    The new class :
    public class RuntimeAdapterApplet extends com.sun.javafx.runtime.adapter.Applet {
    
    }
    The new main-class reference :
    <applet-desc name="FileManagerApplet" main-class="my.package.RuntimeAdapterApplet">
        <param name="MainJavaFXScript" value="my.package.Main"/>
    </applet-desc>
    I hope it will help !