Java3D 1.6 Web Start from Mac OS X to Multi OS

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|

Java3D 1.6 Web Start from Mac OS X to Multi OS

bjoern
Hi all!

I have serious problems getting our applications on web start running. I am using J3D 1.6 rc11 successfully for a longer time already for our standalone applications, just using self-executable jars - runs perfectly! Thanks again for all your brilliant work!

But now our current major app, the MembraneEditor, requires newly-signed web start jars, and I want to take this chance to completely move away from the old Sun stuff (and give also full access to the Mac world ;-)

However, big problem, it does not work.

I was following Julien's tutorial:

https://gouessej.wordpress.com/2012/08/01/java-3d-est-de-retour-java-3d-is-back/

I am using:

j3dcore.jar
j3dutils.jar
vecmath.jar
jogamp-fat.jar


of the 1.6 final release. In addition I have to say, I first used - instead of jogamp-fat.jar - a couple of separate files with the same result:

jogl-all.jar
gluegen-rt-natives-android-armv6.jar
gluegen-rt-natives-linux-amd64.jar
gluegen-rt-natives-linux-armv6.jar
gluegen-rt-natives-linux-armv6hf.jar
gluegen-rt-natives-linux-i586.jar
gluegen-rt-natives-macosx-universal.jar
gluegen-rt-natives-solaris-amd64.jar
gluegen-rt-natives-solaris-i586.jar
gluegen-rt-natives-windows-amd64.jar
gluegen-rt-natives-windows-i586.jar
jogl-all-natives-android-armv6.jar
jogl-all-natives-linux-amd64.jar
jogl-all-natives-linux-armv6.jar
jogl-all-natives-linux-armv6hf.jar
jogl-all-natives-linux-i586.jar
jogl-all-natives-macosx-universal.jar
jogl-all-natives-solaris-amd64.jar
jogl-all-natives-solaris-i586.jar
jogl-all-natives-windows-amd64.jar
jogl-all-natives-windows-i586.jar
gluegen-rt.jar
gluegen.jar
joal.jar


But if I understood Julien's blog correctly, this is a waste of time unless you are planning to work and update separate libraries here. So I just use now jogamp-fat.jar

Then, I found a couple of useful forum entries, and my jnlp contains, e.g.:

        <security>
                <all-permissions />
        </security>
       
        <property name="sun.java2d.noddraw" value="true"/>
        <property name="sun.java2d.d3d" value="false"/>
        <property name="sun.java2d.opengl" value="false"/> 
        <property name="j3d.rend" value="jogl"/>


... as well as the link to all jar files as <resources> entries.

I modified all jar files and they contain now in the MANIFEST.MF the entries

Permissions: all-permissions
Caller-Allowable-Codebase: *
Codebase: *


They are all signed with my actual software signing certificate.
The Web Start application downloads without any warnings or errors.
The installation process is correctly starting, but then the following happens:



Java Web Start 11.131.2.11 x86_64
Using JRE version 1.8.0_131-b11 Java HotSpot(TM) 64-Bit Server VM
User home directory = /Users/bjsommer
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
0-5: set trace level to <n>
----------------------------------------------------
CacheEntry[https://www.CELLmicrocosmos.org/cm2/startCm2.jnlp]: updateAvailable=true,lastModified=Mon May 01 22:34:28 CEST 2017,length=2321
CELLmicrocosmos MembraneEditor Version 2.2.2_1


[Parameters]
-filepath of an existing membrane
[Options]
-help       |  starts the program's user manual
-reset      |  start with default settings    
-system_L&F |  use the platform Look & Feel    
                                               
Memory Check:  max. 1908932608 bytes for Java heap space reserved
                                               
                                               
please wait .... Done!
this.mifile_pdbtm /Users/bjsommer/Cm2/cm2settings/pdbtm.mif
JNLPClassLoader: Finding library libjava.dylib
JNLPClassLoader: Finding library liblibGLESv3.so.3.dylib
JNLPClassLoader: Finding library liblibGLESv3.so.dylib
JNLPClassLoader: Finding library libGLESv3.dylib
JNLPClassLoader: Finding library libGLES30.dylib
JNLPClassLoader: Finding library liblibGLESv3.dylib
JNLPClassLoader: Finding library liblibGLES30.dylib
JNLPClassLoader: Finding library liblibGLESv2.so.2.dylib
JNLPClassLoader: Finding library liblibGLESv2.so.dylib
JNLPClassLoader: Finding library libGLESv2.dylib
JNLPClassLoader: Finding library libGLES20.dylib
JNLPClassLoader: Finding library libGLESv2_CM.dylib
JNLPClassLoader: Finding library liblibGLESv2.dylib
JNLPClassLoader: Finding library liblibGLESv2_CM.dylib
JNLPClassLoader: Finding library liblibGLES20.dylib
JNLPClassLoader: Finding library liblibEGL.so.1.dylib
JNLPClassLoader: Finding library liblibEGL.so.dylib
JNLPClassLoader: Finding library libEGL.dylib
JNLPClassLoader: Finding library liblibEGL.dylib
JNLPClassLoader: Finding library liblibGLESv1_CM.so.2.dylib
JNLPClassLoader: Finding library liblibGLESv1_CM.so.dylib
JNLPClassLoader: Finding library libGLESv1_CM.dylib
JNLPClassLoader: Finding library libGLES_CM.dylib
JNLPClassLoader: Finding library libGLES_CL.dylib
JNLPClassLoader: Finding library liblibGLESv1_CM.dylib
JNLPClassLoader: Finding library liblibGLES_CM.dylib
JNLPClassLoader: Finding library liblibGLES_CL.dylib
JNLPClassLoader: Finding library liblibEGL.so.1.dylib
JNLPClassLoader: Finding library liblibEGL.so.dylib
JNLPClassLoader: Finding library libEGL.dylib
JNLPClassLoader: Finding library liblibEGL.dylib
JNLPClassLoader: Finding library liblibEGL.so.1.dylib
JNLPClassLoader: Finding library liblibEGL.so.dylib
JNLPClassLoader: Finding library libEGL.dylib
JNLPClassLoader: Finding library liblibEGL.dylib
M3D 1
java.lang.NullPointerException
        at java.awt.Window.addToWindowList(Window.java:2824)
        at java.awt.Window.init(Window.java:489)
        at java.awt.Window.<init>(Window.java:436)
        at java.awt.Frame.<init>(Frame.java:446)
        at java.awt.Frame.<init>(Frame.java:404)
        at javax.media.j3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8370)
        at javax.media.j3d.Renderer.doWork(Renderer.java:496)
        at javax.media.j3d.J3dThread.run(J3dThread.java:271)
