Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
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  
  not happy with jnlp  (Read 7518 times)
0 Members and 1 Guest are viewing this topic.
Offline Karmington

Senior Member


Medals: 1
Projects: 1


Co-op Freak


« Posted 2009-10-07 17:28:46 »

http://download.java.net/media/jogl/demos/www/applettest-joal.html

if java's own demo doesn't work... ( sound does not play )
how the hell are we meant to take this stuff seriously.
*Unhappy camper*

Guess it's time to revert to some more basic sounds...

Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #1 - Posted 2009-10-07 17:36:24 »

Have a go with LWJGL instead.

Cas Smiley

Offline gouessej
« Reply #2 - Posted 2009-10-10 14:17:08 »

No it is time to fix this bug. What is wrong? Can you display the console? Do you have an exception? It does not work on my computer because I have forgotten to erase old GlueGen and JOGL JARs:
1  
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

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-10-10 15:54:25 »

just for the record: JOGL2 hasn't been released yet.

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  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
Java Plug-in 1.6.0_16
Using JRE version 1.6.0_16-b01 Java HotSpot(TM) Client VM
User home directory = /home/mbien

----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------

JNLPAppletLauncher: static initializer
os.name = linux
nativePrefix = lib  nativeSuffix = .so
tmpRootDir = /tmp/jnlp-applet/jln3654071058749269419
Applet.init
subapplet.classname = demos.applets.GearsJOALApplet
subapplet.displayname = JOGL / JOAL Gears Applet
Applet.start
os.name = linux
os.arch = i386
processNativeJar: http://download.java.net/media/jogl/jsr-231-2.x-webstart/nativewindow-natives-linux-i586.jar --> /home/mbien/.jnlp-applet/cache/download_java_net/5334ca2411591050da5d9b1da2f03bfbf76afedc/nativewindow-natives-linux-i586.jar : 16066 bytes written
validateCertificates:
VALIDATE: libnativewindow_awt.so
VALIDATE: libnativewindow_jvm.so
VALIDATE: libnativewindow_x11.so
extractNativeLibs:
EXTRACT: libnativewindow_awt.so(nativewindow_awt)
EXTRACT: libnativewindow_jvm.so(nativewindow_jvm)
EXTRACT: libnativewindow_x11.so(nativewindow_x11)
processNativeJar: http://download.java.net/media/jogl/jsr-231-2.x-webstart/jogl-natives-linux-i586.jar --> /home/mbien/.jnlp-applet/cache/download_java_net/5334ca2411591050da5d9b1da2f03bfbf76afedc/jogl-natives-linux-i586.jar : 338820 bytes written
validateCertificates:
VALIDATE: libjogl_cg.so
VALIDATE: libjogl_es1.so
VALIDATE: libjogl_es2.so
VALIDATE: libjogl_gl2.so
VALIDATE: libjogl_gl2es12.so
extractNativeLibs:
EXTRACT: libjogl_cg.so(jogl_cg)
EXTRACT: libjogl_es1.so(jogl_es1)
EXTRACT: libjogl_es2.so(jogl_es2)
EXTRACT: libjogl_gl2.so(jogl_gl2)
EXTRACT: libjogl_gl2es12.so(jogl_gl2es12)
processNativeJar: http://download.java.net/media/gluegen/webstart/gluegen-rt-natives-linux-i586.jar --> /home/mbien/.jnlp-applet/cache/download_java_net/5334ca2411591050da5d9b1da2f03bfbf76afedc/gluegen-rt-natives-linux-i586.jar : 6892 bytes written
validateCertificates:
VALIDATE: libgluegen-rt.so
extractNativeLibs:
EXTRACT: libgluegen-rt.so(gluegen-rt)
processNativeJar: http://download.java.net/media/joal/webstart/joal-natives-linux-i586.jar --> /home/mbien/.jnlp-applet/cache/download_java_net/5334ca2411591050da5d9b1da2f03bfbf76afedc/joal-natives-linux-i586.jar : 313159 bytes written
validateCertificates:
VALIDATE: libjoal_native.so
VALIDATE: libopenal.so
extractNativeLibs:
EXTRACT: libjoal_native.so(joal_native)
EXTRACT: libopenal.so(openal)
processNativeJar: http://download.java.net/media/gluegen/webstart-2.x/gluegen-rt-natives-linux-i586.jar --> /home/mbien/.jnlp-applet/cache/download_java_net/5334ca2411591050da5d9b1da2f03bfbf76afedc/gluegen-rt-natives-linux-i586.jar : 6961 bytes written
validateCertificates:
VALIDATE: libgluegen-rt.so
extractNativeLibs:
EXTRACT: libgluegen-rt.so(gluegen-rt)
JNLPAppletLauncher.loadLibrary("nativewindow_jvm")
    loading: /tmp/jnlp-applet/jln3654071058749269419/jln8796604995956323529/libnativewindow_jvm.so
