Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (476)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
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  
  Error when running an applet with WebStart.  (Read 2551 times)
0 Members and 1 Guest are viewing this topic.
Offline a6767

Senior Newbie





« Posted 2007-05-24 01:06:22 »

I write this code for a jnlp archive

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  
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for TumbleItem -->
<jnlp
  spec="1.0+"
  codebase="file:///c:\ModeloNissan350zx\350Z-3ds\ModeloInternet\"
  href="nissan350.jnlp">
  <information>
    <title>Car conf</title>
    <vendor>Tridimens 3D SL</vendor>
    <homepage href="file:///c:\ModeloNissan350zx\350Z-3ds\ModeloInternet\jnlp.html"/>
    <description>Car configurator</description>
    <description kind="short">A car configurator.</description>
    <offline-allowed/>
  </information>
  <security>
    <all-permissions/>
  </security>
  <resources>
    <j2se version="1.5+"/>
    <jar href="On3.jar" download="lazy"/>
    <jar href="javazoom.jar" download="lazy"/>
    <jar href="gluegen-rt.jar" download="lazy"/>
    <jar href="gluegen-rt-natives-windows-i586.jar" download="lazy"/>
    <jar href="gluegen-rt-natives-windows-amd64.jar" download="lazy"/>
    <jar href="jogl-natives-windows-i586.jar" download="lazy"/>
    <jar href="jogl-natives-windows-amd64.jar" download="lazy"/>
    <jar href="TimingFramework.jar" download="lazy"/>
    <jar href="On3viewer.jar" download="lazy"/>
    <jar href="jogl.jar" main="true"/>
  </resources>
  <applet-desc
      documentBase="file:///c:\ModeloNissan350zx\350Z-3ds\ModeloInternet\jnlp.html"
      name="Appletdever"
      main-class="com.sun.opengl.util.JOGLAppletLauncher"
      width="800"
      height="600"
      >
    <param name="subapplet.classname" VALUE="On3viewer.On3viewer">
    <param name="opengl" value="TRUE">
    <param name="On3File" value="login.on3">
    <param name="progressbar" value="true">
    <param name="cache_archive" VALUE="jogl.jar,gluegen-rt.jar,On3.jar,javazoom.jar,TimingFramework.jar,On3viewer.jar">
    <param name="cache_archive_ex" VALUE="jogl.jar;preload,gluegenrt.jar;preload,On3.jar;preload,javazoom.jar;preload,TimingFramework.jar:preload,On3viewer.jar:preload">
  </applet-desc>
</jnlp>


And when I run, I get this error:

Quote
Java Web Start 1.6.0
Usar versión JRE 1.6.0 Java HotSpot(TM) Client VM
Directorio local del usuario = C:\Documents and Settings\Francisco
----------------------------------------------------
c:   borrar ventana de consola
f:   finalizar objetos en la cola de finalización
g:   liberación de recursos
h:   presentar este mensaje de ayuda
m:   imprimir sintaxis de memoria
o:   activar registro
p:   recargar configuración de proxy
q:   ocultar consola
r:   recargar configuración de norma
s:   volcar propiedades del sistema y de despliegue
t:   volcar lista de subprocesos
v:   volcar pila de subprocesos
0-5: establecer nivel de rastreo en <n>
----------------------------------------------------
java.lang.NullPointerException
   at com.sun.opengl.util.JOGLAppletLauncher.md2Hash(JOGLAppletLauncher.java:284)
   at com.sun.opengl.util.JOGLAppletLauncher.init(JOGLAppletLauncher.java:315)
   at com.sun.jnlp.AppletContainer$1.run(Unknown Source)


What's wrong???
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #1 - Posted 2007-05-24 05:14:53 »

As far as I can tell you have a null archive tag, which the JOGLAppletLauncher is looking for.
Offline a6767

Senior Newbie





« Reply #2 - Posted 2007-05-25 01:06:43 »

I trying to execute with the archive tag in two ways and none of them does work

First of them:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
<applet-desc
      documentBase="file:///c:\ModeloNissan350zx\350Z-3ds\ModeloInternet\jnlp.html"
      name="Appletdever"
      main-class="com.sun.opengl.util.JOGLAppletLauncher"
      width="800"
      height="600"
      >
    <param name="archive" value="files...">
    <param name="subapplet.classname" VALUE="On3viewer.On3viewer">
    <param name="opengl" value="TRUE">
    <param name="On3File" value="login.on3">
    <param name="progressbar" value="true">
    <param name="cache_archive" VALUE="jogl.jar,gluegen-rt.jar,On3.jar,javazoom.jar,TimingFramework.jar,On3viewer.jar">
    <param name="cache_archive_ex" VALUE="jogl.jar;preload,gluegenrt.jar;preload,On3.jar;preload,javazoom.jar;preload,TimingFramework.jar:preload,On3viewer.jar:preload">
  </applet-desc>


Returns in console:

"Init failed: Missing subapplet.classname argument"

 Shocked

That is the second parameter ¿?

If I put the parameter subapplet.classname before the parameter archive, it returns to me the same error than yesterday

The second way is

1  
2  
3  
4  
5  
6  
7  
8  
9  
<applet-desc
      documentBase="file:///c:\ModeloNissan350zx\350Z-3ds\ModeloInternet\jnlp.html"
     archive="files..."
      name="Appletdever"
      main-class="com.sun.opengl.util.JOGLAppletLauncher"
      width="800"
      height="600"
   
      >


But it returns same exception than yesterday.