Exception in thread "Thread-16" java.lang.NullPointerException
        at org.cellmicrocosmos.cm2.functionality3d.Membrane3D.<init>(Unknown Source)
        at org.cellmicrocosmos.cm2.gui.elements.MembraneView.<init>(Unknown Source)
        at org.cellmicrocosmos.cm2.engine.Engine.<init>(Unknown Source)
        at org.cellmicrocosmos.cm2.engine.StartMain$1.run(Unknown Source)



A similar problem had Andreas before:
http://forum.jogamp.org/Jogl-in-a-webstart-application-td4029613.html

But his problem was solved by taking the hints above into account and by updating to a new Jogamp version. I am using now the newest version of Jogamp and Java3D (and before, I was using rc11 with the same effect), but I do not get rid of this error.

The problem is occurring here in my code:

...
GraphicsConfiguration config = null;
...
config = SimpleUniverse.getPreferredConfiguration();
...
membraneUniverseCanvas = new Canvas3D(config)
...




The error is somewhere around the JOGLPipeline occuring; line 8370 is:

GraphicsDevice device = gc[0].getDevice();
        AbstractGraphicsScreen screen = (device != null) ? AWTGraphicsScreen.createScreenDevice(device, AbstractGraphicsDevice.DEFAULT_UNIT) :
            AWTGraphicsScreen.createDefault();

     // Create a Frame and dummy GLCanvas to perform eager pixel format selection

        // Note that we loop in similar fashion to the NativePipeline's
        // native code in the situation where we need to disable certain
        // capabilities which aren't required
        boolean tryAgain = true;
        CapabilitiesCapturer capturer = null;
        AWTGraphicsConfiguration awtConfig = null;
        while (tryAgain) {
            Frame f = new Frame(device.getDefaultConfiguration());



So, maybe I am blind and I forget an important step in between, but otherwise I seem to have a serious AWT problem?! Or what am I doing wrong?

My second concrete question in this context is: Can I just use these libraries for all OS?

j3dcore.jar
j3dutils.jar
vecmath.jar
jogamp-fat.jar


I know that it works for self-exectuable jars, but does it also work for Web Start or do I have to optimize the JNLP file for every OS? I was spying at http://www.sweethome3d.com - there are different Java3D versions for Win/Linux/Mac. But for most people it would be much better if you can use only one file for all OS, and I think, this is what the developers had in mind here.

If you want to have a look to the not-functioning app, here you can find it:
https://www.CELLmicrocosmos.org/cm2/startCm2.jnlp

Thanks for any hint and best, Bjorn
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

philjord
This post was updated on .
Bjoern,
Firstly thanks for an excellent description of your issue, lots of detail and obviously you've done plenty of investigation.

Your jar inclusions look good, the jogamp-fat.jar is a fine option.

These threee properties probably aren't useful
        <property name="sun.java2d.d3d" value="false"/>
        <property name="sun.java2d.opengl" value="false"/> 
        <property name="j3d.rend" value="jogl"/>


But I'd suggest adding
<property name="sun.awt.noerasebackground" value="true"/>


Without setting up a full development environment debugging this issue is difficult at my end because jnlp doesn't let me swap out jar files to do testing.

Your investigations got you almost right up to the exact line of the NPE
AppContext.getAppContext()  is returning null

This is apparently an issue that arrived with Java 7u25
https://bugs.openjdk.java.net/browse/JDK-8135232
http://stackoverflow.com/questions/17326239/appcontext-getappcontext-is-null-when-javafx-2-app-is-run-in-a-browser
http://stackoverflow.com/questions/17223304/appcontext-is-null-from-rmi-thread-with-java-7-update-25


And obviously it has been struck before in Java3D as there is a work around set up in the JoglPipeline already
    // Fix for Bug 983
    private void checkAppContext()

This is called from the createNewContext method, but that is well after the getBestConfiguration method where you are striking the problem.

As a test to see if simply calling this method earlier will fix the issue I've built a test jar from 1.6.0, could you put it into the jnlp location and test it?



Thanks,
Phil.



Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

bjoern
Hi Phil,
you are definitively the hero of this evening.
So I put your jar file in my pipeline, and these are the errors, which occurred on Mac OS X:

CacheEntry[https://www.CELLmicrocosmos.org/cm2/startCm2.jnlp]: updateAvailable=true,lastModified=Mon May 01 23:33:22 CEST 2017,length=2363
Java Web Start 11.131.2.11 x86_64
Using JRE version 1.8.0_131-b11 Java HotSpot(TM) 64-Bit Server VM
User home directory = /Users/bjsommer
----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
m:   print memory usage
o:   trigger logging
p:   reload proxy configuration
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
0-5: set trace level to <n>
----------------------------------------------------
CacheEntry[https://www.CELLmicrocosmos.org/cm2/org/cellmicrocosmos/cm2/lib/jfree/jcommon-1.0.16.jar]: updateAvailable=true,lastModified=Mon May 01 22:34:37 CEST 2017,length=336216
CacheEntry[https://www.CELLmicrocosmos.org/cm2/org/cellmicrocosmos/cm2/lib/idw/idw-gpl.jar]: updateAvailable=true,lastModified=Mon May 01 22:34:35 CEST 2017,length=819031
CacheEntry[https://www.CELLmicrocosmos.org/cm2/cm2.jar]: updateAvailable=true,lastModified=Mon May 01 22:34:37 CEST 2017,length=16610400
CacheEntry[https://www.CELLmicrocosmos.org/cm2/org/cellmicrocosmos/cm2/lib/jogl/jogamp-fat.jar]: updateAvailable=true,lastModified=Mon May 01 22:34:40 CEST 2017,length=9640916
CacheEntry[https://www.CELLmicrocosmos.org/cm2/org/cellmicrocosmos/cm2/lib/jfree/jfreechart-1.0.13.jar]: updateAvailable=true,lastModified=Mon May 01 22:34:38 CEST 2017,length=1496624
CacheEntry[https://www.CELLmicrocosmos.org/cm2/org/cellmicrocosmos/cm2/lib/substance/substance.jar]: updateAvailable=true,lastModified=Mon May 01 22:34:40 CEST 2017,length=1773988
CacheEntry[https://www.CELLmicrocosmos.org/cm2/org/cellmicrocosmos/cm2/lib/jdom/jdom.jar]: updateAvailable=true,lastModified=Mon May 01 22:34:37 CEST 2017,length=161341
CacheEntry[https://www.CELLmicrocosmos.org/cm2/org/cellmicrocosmos/cm2/lib/tools/tools.jar]: updateAvailable=true,lastModified=Mon May 01 22:34:42 CEST 2017,length=14925476
CacheEntry[https://www.CELLmicrocosmos.org/cm2/org/cellmicrocosmos/cm2/lib/j3d/j3d-org-geom-core.jar]: updateAvailable=true,lastModified=Mon May 01 22:34:35 CEST 2017,length=82376
CacheEntry[https://www.CELLmicrocosmos.org/cm2/org/cellmicrocosmos/cm2/lib/j3d/j3dcore.jar]: updateAvailable=true,lastModified=Mon May 01 22:34:36 CEST 2017,length=2893133
CacheEntry[https://www.CELLmicrocosmos.org/cm2/org/cellmicrocosmos/cm2/lib/j3d/j3dutils.jar]: updateAvailable=true,lastModified=Mon May 01 22:34:37 CEST 2017,length=1721420
CacheEntry[https://www.CELLmicrocosmos.org/cm2/org/cellmicrocosmos/cm2/lib/j3d/vecmath.jar]: updateAvailable=true,lastModified=Mon May 01 22:34:37 CEST 2017,length=322424
CELLmicrocosmos MembraneEditor Version 2.2.2_2PRE1


[Parameters]
-filepath of an existing membrane
[Options]
-help       |  starts the program's user manual
-reset      |  start with default settings    
-system_L&F |  use the platform Look & Feel    
                                               
Memory Check:  max. 1908932608 bytes for Java heap space reserved
                                               
                                               
please wait .... Done!
this.mifile_pdbtm /Users/bjsommer/Cm2/cm2settings/pdbtm.mif
JNLPClassLoader: Finding library libjava.dylib
JNLPClassLoader: Finding library liblibGLESv3.so.3.dylib
JNLPClassLoader: Finding library liblibGLESv3.so.dylib
JNLPClassLoader: Finding library libGLESv3.dylib
JNLPClassLoader: Finding library libGLES30.dylib
JNLPClassLoader: Finding library liblibGLESv3.dylib
JNLPClassLoader: Finding library liblibGLES30.dylib
JNLPClassLoader: Finding library liblibGLESv2.so.2.dylib
JNLPClassLoader: Finding library liblibGLESv2.so.dylib
JNLPClassLoader: Finding library libGLESv2.dylib
JNLPClassLoader: Finding library libGLES20.dylib
JNLPClassLoader: Finding library libGLESv2_CM.dylib
JNLPClassLoader: Finding library liblibGLESv2.dylib
JNLPClassLoader: Finding library liblibGLESv2_CM.dylib
JNLPClassLoader: Finding library liblibGLES20.dylib
JNLPClassLoader: Finding library liblibEGL.so.1.dylib
JNLPClassLoader: Finding library liblibEGL.so.dylib
JNLPClassLoader: Finding library libEGL.dylib
JNLPClassLoader: Finding library liblibEGL.dylib
JNLPClassLoader: Finding library liblibGLESv1_CM.so.2.dylib
JNLPClassLoader: Finding library liblibGLESv1_CM.so.dylib
JNLPClassLoader: Finding library libGLESv1_CM.dylib
JNLPClassLoader: Finding library libGLES_CM.dylib
JNLPClassLoader: Finding library libGLES_CL.dylib
JNLPClassLoader: Finding library liblibGLESv1_CM.dylib
JNLPClassLoader: Finding library liblibGLES_CM.dylib
JNLPClassLoader: Finding library liblibGLES_CL.dylib
JNLPClassLoader: Finding library liblibEGL.so.1.dylib
JNLPClassLoader: Finding library liblibEGL.so.dylib
JNLPClassLoader: Finding library libEGL.dylib
JNLPClassLoader: Finding library liblibEGL.dylib
JNLPClassLoader: Finding library liblibEGL.so.1.dylib
JNLPClassLoader: Finding library liblibEGL.so.dylib
JNLPClassLoader: Finding library libEGL.dylib
JNLPClassLoader: Finding library liblibEGL.dylib
M3D 1
java.lang.Throwable
        at javax.media.j3d.JoglPipeline.checkAppContext(JoglPipeline.java:6343)
        at javax.media.j3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8309)
        at javax.media.j3d.Renderer.doWork(Renderer.java:496)
        at javax.media.j3d.J3dThread.run(J3dThread.java:271)
2 - sun.awt.CGraphicsDevice@2da19e7f
7 - java.awt.Rectangle[x=0,y=0,width=1280,height=800]
M3D 2
M3D 3
M3D 5
Java3D version 1.6.0 fcs fcs detected.
 For HUD support, please install Java 3D version 1.5.2 and use OpenGL mode (Standard).
 Otherwise, deactivate the HUD in menu GUI -> HUD -> OFF

M3D 6
StereoView disabled.
 If you have a compatible stereo device like the
 nVidia Quadro FX cards and installed an actual driver,
 please add to your VM arguments:
 -Dj3d.stereo=PREFERRED
 and enable stereo at your graphic driver.

M3D 7
M3D 11
M3D 12
java.lang.Throwable
        at javax.media.j3d.JoglPipeline.checkAppContext(JoglPipeline.java:6343)
        at javax.media.j3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8309)
        at javax.media.j3d.Renderer.doWork(Renderer.java:496)
        at javax.media.j3d.J3dThread.run(J3dThread.java:271)
M3D 13
M3D 14
M3D 16
M3D 17
M3D 18
M3D 8
M3D 9
updateIntersectionDisplay(dialog/null)
uid 1
uid 2
uid 3
uid 4
uid 5
uid 6
java.lang.Throwable
        at javax.media.j3d.JoglPipeline.checkAppContext(JoglPipeline.java:6343)
        at javax.media.j3d.JoglPipeline.createNewContext(JoglPipeline.java:6373)
        at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:4602)
        at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:2376)
        at javax.media.j3d.Renderer.doWork(Renderer.java:881)
        at javax.media.j3d.J3dThread.run(J3dThread.java:271)
M3D 11
M3D 18
add new
whats going on 400
java.lang.Throwable
        at javax.media.j3d.JoglPipeline.checkAppContext(JoglPipeline.java:6343)
        at javax.media.j3d.JoglPipeline.createNewContext(JoglPipeline.java:6373)
        at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:4602)
        at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:2376)
        at javax.media.j3d.Renderer.doWork(Renderer.java:881)
        at javax.media.j3d.J3dThread.run(J3dThread.java:271)
java.lang.Throwable
        at javax.media.j3d.JoglPipeline.checkAppContext(JoglPipeline.java:6343)
        at javax.media.j3d.JoglPipeline.createNewContext(JoglPipeline.java:6373)
        at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:4602)
        at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:2376)
        at javax.media.j3d.Renderer.doWork(Renderer.java:881)
        at javax.media.j3d.J3dThread.run(J3dThread.java:271)
M3D 11
M3D 18
java.lang.Throwable
        at javax.media.j3d.JoglPipeline.checkAppContext(JoglPipeline.java:6343)
        at javax.media.j3d.JoglPipeline.createNewContext(JoglPipeline.java:6373)
        at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:4602)
        at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:2376)
        at javax.media.j3d.Renderer.doWork(Renderer.java:881)
        at javax.media.j3d.J3dThread.run(J3dThread.java:271)
updateIntersectionDisplay(dialog/null)
uid 1
uid 2
uid 3
uid 4
uid 5
uid 6


But the best thing is: after all these errors thrown: the app starts and works!

(If you mess around with the stereo side-by-side function, maybe it does not work for long, but its a start!)

Great, thanks a lot! So maybe you have some idea how to get rid of the other thrown errors? If you like, just check the link above, it should install on your computer without problems.

Thanks a lot also for your other links, I did not find this information before, might point a good way for alternative workarounds.

Next, I will post the errors from Windows 10.

Cheers, Bjorn
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

bjoern
Windows 10:

Java Web Start 11.131.2.11 amd64
JRE-Version verwenden 1.8.0_131-b11 Java HotSpot(TM) 64-Bit Server VM
Benutzer-Home-Verzeichnis = C:\Users\Mehmood
----------------------------------------------------
c:   Konsolenfenster löschen
f:   Objekte in Finalisierungs-Queue finalisieren
g:   Garbage Collect
h:   Diese Hilfemeldung anzeigen
m:   Speicherauslastung drucken
o:   Logging auslösen
p:   Proxykonfiguration neu laden
q:   Konsole ausblenden
r:   Policy-Konfiguration neu laden
s:   System- und Deployment-Eigenschaften ausgeben
t:   Threadliste ausgeben
v:   Threadstack ausgeben
0-5: Traceebene auf <n> setzen
----------------------------------------------------
CELLmicrocosmos MembraneEditor Version 2.2.2_2PRE1


[Parameters]
-filepath of an existing membrane
[Options]
-help       |  starts the program's user manual
-reset      |  start with default settings    
-system_L&F |  use the platform Look & Feel    
                                               
Memory Check:  max. 7626293248 bytes for Java heap space reserved
                                               
                                               
please wait .... Done!
this.mifile_pdbtm C:\Users\Mehmood\Cm2\cm2settings\pdbtm.mif
JNLPClassLoader: Finding library java.dll
JNLPClassLoader: Finding library jawt.dll
JNLPClassLoader: Finding library jawt.dll
JNLPClassLoader: Finding library OpenGL32.dll
JNLPClassLoader: Finding library libGLESv3.so.3.dll
JNLPClassLoader: Finding library libGLESv3.so.dll
JNLPClassLoader: Finding library GLESv3.dll
JNLPClassLoader: Finding library GLES30.dll
JNLPClassLoader: Finding library libGLESv3.dll
JNLPClassLoader: Finding library libGLES30.dll
JNLPClassLoader: Finding library libGLESv2.so.2.dll
JNLPClassLoader: Finding library libGLESv2.so.dll
JNLPClassLoader: Finding library GLESv2.dll
JNLPClassLoader: Finding library GLES20.dll
JNLPClassLoader: Finding library GLESv2_CM.dll
JNLPClassLoader: Finding library libGLESv2.dll
JNLPClassLoader: Finding library libGLESv2_CM.dll
JNLPClassLoader: Finding library libGLES20.dll
JNLPClassLoader: Finding library libEGL.so.1.dll
JNLPClassLoader: Finding library libEGL.so.dll
JNLPClassLoader: Finding library EGL.dll
JNLPClassLoader: Finding library libEGL.dll
JNLPClassLoader: Finding library libGLESv1_CM.so.2.dll
JNLPClassLoader: Finding library libGLESv1_CM.so.dll
JNLPClassLoader: Finding library GLESv1_CM.dll
JNLPClassLoader: Finding library GLES_CM.dll
JNLPClassLoader: Finding library GLES_CL.dll
JNLPClassLoader: Finding library libGLESv1_CM.dll
JNLPClassLoader: Finding library libGLES_CM.dll
JNLPClassLoader: Finding library libGLES_CL.dll
JNLPClassLoader: Finding library libEGL.so.1.dll
JNLPClassLoader: Finding library libEGL.so.dll
JNLPClassLoader: Finding library EGL.dll
JNLPClassLoader: Finding library libEGL.dll
JNLPClassLoader: Finding library OpenGL32.dll
JNLPClassLoader: Finding library libEGL.so.1.dll
JNLPClassLoader: Finding library libEGL.so.dll
JNLPClassLoader: Finding library EGL.dll
JNLPClassLoader: Finding library libEGL.dll
M3D 1
java.lang.Throwable
        at javax.media.j3d.JoglPipeline.checkAppContext(JoglPipeline.java:6343)
        at javax.media.j3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8309)
        at javax.media.j3d.Renderer.doWork(Renderer.java:496)
        at javax.media.j3d.J3dThread.run(J3dThread.java:271)
2 - D3DGraphicsDevice[screen=0]
7 - java.awt.Rectangle[x=0,y=0,width=1920,height=1200]
M3D 2
M3D 3
M3D 5
Java3D version 1.6.0 fcs fcs detected.
 For HUD support, please install Java 3D version 1.5.2 and use OpenGL mode (Standard).
 Otherwise, deactivate the HUD in menu GUI -> HUD -> OFF

M3D 6
StereoView disabled.
 If you have a compatible stereo device like the
 nVidia Quadro FX cards and installed an actual driver,
 please add to your VM arguments:
 -Dj3d.stereo=PREFERRED
 and enable stereo at your graphic driver.

M3D 7
M3D 11
M3D 12
java.lang.Throwable
        at javax.media.j3d.JoglPipeline.checkAppContext(JoglPipeline.java:6343)
        at javax.media.j3d.JoglPipeline.getBestConfiguration(JoglPipeline.java:8309)
        at javax.media.j3d.Renderer.doWork(Renderer.java:496)
        at javax.media.j3d.J3dThread.run(J3dThread.java:271)
M3D 13
M3D 14
M3D 16
M3D 17
M3D 18
M3D 8
M3D 9
updateIntersectionDisplay(dialog/null)
uid 1
uid 2
uid 3
uid 4
uid 5
uid 6
java.lang.Throwable
        at javax.media.j3d.JoglPipeline.checkAppContext(JoglPipeline.java:6343)
        at javax.media.j3d.JoglPipeline.createNewContext(JoglPipeline.java:6373)
        at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:4602)
        at javax.media.j3d.Canvas3D.createNewContext(Canvas3D.java:2376)
        at javax.media.j3d.Renderer.doWork(Renderer.java:881)
        at javax.media.j3d.J3dThread.run(J3dThread.java:271)
updateIntersectionDisplay()
updateIntersectionDisplay(dialog/null)
uid 1
uid 2
uid 3
uid 4
uid 5
uid 6
updateIntersectionDisplay(dialog/null)
uid 1
uid 2
uid 3
uid 4
uid 5
uid 6


Yes, and also here it works. Moreover, you can use side-by-side stereo without problems.

Bets, Bjorn
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

philjord
Bjoern,
All the thanks should go to you for posting a clear and thorough bug description. It made it extremely easy for me to find the solution.

The "errors" were simply some output I put in to ensure the calls were happening in the order I has expecting, so I can remove that now.

Java3D 1.6.0 has had a final build, so there can't be a bug fix put into that code line. I'll put it into the 1.7.0 pre2 code now, this (of course) may not help you much as you may want to be on the most stable release.

As a interim step I'm including another jar below that has the stack trace taken out, and has been given an explicit name including "pj1", you will need to take responsibility for this jar and understand it has a custom bug fix in it; including all that that might entail in the future (i.e. other changes will need to take it into account).
Don't worry too much, it's only that when custom builds turn up they need to be understood by anyone that uses them.

Then I'd suggest you start looking into moving onto 1.7.0 at some point so I can provide bug fixes to you more correctly.

j3dcore-1.jar


I'm really happy to hear you've got stereo going! Years ago I started playing around with it, and I could explore Oblivion in a Java3D game engine I've written with the Oculus Rift, but I haven't had time to look at it for over 2 years (!), so one day soon I'm hoping to get back into it, and each time I hear of people using stereo successful it makes me glad.

Phil.
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

hharrison
Hmm, if there are such simple bugs that can make life easier for people, maybe I should cherry-pick a them to a java3d 1.6.1?

Your fix for the Dialog() showing on the taskbar, and this fix are so trivial, maybe we should consider it...I dunno, what do people think?

Harvey
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

philjord
Harvey,
Sounds like a  good idea to me, if you're willing to keep it going with a trickle of minor fixes like that,. It would probably take pressure off me from people wanting to use 1.7.0 in production for those small bug fixes when it's not stable yet.

Phil.
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

Bjoern
Hi Phil, Hi Harvey!
Great, thanks a lot! I will put the new jar in my code tonight when I have time!
And Harvey, yes, would be great to make a new release with small but changes for other people. Obviously you fix both fix here problems which should be normally fixed by the Java developers - what they do not do ;-)
Yes, side-by-side stereo works, that is not so hard to implement. The more interesting part is for me if I can use professional stereo mode for, e.g., Quadra graphics, which worked with pre11 and non-webstart. That would be great and I will let you know.
Best and thanks a lot! Bjorn
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

gouessej
Administrator
In reply to this post by bjoern
Hi

At first, I'm a bit surprised to see someone still using Java Webstart whereas Java Deployment Tookit has become unusable and applets too. bjoern, I advise you to switch to Java3D 1.7.0, especially because you target OS X. I'll upload the Java documentation that Phil gave me as soon as possible to make it easier for you.

Harvey, just let me know when Java3D 1.6.1 is ready, I'll update the documentation.

Phil, what is different in your test JAR? You added a single bug fix, didn't you?

bjoern, you wrote that "it would be much better if you can use only one file for all OS" but I really advise you to think about a fallback solution in case Java Webstart stops working.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

philjord
Yep, just the line
checkAppContext();
into getBestConfiguration()
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

bjoern
In reply to this post by gouessej
Hi all!

So great, I switched to the new jar and it runs without any error messages.
But it is even better: I compiled an extra version supporting stereo for professional graphics like Quadro cards - and guess what? - it works! Tested on zSpace 200 and a 3D-TV from LG.

And that is the reason, Julien, while I think that Webstart is still quite powerful. Yes, Applets are dead, Oracle killed them years ago, and in times of WebGL there is no reason to bring it back as the browser puts additional restriction to the 3D environment. But the web start does not.

But I did now tests on Windows 10, Mac OS 10.10, each with Java 1.8.0_131, and just today also on a new Ubuntu version with OpenJDK 8 (8u121-b13) & IcedTea 8 plugin (1.6.2) - everything works. On Win and Ubuntu it works without additional steps, on Mac you have to do the typical stuff you always have to do with downloaded 3rd party apps (right click on file in Finder etc.). I also saw that IcedTea is working towards a version for Java 9, so this would another few years to the Web Start, I hope. However, I did not test e.g. with Win 10 and Java 9 by now, if Web Start stops working then.

Julien, my personal plan B is now to just put there always some self-executables for those who struggle with the Web Start or want to have separate apps. Of course it would be nice to have also some installation files for different systems like Sweet Home 3D which will afterwards automatically update, but I saw that this is quite time-intensive.

If you want to play around, try it here:
http://www.cellmicrocosmos.org/index.php/start

It's a pre release, I still have to fix some small bugs but which are not interesting for you.

Okay, so I am quite happy with 1.6 plus Phil's extra fix - but if stereo works with 1.7, I could also switch, as I think it is less work for you - but as I understood, it is still quite experimental and unstable, or? I would prefer the stable version ;-)

Thanks for all your help!

Best, Bjoern
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

philjord
Bjoern,
Membrane Editor looks cool, is there any way I can get an interesting cm2 file, is there any available on the web?


Phil.
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

gouessej
Administrator
In reply to this post by bjoern
Sorry to contradict you but as Java Deployment Toolkit doesn't work, there is no mean to detect whether the JRE is already installed on the system... which happens often nowadays as Java has become less popular :( I used Java Webstart for years since 2006 and finally, I gave up because a "trusted" signed certificate became necessary and there were too much breaking changes in Oracle's "security" enhancements.

self-executables? They have several limitations, you cannot increase the memory for the Java heap, etc...

Phil can confirm, we don't expect regressions in Java3D 1.7.0 as he is mainly working on Android support.

I don't find the license of your software. Maybe JNDT would help as I see no standalone version for OS X and GNU Linux.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

bjoern
Hi Phil, nice that you like our tool, so I prepared here something for you:

http://www.cellmicrocosmos.org/index.php/download/cm2-project-news

Interesting should be JCIM_Cm2_2_chapter_3_3.zip (Two membranes with proteins) and vesicle_meets_membrane__1_0merged_lipid_moved.zip (a vesicle). This structural bioinformatics tool is usually interesting for people creating initial structures for membrane simulations or who need a fast way to play around with different configuration settings for membranes.

Some videos about how to use the tool are here, in case you are interested:
https://www.cellmicrocosmos.org/index.php/videos

Please keep in mind: do not use the atomic view for large membranes, not the visualization, the modeling is here the key feature. Use the Jmol button if you want to look at the whole atomic structure of large membranes.


Julien, I see your point and it is not a miracle that you gave up on Web start. I think it was ca. 3 years ago where I required ca. one week to follow all instructions of the badly-documented changes from Oracle to get Web Start working again - it was a horror ;-)