JNLPAppletLauncher.loadLibrary("gluegen-rt")
    loading: /tmp/jnlp-applet/jln3654071058749269419/jln8796604995956323529/libgluegen-rt.so
JNLPAppletLauncher.loadLibrary("nativewindow_x11")
    loading: /tmp/jnlp-applet/jln3654071058749269419/jln8796604995956323529/libnativewindow_x11.so
JNLPAppletLauncher.loadLibrary("jogl_gl2")
    loading: /tmp/jnlp-applet/jln3654071058749269419/jln8796604995956323529/libjogl_gl2.so
JNLPAppletLauncher.loadLibrary("jogl_gl2es12")
    loading: /tmp/jnlp-applet/jln3654071058749269419/jln8796604995956323529/libjogl_gl2es12.so
JNLPAppletLauncher.loadLibrary("nativewindow_awt")
    loading: /tmp/jnlp-applet/jln3654071058749269419/jln8796604995956323529/libnativewindow_awt.so
INIT GL IS: com.sun.opengl.impl.gl2.GL2Impl
Chosen GLCapabilities: GLCapabilities[Capabilities[Onscreen: true, Red: 8, Green: 8, Blue: 8, Alpha: 8, Opaque: true], GL profile: GLProfile[GL2/GL2], PBuffer: false, DoubleBuffered: true, Stereo: false, HardwareAccelerated: true, DepthBits: 24, StencilBits: 0, Red Accum: 0, Green Accum: 0, Blue Accum: 0, Alpha Accum: 0, Multisample: false, Num samples: 0, PBuffer-FloatingPointBuffers: false, PBuffer-RenderToTexture: false, PBuffer-RenderToTextureRectangle: false]
GL_VENDOR: DRI R300 Project
GL_RENDERER: Mesa DRI R300 20060815 x86/MMX/SSE2 TCL
GL_VERSION: 1.3 Mesa 7.4
JNLPAppletLauncher.loadLibrary("joal_native")
    loading: /tmp/jnlp-applet/jln3654071058749269419/jln8796604995956323529/libjoal_native.so
Exception in thread "AWT-EventQueue-1" java.lang.RuntimeException: Can not get proc address for method "alcCaptureCloseDevice": Couldn't set value of field "_addressof_alcCaptureCloseDevice" in class net.java.games.joal.impl.ALCProcAddressTable
   at com.sun.gluegen.runtime.ProcAddressHelper.resetProcAddressTable(ProcAddressHelper.java:113)
   at net.java.games.joal.impl.ALProcAddressLookup.resetALCProcAddressTable(ALProcAddressLookup.java:109)
   at net.java.games.joal.impl.ALCImpl.alcOpenDevice(ALCImpl.java:341)
   at net.java.games.joal.util.ALut.alutInit(ALut.java:69)
   at demos.devmaster.lesson1.SingleStaticSource.initialize(SingleStaticSource.java:194)
   at demos.devmaster.lesson1.SingleStaticSource.access$000(SingleStaticSource.java:57)
   at demos.devmaster.lesson1.SingleStaticSource$1.actionPerformed(SingleStaticSource.java:79)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
   at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
   at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
   at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
   at java.awt.Component.processMouseEvent(Component.java:6263)
   at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
   at java.awt.Component.processEvent(Component.java:6028)
   at java.awt.Container.processEvent(Container.java:2041)
   at java.awt.Component.dispatchEventImpl(Component.java:4630)
   at java.awt.Container.dispatchEventImpl(Container.java:2099)
   at java.awt.Component.dispatchEvent(Component.java:4460)
   at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)
   at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
   at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
   at java.awt.Container.dispatchEventImpl(Container.java:2085)
   at java.awt.Component.dispatchEvent(Component.java:4460)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.RuntimeException: Unable to find and load OpenAL library
   at net.java.games.joal.impl.ALProcAddressLookup$DynamicLookup.dynamicLookupFunction(ALProcAddressLookup.java:66)
   at com.sun.gluegen.runtime.ProcAddressHelper.resetProcAddressTable(ProcAddressHelper.java:106)
   ... 30 more

Offline Karmington

Senior Member


Medals: 1
Projects: 1


