Login  Register

Re: Jogl/Jogamp on Java 9 no compatible graphics context

Posted by douglaslyon on Jan 07, 2018; 12:34pm
URL: https://forum.jogamp.org/Jogl-Jogamp-on-Java-9-tp4038012p4038484.html

You Write:
"You're still mixing Java3D 1.6.0 with an obsolete version."
How do I track down all obsolete versions of java3d and remove them?
Perhaps there is a configuration issue here. It seems that all
of my efforts (no matter how extreme) are unable to solve this
basic issue.

In the c: drive I have searched for joamp and j3dcore and there are no
files (at least in the "program files\java" dir) with this name.

Also, things are working with intellij

I note that  "imagej" has its own jvms and an
older version of java3d. I used the uninstaller to remove it.

The mac seems to be working fine, with webstart. But the web start
resources on a mac:
<resources os="Mac">
       <jar href="libs/jogl/j3dcore.jar" download="eager"/>
       <jar href="libs/jogl/j3dutils.jar"  download="eager"/>
       <jar href="libs/jogl/vecmath.jar"  download="eager"/>
       <jar href="libs/jogl/jogamp-fat.jar"     download="eager"/>
</resources>

would not work, as is, for windows. So I broke out the dlls and signed
them separately for amd6 and 386;
<resources os="Windows">
       <jar href="libs/jogl/j3dcore.jar" download="eager"/>
       <jar href="libs/jogl/j3dutils.jar"  download="eager"/>
       <jar href="libs/jogl/vecmath.jar"  download="eager"/>
</resources>

Here, I added the awt.dll.jar, even though I know awt is a part of the
jre. I did this because I was getting an exception on the windows
machine that it "can't find awt.dll".

<resources os="Windows" arch="amd64">
<nativelib href="libs/jogl/natives/windows-amd64/awt.dll.jar"
download="eager"/>
<nativelib href="libs/jogl/natives/windows-amd64/gluegen-rt.dll.jar"
download="eager"/>
<nativelib href="libs/jogl/natives/windows-amd64/joal.dll.jar"
download="eager"/>
<nativelib href="libs/jogl/natives/windows-amd64/jocl.dll.jar"
download="eager"/>
<nativelib href="libs/jogl/natives/windows-amd64/jogl_desktop.dll.jar"
download="eager"/>
<nativelib href="libs/jogl/natives/windows-amd64/jogl_mobile.dll.jar"
download="eager"/>
<nativelib
href="libs/jogl/natives/windows-amd64/nativewindow_awt.dll.jar"
download="eager"/>
<nativelib
href="libs/jogl/natives/windows-amd64/nativewindow_win32.dll.jar"
download="eager"/>
<nativelib href="libs/jogl/natives/windows-amd64/newt.dll.jar"
download="eager"/>
<nativelib href="libs/jogl/natives/windows-amd64/oculusvr.dll.jar"
download="eager"/>
<nativelib href="libs/jogl/natives/windows-amd64/soft_oal.dll.jar"
download="eager"/>
</resources>

<resources os="Windows" arch="x86">
<nativeib href="libs/jogl/natives/windows-i586/gluegen-rt.dll.jar"
download="eager"/>
<nativeib href="libs/jogl/natives/windows-i586/joal.dll.jar"
download="eager"/>
<nativeib href="libs/jogl/natives/windows-i586/jocl.dll.jar"
download="eager"/>
<nativeib href="libs/jogl/natives/windows-i586/jogl_desktop.dll.jar"
download="eager"/>
<nativeib href="libs/jogl/natives/windows-i586/jogl_mobile.dll.jar"
download="eager"/>
<nativeib href="libs/jogl/natives/windows-i586/nativewindow_awt.dll.jar"
download="eager"/>
<nativeib
href="libs/jogl/natives/windows-i586/nativewindow_win32.dll.jar"
download="eager"/>
<nativeib href="libs/jogl/natives/windows-i586/newt.dll.jar"
download="eager"/>
<nativeib href="libs/jogl/natives/windows-i586/oculusvr.dll.jar"
download="eager"/>
<nativeib href="libs/jogl/natives/windows-i586/soft_oal.dll.jar"
download="eager"/>
</resources>

I deleted all the temporary files and cleared the java cache viewer in
webstart.
java.lang.ArrayIndexOutOfBoundsException: -1
        at
jogamp.opengl.windows.wgl.awt.WindowsAWTWGLGraphicsConfigurationFactory.chooseGraphicsConfigurationImpl(WindowsAWTWGLGraphicsConfigurationFactory.java:171)
        at
com.jogamp.nativewindow.GraphicsConfigurationFactory.chooseGraphicsConfiguration(GraphicsConfigurationFactory.java:424)
        at
com.jogamp.opengl.awt.GLCanvas.chooseGraphicsConfiguration(GLCanvas.java:1560)
        at com.jogamp.opengl.awt.GLCanvas.addNotify(GLCanvas.java:611)
        at java.desktop/java.awt.Container.addNotify(Unknown Source)
        at java.desktop/java.awt.Window.addNotify(Unknown Source)
        at java.desktop/java.awt.Frame.addNotify(Unknown Source)
        at java.desktop/java.awt.Window.show(Unknown Source)
        at java.desktop/java.awt.Component.show(Unknown Source)
        at java.desktop/java.awt.Component.setVisible(Unknown Source)
        at java.desktop/java.awt.Window.setVisible(Unknown Source)
        at j3d.JOGLQuad.main(JOGLQuad.java:96)
        at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
        at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown
Source)
        at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
        at java.base/java.lang.reflect.Method.invoke(Unknown Source)
        at jdk.javaws@9.0.1/com.sun.javaws.Launcher.executeApplication(Unknown
Source)
        at jdk.javaws@9.0.1/com.sun.javaws.Launcher.executeMainClass(Unknown
Source)
        at jdk.javaws@9.0.1/com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
        at jdk.javaws@9.0.1/com.sun.javaws.Launcher.run(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)

If we deploy jars directly, as you suggest below how will we avoid
improperly synchronized versions?

Don't we need an installer and an uninstaller for this?

Without webstart how will we deploy to the public?

I know, someone said that webstart will be removed in the future, but
we never are told why, or when, or what is to replace it. If
someone knows what we, as Java programmers are supposed to do, that
would be good to know.

Thanks!
  - Doug



On 1/6/18 2:41 PM, gouessej [via jogamp] wrote:

> j3dcore-ogl_dll does not exist in Java3D >= 1.6.0!!! It was used in
> Java3D <= 1.5.2 by the native OpenGL renderer *NOT* based on JOGL.
> You're still mixing Java3D 1.6.0 with an obsolete version. Yes it's
> right, win32 designates the Win32 API whatever the bitness.
>
> Keep in mind that numerous virus scanners are paranoid. Sometimes, they
> block the DLLs being extracted by GlueGen when using jogamp-far.jar but
> it happens with DLLs provided in separate JARs in some rare cases too.
> You can adapt your deployment to work around some unwanted behaviours
> but it won't work everywhere with Java Webstart. The least annoying
> solution (in my humble opinion) consists in not using Java Webstart and
> deploying the native libraries directly without using JARs which is
> impossible with Java Webstart. This is what causes the least problems.
>
> The stack trace mentions the bug 1004, I'll have to investigate.
> Julien Gouesse | Personal blog <http://gouessej.wordpress.com> | Website
> <http://tuer.sourceforge.net>
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.jogamp.org/Jogl-Jogamp-on-Java-9-tp4038012p4038483.html
> To unsubscribe from Jogl/Jogamp on Java 9, click here
> <
> NAML
> <
http://forum.jogamp.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>