Our self-exectuables should run on all OS, tested also with Mac OS and Windows. Our overall license is GPL3. Yes, a number of other projects are included, so I prefer not to pack everything into a single jar:

https://www.cellmicrocosmos.org/index.php/cm2help/11-more-about-the-editor/11-4-list-of-external-sources-and-packages

But thanks for the idea with JNDT, I will have a look at it, could be a good option for the future.

So if the Phil's changes arrive in Java3D 1.7.X, I will test it!

Best, Bjorn
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

bjoern
By the way: one key problem when working is web start is that you have to modify all jars with the corresponding tags, which were listed in the beginning. This great hint makes it very easy to edit the jar files:

It was from michaelwarne at this forum: https://forums.macrumors.com/threads/how-to-modify-a-java-jar-file.1136993/

1. Navigate to the file location in the terminal.
2. Type vim name.jar
3. Select the file you want to change and hit "Enter"
4. Edit the file [e.g., by navigating to a line to be changed, then hit 's' for example, make then your changes] and press "Esc" and ":wq!" to save and quit. [One more time ":q!" to exit the jar file]

This great hint makes life so much easier!
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

bjoern
Thanks to your help, we just released version Cm MembraneEditor 2.2.2_2!

http://www.cellmicrocosmos.org/index.php/home/cellmicrocosmos-news/235-07-05-2017-cm-2-2-2-2-release

