Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25
  1. #21
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    Can you put ALL of the files in the same folder? jar and html
    Sorry, I have no experience or knowledge about using jar files from different locations.

    I've never used the JNLP appletlauncher.
    Have you read the doc at https://applet-launcher.dev.java.net/
    Last edited by Norm; 07-25-2010 at 03:25 PM.

  2. #22
    Dennis's Avatar
    Dennis is offline Member
    Join Date
    May 2010
    Posts
    83
    Rep Power
    0

    Default

    When I add the code of java3d.dev.java.net for the FourByFour applet:
    Java Code:
    <applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
            width=800 height=400
            archive="http://download.java.net/media/java3d/webstart/test/j3d-examples.jar,
                     http://download.java.net/media/applet-launcher/applet-launcher.jar,
                     http://download.java.net/media/java3d/webstart/release/j3d/latest/j3dcore.jar,
                     http://download.java.net/media/java3d/webstart/release/j3d/latest/j3dutils.jar,
                     http://download.java.net/media/java3d/webstart/release/vecmath/latest/vecmath.jar,
                     http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jar,
                     http://download.java.net/media/gluegen/webstart/gluegen-rt.jar">
        <param name="codebase_lookup" value="false">
        <param name="subapplet.classname" value="org.jdesktop.j3d.examples.four_by_four.FourByFour">
        <param name="subapplet.displayname" value="Java 3D Four by Four Applet">
        <param name="jnlpNumExtensions" value="1">
        <param name="jnlpExtension1" value="http://download.java.net/media/java3d/webstart/release/java3d-latest.jnlp">
        <param name="progressbar" value="true">
        <param name="noddraw.check" value="true">
    </applet>
    that works, but when I get the source-code of FourByFour on the internet add compile it by myself and add it into a .jar file and add the same applet code but only my own .jar, but that don't work.

    I don't know how I can fix it....

  3. #23
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    Can you show your APPLET tag code for when it doesn't work?

    Also look at the browser's java console.
    When I tried using a locally compiled version of the 4x4 program I get a security error:

    java.lang.SecurityException: trusted loader attempted to load sandboxed resource from file:/D:/JavaDevelopment/Testing/AppletLauncher/3D_Jars/local4x4.jar
    Last edited by Norm; 07-30-2010 at 02:54 PM.

  4. #24
    Dennis's Avatar
    Dennis is offline Member
    Join Date
    May 2010
    Posts
    83
    Rep Power
    0

    Default

    The code on my previous post is het applet tag code for when it doesn't work.
    (the subapplet.classname is for my applet name, for load it with the applet-launcher, but that errors)

    The browser's concole error is:
    Java Code:
    java.security.AccessControlException: acces denied (java.net.SocketPermissions download.java.net connect,accept,resolve)
    	at java.security.AccessControlContext.checkPermission(AccesControlContext.java:323)
    	at java.security.AccessController.checkPermission(AccessController.java:546)
    	at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    	at java.net.URLClassLoader$4.run(URLClassLoader.java:515)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.getPermissions(appletClassLoader.java:238)
    	at java.security.SecureClassLoader..getProtectionDomain(SecureClassLoader.java:235)
    	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
    	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    	at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:172)
    	at java.lnag.ClassLoader.loadClass(classLoade.rjava:307)
    	at sun.applet.AppletClassLoader.loadClass(ClassLoader.java:144)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    	at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:654)
    	at sun.applet.AppletPanel.createApplet(AppletPanel.java:785)
    	at sun.applet.AppletPanel.runLoader(AppletPanel.java:714)
    	at sun.applet.AppletPanel.run(AppletPanel.java:368)
    	at java.lang.Thread.run(Thread.java:619)

  5. #25
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    Because the applet launcher has permission to do things like read and write on your system, the JVM won't allow any code mixed in with the launcher to execute that does NOT have permissions.
    You can give your code permission by signing the jar file your code is in.
    Or for your private testing you might be able give your code permission by putting an entry in the .java.policy file by using the policytool program.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. redirect to html page
    By simo_mon in forum Java Servlet
    Replies: 3
    Last Post: 02-12-2009, 05:18 PM
  2. Replies: 0
    Last Post: 03-10-2008, 02:36 PM
  3. How to view applet from html page.
    By jwzumwalt in forum Java Applets
    Replies: 2
    Last Post: 11-24-2007, 04:21 AM
  4. HTML page
    By bbq in forum New To Java
    Replies: 1
    Last Post: 07-05-2007, 03:46 AM
  5. Create a Applet in the page HTML
    By Daniel in forum Java Applets
    Replies: 2
    Last Post: 07-04-2007, 07:52 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
  •