Co-op Freak


« Reply #4 - Posted 2009-10-11 02:32:12 »

ok, the site demo still throws, as said above: (it has worked earlier this year though)
Exception in thread "AWT-EventQueue-2" java.lang.RuntimeException: Can not get proc address for method "alcCaptureCloseDevice": Couldn't set value of field "_addressof_alcCaptureCloseDevice" in class net.java.games.joal.impl.ALCProcAddressTable
   at com.sun.gluegen.runtime.ProcAddressHelper.resetProcAddressTable(ProcAddressHelper.java:113)
   at net.java.games.joal.impl.ALProcAddressLookup.resetALCProcAddressTable(ALProcAddressLookup.java:109)
   at net.java.games.joal.impl.ALCImpl.alcOpenDevice(ALCImpl.java:341)
   at net.java.games.joal.util.ALut.alutInit(ALut.java:69)
Caused by: java.lang.RuntimeException: Unable to find and load OpenAL library
   at net.java.games.joal.impl.ALProcAddressLookup$DynamicLookup.dynamicLookupFunction(ALProcAddressLookup.java:66)


My own program was giving me an exception on initing AL, this is however working again.
Exception in thread "AWT-EventQueue-7" java.lang.NoClassDefFoundError: de/jarnbjo/vorbis/VorbisStream

So it seems being dependent on some other site to get the correct libraries is just a crap decision, if they change or
are down for whatever reason the applet wont work, AND it wont get caught with a try/catch!
With LWJGL seems like i can put the relevant libs in the server, and be 100% certain they will work, not relying on outside links.

Still all this is a farcry from the ease of Flash deployment, and I'm starting to understand why most game sites won't accept Java applications...
If I cant pack my game into ONE file, then app management for a big game site becomes that much more of a hassle.
They have to have the right stuff in the html, and extra files for either the jnlp header.
The JNLP loading is dead ugly.. I'm starting to seriously think about switching to Flash after this project *sigh*



Offline Abuse

JGO Coder


Medals: 11


falling into the abyss of reality


« Reply #5 - Posted 2009-10-11 03:37:43 »

Sound doesn't appear to be the only problem with that JOGL Applet.
When I scroll the page using the mouse wheel (Firefox 3.0.1.4; Java 1.6.0_15, nvidia 8800gtx), the 3d portion of the Applet (GLCanvas?) draws outside the bounds of the Applet. (temporarily dirtying the the "The applet above is instantiated with the following code:" text immediately below the applet)

As for IE8.... it doesn't even launch. "Error : java.io.IOException: Cannot find certificates for JNLPAppletLauncher class"  persecutioncomplex

Make Elite IV:Dangerous happen! Pledge your backing at KICKSTARTER here! https://dl.dropbox.com/u/54785909/EliteIVsmaller.png
Offline bienator

Senior Member




OutOfCoffeeException


« Reply #6 - Posted 2009-10-11 14:01:23 »

So it seems being dependent on some other site to get the correct libraries is just a crap decision..
yes, never use nightly builds in a production system

just for the record: JOGL2 hasn't been released yet.

Offline kappa
« League of Dukes »

JGO Kernel


Medals: 74
Projects: 15


★★★★★


« Reply #7 - Posted 2009-10-11 14:59:44 »

They have to have the right stuff in the html, and extra files for either the jnlp header or the LWJGL files...
The JNLP loading is dead ugly, and the LWJGL can't be packaged into the jar?

If your using an applet with LWJGL, you can package your whole project into two jars, one jar will contain your project+lwjgl and the other will contain the native dll files.
Plus it has a nice loading screen Smiley

an example of a LWJGL applet project can be found here (OpenGL + OpenAL used, do also notice the fullscreen support Smiley)
Offline Karmington

Senior Member


Medals: 1
Projects: 1


Co-op Freak


« Reply #8 - Posted 2009-10-11 16:21:34 »

kapta's game is looking damn good - clean loader, tells you exactly whats going on, minimum of 'blank screen'
you wouldn't happen to have written a tutorial on how to make this system?
Or is this all part of the Slick package?

Offline kappa
« League of Dukes »

JGO Kernel


Medals: 74
Projects: 15


★★★★★


« Reply #9 - Posted 2009-10-11 16:35:33 »

the loader is LWJGL's AppletLoader (handles all the dirty stuff with deploying natives, has a fully customisable loading screen, its own caching mechanism and provides pack200 + lzma support).

The applet and full screen stuff is part of Slick2D but should be fairly easy to do with plain LWJGL if you are familiar with OpenGL.

