Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (579)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Can't launch any jnlp demo with jogl !  (Read 6479 times)
0 Members and 1 Guest are viewing this topic.
Offline Sylfurd

Junior Newbie





« Posted 2009-08-21 19:04:49 »

Hello !

I'm actually developping Java games with JOGL, and I think it's a great library and I got awesome results with great performances !

I project to make them avalaible as Java applets, so I tweaked my projects to be launch as Applets, and everything worked wonderfully in NetBeans !

I got a problem when I tried to put the applet online with JNLP ! Nothing really strange since it's not really obvious, but I haven't managed to make it work ... The problem isn't really here yet.

In fact I realised that I can't run any jnlp applet using jogl ! Java3D applets run really well, etc ... But I have several different errors with JOGL ones !

I tried different Java 6 update , 14, 15, 16, deleted all java and jogl files each time, cleared the Firefox cache, tried with IE7 etc ...

I precise that I'm actually under Windows XP and the error I actually have in the console when trying to launch the Gears demo in an applet or not is:
https://jogl-demos.dev.java.net/applettest.html
Quote
JNLPAppletLauncher: static initializer
os.name = windows xp
nativePrefix =   nativeSuffix = .dll
tmpRootDir = C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\jnlp-applet\jln5589381617654692520
Applet.init
subapplet.classname = demos.applets.GearsApplet
subapplet.displayname = JOGL Gears Applet
Applet.start
os.name = windows xp
os.arch = x86
processNativeJar: using previously cached: C:\Documents and Settings\Administrateur\.jnlp-applet\cache\jogl-demos_dev_java_net\ba0d8aef2551ded250a93d393a0eb11411448c21\jogl-natives-windows-i586.jar
validateCertificates:
VALIDATE: jogl_cg.dll
java.io.IOException: Cannot find certificates for JNLPAppletLauncher class
   at org.jdesktop.applet.util.JNLPAppletLauncher.checkNativeCertificates(JNLPAppletLauncher.java:1843)
   at org.jdesktop.applet.util.JNLPAppletLauncher.validateCertificates(JNLPAppletLauncher.java:1814)
   at org.jdesktop.applet.util.JNLPAppletLauncher.processNativeJar(JNLPAppletLauncher.java:1579)
   at org.jdesktop.applet.util.JNLPAppletLauncher.initResources(JNLPAppletLauncher.java:1350)
   at org.jdesktop.applet.util.JNLPAppletLauncher.initAndStartApplet(JNLPAppletLauncher.java:1254)
   at org.jdesktop.applet.util.JNLPAppletLauncher.access$000(JNLPAppletLauncher.java:658)
   at org.jdesktop.applet.util.JNLPAppletLauncher$1.run(JNLPAppletLauncher.java:907)
21 août 2009 19:03:20 org.jdesktop.applet.util.JNLPAppletLauncher displayError
GRAVE: java.io.IOException: Cannot find certificates for JNLPAppletLauncher class

Does anyone know where it come from ??

Any help will be greatly appreciated Smiley Thanks Smiley

P.S: I'm pretty sure it worked weeks ago, and it works perfectly on a friend computer !
Offline Sylfurd

Junior Newbie





« Reply #1 - Posted 2009-08-21 20:32:55 »

ok, it works with Java 6 update 1   o_O
Offline Sylfurd

Junior Newbie





« Reply #2 - Posted 2009-08-21 20:37:31 »

I've updated to the update 15 with the java control panel and it doesn't work anymore !

I have anoher error I used to have:

Quote
Exception in thread "AWT-EventQueue-2" java.lang.VerifyError: (class: javax/media/opengl/awt/GLCanvas, method: chooseGraphicsConfiguration signature: (Ljavax/media/opengl/GLCapabilities;Ljavax/media/opengl/GLCapabilitiesChooser;Ljava/awt/GraphicsDevice;)Ljavax/media/nativewindow/awt/AWTGraphicsConfiguration;) Incompatible argument to function
   at demos.applets.GearsApplet.init(GearsApplet.java:18)
   at org.jdesktop.applet.util.JNLPAppletLauncher.startSubApplet(JNLPAppletLauncher.java:1929)
   at org.jdesktop.applet.util.JNLPAppletLauncher.access$200(JNLPAppletLauncher.java:658)
   at org.jdesktop.applet.util.JNLPAppletLauncher$5.run(JNLPAppletLauncher.java:1269)
   at java.awt.event.InvocationEvent.dispatch(Unknown Source)
   at java.awt.EventQueue.dispatchEvent(Unknown Source)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
   at java.awt.EventDispatchThread.run(Unknown Source)
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline bienator

Senior Member




OutOfCoffeeException


« Reply #3 - Posted 2009-08-21 22:43:45 »

1  
java.lang.VerifyError:....Incompatible argument to function...


looks like a webstart bug to me. It seems like there are still open issues with the webstart cache (switching between java versions can provoke such bugs). Cleaning the webstart cache usually solves this kind of issues - at least temporary.
(I hope you have no old jogl jars somewhere in your system folders or jre ext folders.. Wink )