In this release, I did not manage to get side-by-side stereo working on the Mac. So here it will be interesting to do some experiments with Java3D 1.7+ in the near future!

Best, Bjorn
Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

philjord
Bjorn,
Congratulations on your Quad2 release, it looks great.

I've had a play with that rat membrane you gave me, thanks,  everything works well and is very easy to install and getting running. The application itself is fabulous, but obviously very technical and over my "first year biology" head.

I'd also like to thank you for putting the links back to Jogamp in, I'm hoping to slowly increase awareness of Java3D so those sorts of things help a lot.

Just a note, my webstart start stopped loading in the cm2 file, but I just ran the executable jar and everything worked, no idea what happened.

I notice that my running the executable jar allowed memory to go to 2Gb, and looking on the web
http://stackoverflow.com/questions/4667483/how-is-the-default-java-heap-size-determined
I see that as of 1.6u18 or so the old idea of a tiny Ram size isn't important any more.

However I would add that I used a simple system that works very well, the executable jar just runs up a tiny bootstrap java process that then invokes another java process with the command line parameters in it and exits. Although the -Xmx appears to be less important now I also used that bootstrapper to download updates and overwrite the main jar, and more importantly I used it to give the parameter  
-Djava.ext.dirs=./none/
Which stops the mac OS from loading the old 1.5.2 java3d jars in ext.