You can download the LWJGL Applet package to see a simple example on how to use LWJGL with applets, the slick wiki has a few tutorials on how to create similar applets with slick (but should be relatively easy to apply to normal LWJGL applets depending on how familiar you are with LWJGL and slick).

You can probably also get real time support on the lwjgl's irc channel at #LWJGL on freenode.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #10 - Posted 2009-10-11 22:21:13 »

(Bah: got this under Chrome:):
1  
2  
3  
4  
5  
java.lang.NullPointerException
   at org.lwjgl.util.applet.AppletLoader.validateCertificateChain(Unknown Source)
   at org.lwjgl.util.applet.AppletLoader.extractNatives(Unknown Source)
   at org.lwjgl.util.applet.AppletLoader.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)

after loading seemed to complete.

Cas Smiley

Offline kappa
« League of Dukes »

JGO Kernel


Medals: 74
Projects: 15


★★★★★


« Reply #11 - Posted 2009-10-11 22:24:26 »

It means you somehow got a corrupt download on one of the native jars.

The problem is fixed in svn and latest nightly builds of LWJGL's AppletLoader, so should no longer happen in future versions of LWJGL as the AppletLoader has recently got a much more robust and reliable download system.

Just waiting for LWJGL 2.2, it should be out any day now.

edit: @princec just updated the version on that game, can you give it another try?
Offline princec

JGO Kernel


Medals: 343
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #12 - Posted 2009-10-12 07:47:41 »

That's better Smiley

Cas Smiley

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #13 - Posted 2009-10-12 08:46:16 »

Just waiting for LWJGL 2.2, it should be out any day now.
I am trying to find some time to do it between other work and moving - not sure when "any day now" is :/
hopefully I can find some time on tomorrow or the day after that ... I need to finish some other work tonight and and friday we're moving.
and moving == semi-offline until the 26th earliest Sad

Offline Karmington

Senior Member


Medals: 1
Projects: 1


Co-op Freak


« Reply #14 - Posted 2009-10-13 01:20:51 »

Final note, i guess jnlp is not really the problem- i finally understood that the main thing annoying me is the blank white screen while loading libraries, no way to get a splash screen in there?

The failing OggVorbis was inside code, not jnlp's fault:
Is it in any way possible to use the NOT nightly builds, now using:

import de.jarnbjo.ogg.CachedUrlStream;
import de.jarnbjo.ogg.EndOfOggStreamException;
import de.jarnbjo.ogg.LogicalOggStream;
import de.jarnbjo.vorbis.IdentificationHeader;
import de.jarnbjo.vorbis.VorbisStream;

And one more question: why doesn't a generic try/catch fail here?
1  
2  
3  
4  
5  
6  
7  
try {
       System.out.println("init Sounds");
        // REM crashing here when de/jarnbjo not available...
       sm=new SoundManager();
} catch (Exception e) {
   e.printStackTrace();
}

Do I need specifically the Unsatisfied Link Error or something?

Should i be taking the actual source he uses and putting that into my code?
This is the closest i could find i think
http://svn.shredzone.org/tags/ifish/v1.4/src/de/jarnbjo/

I'd really like to be certain I have a working version as backup before I start
the overhaul to LWJGL...

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #15 - Posted 2009-10-13 11:53:01 »

Exception != Error - try catching Throwable insteasd (that should catch everything)

Offline Karmington

Senior Member


Medals: 1
Projects: 1


Co-op Freak


« Reply #16 - Posted 2009-10-13 15:30:49 »

I dont quite get how. I can't implement Throwable for SoundManager class:
"The type Throwable cannot be a superinterface of SoundManager; a superinterface must be an interface"
Could you explain in more detail how this should be done?

EDIT: Thanks Matzon!

Offline Matzon

JGO Knight


Medals: 19
Projects: 1


I'm gonna wring your pants!


« Reply #17 - Posted 2009-10-13 16:02:13 »

1  
2  
3  
4  
5  
6  
7  
try {
       System.out.println("init Sounds");
        // REM crashing here when de/jarnbjo not available...
       sm=new SoundManager();
} catch (Throwable t) {
   t.printStackTrace();
}

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.

Riven (7 views)
2014-07-29 12:53:52

Dwinin (7 views)
2014-07-29 10:59:34

E.R. Fleming (23 views)
2014-07-29 03:07:13

E.R. Fleming (9 views)
2014-07-29 03:06:25

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

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

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

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

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

Zero Volt (51 views)
2014-07-17 23:47:54
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!