Offline Sylfurd

Junior Newbie





« Reply #4 - Posted 2009-08-21 23:31:36 »

1  
java.lang.VerifyError:....Incompatible argument to function...


looks like a webstart bug to me. It seems like there are still open issues with the webstart cache (switching between java versions can provoke such bugs). Cleaning the webstart cache usually solves this kind of issues - at least temporary.
(I hope you have no old jogl jars somewhere in your system folders or jre ext folders.. Wink )
I've deleted all jogl and java jre / jdk folders I could find and several times, and haven't more success.

I've tested others jre6 updates: it works with the update 4 but not with the update 10 ... Really strange !
Offline h3ckboy
« Reply #5 - Posted 2009-08-21 23:40:12 »

have you actually cleared the java cache. I am not sure removing the jre changes that.

go tot he java control panel and then in the first tab. got ot the "internet files" I believe it is called.
Offline Sylfurd

Junior Newbie





« Reply #6 - Posted 2009-08-22 08:32:43 »

have you actually cleared the java cache. I am not sure removing the jre changes that.

go tot he java control panel and then in the first tab. got ot the "internet files" I believe it is called.
Yes I often clear it and remove it myself by deleting the files Smiley
Offline JL235

JGO Coder


Medals: 10



« Reply #7 - Posted 2009-08-25 08:30:11 »

The first error ('java.io.IOException: Cannot find certificates for JNLPAppletLauncher class') is because from Java 6 update 15 the JNLPAppletLoader has been blacklisted. They say at the bottom to use the current version but for me it still does not work.

However also from Java update 15 you can use JNLPs in the browser! Here is a forum post about it. So you don't need the JNLPAppletLauncher any more.

The real issue is that you need to use both to support people who are both before and after Java 6 update 15.

Offline Sylfurd

Junior Newbie





« Reply #8 - Posted 2009-08-25 09:19:44 »

Thanks, I will test it Smiley
Offline JL235

JGO Coder


Medals: 10



« Reply #9 - Posted 2009-08-25 09:26:57 »

Here is some example applet code that I wrote earlier today for someone who is experiencing the same issue:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
<!-- edit: the width and the height,
     and add your jars after the glugen-rt jar in archive -->
<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
        width="800"
        height="480"
        codebase="." archive="
                http://download.java.net/media/applet-launcher/applet-launcher.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,
               
                MY_GAME.jar,
                MY_EXTERNAL_LIB.jar"

   
   
    <param name="codebase_lookup"       value="false">
    <param name="noddraw.check"         value="false">
    <param name="progressbar"           value="true">
    <param name="jnlpNumExtensions"     value="1">
    <param name="jnlpExtension1"        value="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp">
    <param name="noddraw.check"         value="true">
    <param name="noddraw.check.silent"  value="true">
    <param name="java_arguments"        value="-Dsun.java2d.noddraw=true">
   
   
    <!-- edit: your main class name -->
    <param name="subapplet.classname"   value="com.my_game.Main">
    <!-- edit: the title of your game -->
    <param name="subapplet.displayname" value="MY GAME">
    <!-- edit: the name of your jnlp file -->
    <param name="jnlp_href"             value="example.jnlp">
</applet>


Here is example JNLP that the applet links too.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
<?xml version="1.0" encoding="utf-8"?>

<!-- edit: change the href attribute to the same name that you give to this file. -->
<jnlp href="example.jnlp">
   
    <!-- edit: generic information, edit or remove all the values except
         the update check at the bottom -->
    <information>
        <title>My Game</title>
        <vendor>Me or My company</vendor>
        <homepage href="http://www.my_homepage.com"/>
        <description>
            blah blah blah
        </description>
        <description kind="short">
            blah
        </description>
       
        <update check="background"/>
    </information>
   
    <resources>
        <j2se   version="1.6+" />
        <property
                name="sun.java2d.noddraw"
                value="true" />
               
               
        <!-- edit: have one of these for each extra jar you are importing -->
        <jar    href="MY_EXTERNAL_LIB.jar" />
        <!-- edit: the jar containing your main class -->
        <jar
                href="MY_GAME.jar"
                main="true" />
               
               
        <extension
                name = "jogl"
                href = "http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp" />
    </resources>
   
   
    <!-- edit: all four details need to be changed -->
    <applet-desc
            name       = "My Game"
            main-class = "com.myGame.Main"
            width      = "800"
            height     = "600" >
    </applet-desc>
</jnlp>
.

The comments refer to which bits you should edit for you app. If you edit them correctly then it should (hopefully) work for embedding your JOGL application in a web page.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Sylfurd

Junior Newbie





« Reply #10 - Posted 2009-08-25 09:40:09 »

Excellent, I've used your example and it works perfectly  Grin Thanks a lot  Wink
Offline way2lazy2care

Junior Newbie