If you do start to use the Java3D 1.7 look at j3dexamples for how to easily switch to the programmable pipeline.
This package is a good start point org.jdesktop.j3d.examples.gl2es2pipeline
The SimpleShaderAppearance will build most shaders for you, and can be used to see what the output of a given Appearance setup is in terms of shader.
Just using the gl2es2pipeline should give you a big performance boost.

If you want to really get performacne going well under take a look in /docs/perf_guide.txt
II - Performance in the API

There is some discussion about how to get the original retained mode performance out of Java3D, which was unfortunately broken in 1.5.2 just before public release. Java3D hasn't done scenegraph compiling since then, and if you can get it working it's incredible the difference in speed and memory usage.

Sweet Home 3D has a lot of great code in it, but note that the update system is once again hand rolled.

Thanks,
Phil.

Reply | Threaded
Open this post in threaded view
|

Re: Java3D 1.6 Web Start from Mac OS X to Multi OS

bjoern
Hi Phil!

I am happy that you like our proggy! Yes, it is indeed very technical, but it is a very convenient approach for those people who have to model a membrane.

And yes, I think we have to increase awareness of your Java3D implementation, because it is very powerfull and you guys extended the life of many software tools for the coming years - although Julien might be right in that Web Start will not live forever ;-)

Also thanks for the info about the heap space - that is good to know! But if I understood you right, you did not use Java 8, or? Indeed, I developed the new release on the Mac, so I am surprised if you would still have the problem with Java 8. The problem which you mention I once solved for another app: using Java 6 or 7, I asked the user if it is okay to remove Java 3D-related file from the Java folder - this is of course very dirty. You approach is of course much better:
-Djava.ext.dirs=./none/
However, I fear this is not possible for Java Web Start.

A long time ago we did experiments with the retained mode for the MembraneEditor, but as the requires a high level of interactivity, we skipped this idea later. So especially for molecular visualization it is interesting, as you have to visualize a lot of spheres in some modes. But as we later introduced also the possibility to change the coordinate of every single atom by our packing algorithms, the retained mode was not an option for us anymore. In the 3D Settings there is a Performance Mode hidden which is making a little bit use of tricks to increase the performance by removing the option to use atom-based modifications. Still, this is not comparable to retained mode.

But the strong aspect of JOGL is now, that you have in the background much more options to do tricks like shader programming in the future, and this is good that you go into this direction with J3D 1.7! And this is something which was nearly impossible with the old Java 3D implementation from Sun!

So I hope I will soon find some time to test 1.7!

Cheers,
Bjorn