Results 1 to 8 of 8
  1. #1
    scorpion9 is offline Member
    Join Date
    Feb 2010
    Posts
    5
    Rep Power
    0

    Question Using libraries that others dont have(j3d)

    hi

    i have made a 3d model viewing applet that works fine on my computer(since i have the j3d library installed) but 99% of the people doesnt.

    i was wondering if there is a way to embed the applet without forcing the viewer to install new plugin.

    i tried creating the catalog tree in my web server, according to the imports
    e.g javax.media.j3d. ....etc and the java console shows that its trying to download the necessary classes but cant find them.
    -------------------------
    Caused by: java.io.IOException: open HTTP connection failed:http://xxx.xxx.xx/~xxx/javax/media/j3d/Node.class
    -------------------------

    i have tried the jnlp but its too uncomfortable for the web page viewer.

    how could i make it work?

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Take a look at the archive attribute for the Applet tag.

    That link is 1.4 but that attribute still exists, of course. See

    See this for 1.6 applet deployment techniques, though.

  3. #3
    scorpion9 is offline Member
    Join Date
    Feb 2010
    Posts
    5
    Rep Power
    0

    Default

    hi

    thanks for the reply.

    well...i tried adding all the classes i used into the jar, but the browser still fails to launch the applet on a client that doesnt have the libraries.
    and it also looks the classes from the import directories not from the jar.

  4. #4
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    No! I did not say to add the third parties libraries class files to your jar. I said to look at the archive attribute. You'll notice that you can provide a list of jars to that attribute. Just make sure that they all exist at the location you provide and are accessable through the web server (i.e. readable).

  5. #5
    scorpion9 is offline Member
    Join Date
    Feb 2010
    Posts
    5
    Rep Power
    0

    Default

    thanks again

    it changed some errors into these ones

    Exception in thread 'thread applet-Embed3D.class-1' java.lang.ExceptionInInitializerError
    at javax.media.j3d.VirtualUniverse.(VirtualUniverse.j ava:259)
    at Display3D.(Display3D.java:92)
    at Embed3D.LoadParam(Embed3D.java:90)
    at Embed3D.start(Embed3D.java:77)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
    at java.security.AccessControlContext.checkPermission (Unknown Source)
    at java.security.AccessController.checkPermission(Unk nown Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at sun.plugin2.applet.Applet2SecurityManager.checkAcc ess(Unknown Source)
    at java.lang.ThreadGroup.checkAccess(Unknown Source)
    at java.lang.ThreadGroup.getParent(Unknown Source)
    at javax.media.j3d.MasterControl$15.run(MasterControl .java:3462)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.media.j3d.MasterControl.(MasterControl.java: 3455)


    so...now its about security?
    i have the jars signed and folders and files have 777 rights.

  6. #6
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    It looks as though the library manipulates the ThreadGroup it uses in ways that Applets are not allowed to. Possibly even signed. I don't do all that much with Applets myself, so all I can do about it is to Google Applet and SecurityManager and see what I can find out about how they work together and what can be done to change that behaviour, and you can do that as well as I can, so ....

  7. #7
    scorpion9 is offline Member
    Join Date
    Feb 2010
    Posts
    5
    Rep Power
    0

    Default

    thanks for the reply.

    im on it
    ----------------------
    Last edited by scorpion9; 02-19-2010 at 12:25 PM.

  8. #8
    scorpion9 is offline Member
    Join Date
    Feb 2010
    Posts
    5
    Rep Power
    0

    Default

    sorry for the bump, but i couldnt find a solution to it by googling.

    i found some examples about security manager and policy´s.

    i used the following line to set permissions for the applet
    System.setProperty( "java.security.policy", codebase+"java.policy.applet" );
    and in the policy file,
    grant {
    permission java.security.AllPermission;
    };
    but it wont change anything, same error.

Similar Threads

  1. Replies: 3
    Last Post: 07-28-2010, 03:49 PM
  2. Hello! and I need help. I dont know were to start
    By Fall0ut in forum New To Java
    Replies: 10
    Last Post: 05-19-2010, 07:26 PM
  3. Sometimes get the right results sometimes dont
    By Battlefeldt in forum New To Java
    Replies: 0
    Last Post: 12-18-2009, 02:03 AM
  4. Dont use this program, Im warning you!
    By Addez in forum JCreator
    Replies: 3
    Last Post: 11-28-2009, 08:18 PM
  5. Replies: 6
    Last Post: 09-14-2009, 11:46 PM

Tags for this Thread

Posting Permissions

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