Nobody has deployed with jnlp an applet with JOGL?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #3 - Posted 2007-05-25 03:55:29 »

Thomas Ng from the Java Web Start team and I looked through the associated Java Web Start code and as far as we can tell specifying the "archive" tag as a sub-param to the applet-desc tag (the first way you mentioned) should work.

To be honest the applet-desc tag hasn't been used much to date. However, some work going on may change that in the future.

In the interim, if you want to try hacking the JOGLAppletLauncher to see if you can pass down the needed information under another parameter name, I'll be glad to put back those changes. It isn't that hard to get the JOGL build process set up, and I'd be happy to answer questions.
Offline a6767

Senior Newbie





« Reply #4 - Posted 2007-05-25 09:36:30 »

The saddest thing Is I begun to write jnlp because the impossibility to modify heap size automatically . Now I need some other things too. But the fact, that there is not way to achieve this thing (modify by an applet parameter heap size - wih a limit to avoid nobody can write 100.000 MB-) is a truly problem in my opinion for applets having a big success. Users might not need making nothing and 64MB is a ridiculous limit for multimedia apps like I want to do. I think applets running into the browser (not out the browser because the memory limit) is an important thing.
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #5 - Posted 2007-05-25 13:11:53 »

I completely agree with you and am currently working to resolve this limitation with applets.

In the interim I suggest you use a Java Web Start application as a workaround. There are more drastic workarounds I can detail to you, but they involve platform-specific code and have limitations such as not supporting LiveConnect. Contact me via email at kbr at dev dot java dot net if you would like more information about the latter.
Offline a6767

Senior Newbie





« Reply #6 - Posted 2007-05-25 19:18:13 »

I cannot believe it! I have almost  started it by modifying some things.

I forgot to say that because I'm a newbie in jnlp, (and in Java too) I didn't know that having different signs in each jar into a jnlp could be problematic. The solution is putting jars in different jnlp and referencing between them as extensions. Doing this my standpoint was I described before. I have climbed another hill only by writing a "/" before ">" in each parameter  Grin Huh Undecided

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  
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for TumbleItem -->
<jnlp
  spec="1.0+"
  codebase="file:///c:\ModeloNissan350zx\350Z-3ds\ModeloInternet"
  href="nissan350.jnlp">
  <information>
    <title>Car conf</title>
    <vendor>Tridimens 3D SL</vendor>
    <homepage href="file:///c:\ModeloNissan350zx\350Z-3ds\ModeloInternet\jnlp.html"/>
    <description>Car configurator</description>
    <description kind="short">A car configurator.</description>
    <offline-allowed/>
  </information>
  <security>
    <all-permissions/>
  </security>
  <resources>
    <j2se version="1.5+"/>
    <extension name="On3" href="On3.jnlp"/>
    <extension name="javazoom" href="javazoom.jnlp"/>
    <jar href="gluegen-rt.jar" download="lazy"/>
    <jar href="gluegen-rt-natives-windows-i586.jar" download="lazy"/>
    <jar href="gluegen-rt-natives-windows-amd64.jar" download="lazy"/>
    <jar href="jogl-natives-windows-i586.jar" download="lazy"/>
    <jar href="jogl-natives-windows-amd64.jar" download="lazy"/>
    <extension name="TimingFramework" href="TimingFramework.jnlp"/>
    <extension name="viewer" href="viewer.jnlp"/>
    <jar href="jogl.jar" main="true"/>
  </resources>
  <applet-desc
      documentBase="file://c:\ModeloNissan350zx\350Z-3ds\ModeloInternet\jnlp.html"
     
      name="Appletdever"
      main-class="com.sun.opengl.util.JOGLAppletLauncher"
      width="800"
      height="600"
     
      >
    <param name="archive" value="jogl.jar,gluegen-rt.jar,On3.jar,javazoom.jar,TimingFramework.jar,viewer.jar"/>
    <param name="subapplet.classname" value="On3viewer.class"/>
    <param name="opengl" value="TRUE"/>
    <param name="On3File" value="login.on3"/>
    <param name="progressbar" value="true"/>
    <param name="cache_archive" value="jogl.jar,gluegen-rt.jar,On3.jar,javazoom.jar,TimingFramework.jar,viewer.jar"/>
    <param name="cache_archive_ex" value="gluegenrt.jar;preload,On3.jar;preload,javazoom.jar;preload,TimingFramework.jar;preload,jogl.jar;preload,viewer.jar;preload"/>
  </applet-desc>


The message now is : Error: Start failed: class not found : On3viewer.class.  This class is in viewer.jar that is linked by viewer.jnlp. Can I refer viewer.jar in params archive,cache_archive, and so on?

Any idea???

I am almost in the end.
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #7 - Posted 2007-05-25 23:41:48 »

You shouldn't have the ".class" suffix in your sub-applet class name. It should just be "On3viewer".
Offline a6767

Senior Newbie





« Reply #8 - Posted 2007-05-26 02:07:28 »

Thanks Ken. By removing the extension and packaging one more time one of the jars, I have got success.
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.

pw (18 views)
2014-07-24 01:59:36

Riven (17 views)
2014-07-23 21:16:32

Riven (14 views)
2014-07-23 21:07:15

Riven (17 views)
2014-07-23 20:56:16

ctomni231 (45 views)
2014-07-18 06:55:21

Zero Volt (41 views)
2014-07-17 23:47:54

danieldean (32 views)
2014-07-17 23:41:23

MustardPeter (36 views)
2014-07-16 23:30:00

Cero (51 views)
2014-07-16 00:42:17

Riven (50 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!