« Reply #11 - Posted 2010-01-09 20:48:08 »

cut for length
Sorry for the uber necro, but this is exactly what I need help with.

ANYWAY I've been trying for days to get a Jogl demo up that uses an external library, and apparently nobody knows how to do it because I've posted in a couple places I expected to get more feedback from. This thread got me the closest so far.

Anyway, I tried using your code, and I'm getting a weird error:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
Java Plug-in 1.6.0_17
Using JRE version 1.6.0_17-b04 Java HotSpot(TM) Client VM
User home directory = D:\Student Data

MissingFieldException[ The following required field is missing from the launch file: <jnlp><information><vendor>]
   at com.sun.javaws.jnl.XMLFormat.buildInformationDesc(Unknown Source)
   at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
   at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
   at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
   at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptorFromCache(Unknown Source)
   at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptorFromCache(Unknown Source)
   at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
   at sun.plugin2.main.client.PluginMain.initManager(Unknown Source)
   at sun.plugin2.main.client.PluginMain.access$300(Unknown Source)
   at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Error while initializing manager: MissingFieldException[ The following required field is missing from the launch file: <jnlp><information><vendor>], bail out


Here is my applet code:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
<applet code="org.jdesktop.applet.util.JNLPAppletLauncher" width="500" height="500" codebase="." archive="
 http://download.java.net/media/applet-launcher/applet-launcher.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,
http://www.micsworld.com/sites/default/files/MazeGame_0.jar,
http://www.micsworld.com/sites/default/files/SSG_Tools.jar"
>
<param name="codebase_lookup" value="false">
 <param name="noddraw.check" value="false">
 <param name="progressbar" value="true">
 <param name="jnlpNumExtensions" value="1">
 <param name="jnlpExtension1" value="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp">
 <param name="noddraw.check" value="true">
 <param name="noddraw.check.silent" value="true">
 <param name="java_arguments" value="-Dsun.java2d.noddraw=true">
 
 <param name="subapplet.classname" value="GameRunner">
 <!-- edit: the title of your game -->
 <param name="subapplet.displayname" value="MY GAME">
 <!-- edit: the name of your jnlp file -->
 <param name="jnlp_href" value="http://www.micsworld.com/sites/default/files/MazeGame.jnlp">
</applet>

and my jnlp code:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
<?xml version="1.0" encoding="utf-8"?>

<!-- edit: change the href attribute to the same name that you give to this file. -->
<jnlp href="MazeGame.jnlp">
   
    <!-- edit: generic information, edit or remove all the values except
         the update check at the bottom -->
    <information>
        <title>Jogl Maze Game</title>
   <vendor>Michael Rooney</vendor>
        <homepage href="http://www.micsworld.com"/>
        <description></description>
        <description kind="short"></description>        
        <update check="background"/>
    </information>
   
    <resources>
        <j2se   version="1.6+" />
        <property
                name="sun.java2d.noddraw"
                value="true" />
        <jar    href="SSG_Tools.jar" />
        <!-- edit: the jar containing your main class -->
        <jar
                href="MazeGame.jar"
                main="true" />
               
               
        <extension
                name = "jogl"
                href = "http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp" />
    </resources>
   
   
    <!-- edit: all four details need to be changed -->
    <applet-desc
            name       = "JOGL Maze Game"
            main-class = "GameRunner.Main"
            width      = "500"
            height     = "500" >
    </applet-desc>
</jnlp>


It looks like it's looking for the <vendor> tag, but it's clearly there. I have no idea what the problem would be. Any help would be awesome because this is seriously starting to aggravate me Sad.
Offline JL235

JGO Coder


Medals: 10



« Reply #12 - Posted 2010-01-11 10:06:57 »

I have no idea. One possible issue is that in the jnlp file you have the main-class as "GameRunner.Main", whilst in the applet it is "GameRunner". Bear in mind that both need to be the same in order to keep compatability with both older and newer Java versions.

Offline way2lazy2care

Junior Newbie





« Reply #13 - Posted 2010-01-13 23:27:18 »

I have no idea. One possible issue is that in the jnlp file you have the main-class as "GameRunner.Main", whilst in the applet it is "GameRunner". Bear in mind that both need to be the same in order to keep compatability with both older and newer Java versions.
Just so you know, I've fixed many minor issues with my jnlp that were causing the above problem. I am going to open a new thread with my new problems.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (31 views)
2014-04-15 18:08:23

BurntPizza (28 views)
2014-04-15 03:46:01

UprightPath (43 views)
2014-04-14 17:39:50

UprightPath (26 views)
2014-04-14 17:35:47

Porlus (43 views)
2014-04-14 15:48:38

tom_mai78101 (64 views)
2014-04-10 04:04:31

BurntPizza (124 views)
2014-04-08 23:06:04

tom_mai78101 (224 views)
2014-04-05 13:34:39

trollwarrior1 (190 views)
2014-04-04 12:06:45

CJLetsGame (198 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!