Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help needed -- trying to use jogl/opengl? #10

Open
JoePfeiffer opened this issue Apr 5, 2023 · 0 comments
Open

Help needed -- trying to use jogl/opengl? #10

JoePfeiffer opened this issue Apr 5, 2023 · 0 comments

Comments

@JoePfeiffer
Copy link

JoePfeiffer commented Apr 5, 2023

I'm attempting to write an animation showing a rotating rocket in OR's photo studio (see the discussion around the motivation for openrocket/openrocket#2076 to get a sense of what I want to do).

Unfortunately, when I attempt to get the RealisticRenderer using

import net.sf.openrocket.gui.figure3d as f3d
rr = f3d.RealisticRenderer(doc)

I get:

Exception while calling OpenRocket
Traceback (most recent call last):
  File "ClassLoader.java", line 522, in java.lang.ClassLoader.loadClass
java.lang.java.lang.ClassNotFoundException: 

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "org.jpype.pkg.JPypePackage.java", line -1, in org.jpype.pkg.JPypePackage.getObject
java.lang.java.lang.NoClassDefFoundError: 

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/joseph/rockets/openrocket/orhelper/./animation.py", line 36, in 
    rr = f3d.RealisticRenderer(doc)
         ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/jpype/imports.py", line 87, in _JExceptionHandler
    raise ImportError("Unable to import '%s' due to missing dependency '%s'" % (
ImportError: Unable to import 'net.sf.openrocket.gui.figure3d.RealisticRenderer' due to missing dependency 'java.lang.NoClassDefFoundError: com.jogamp.opengl.GL'
Traceback (most recent call last):
  File "ClassLoader.java", line 522, in java.lang.ClassLoader.loadClass
java.lang.java.lang.ClassNotFoundException: 

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "org.jpype.pkg.JPypePackage.java", line -1, in org.jpype.pkg.JPypePackage.getObject
java.lang.java.lang.NoClassDefFoundError: 

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/joseph/rockets/openrocket/orhelper/./animation.py", line 36, in 
    rr = f3d.RealisticRenderer(doc)
         ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/jpype/imports.py", line 87, in _JExceptionHandler
    raise ImportError("Unable to import '%s' due to missing dependency '%s'" % (
ImportError: Unable to import 'net.sf.openrocket.gui.figure3d.RealisticRenderer' due to missing dependency 'java.lang.NoClassDefFoundError: com.jogamp.opengl.GL'

I've made several attempts to find ways to import com.jogamp.opengl.GL with no luck whatever. The closest I've come has been to extract the contents of the jar using jar xf and adding the location of the jar file to the classpath. When I do this I'm able to import all the opengl classes successfully, but I still get the missing dependency error. I'm attaching the broken code that does that

animation.py.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant