[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orekit Users] "Exception in thread "main" java.lang.NoClassDefFoundError: org/hipparchus/ode/ODEIntegrator"




Michael Turner <michael.eugene.turner@gmail.com> a écrit :

Hi Michael,

I'm trying to convert some code from 2013 to Hipparchus and I get strange
run-time errors even when I include all Hipparchus jars on the classpath.



Exception in thread "main" java.lang.NoClassDefFoundError:
org/hipparchus/ode/ODEIntegrator
        at java.lang.Class.getDeclaredMethods0(Native Method)
        at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
        at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
        at java.lang.Class.getMethod0(Class.java:3018)
        at java.lang.Class.getMethod(Class.java:1784)
        at
sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)
        at
sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)
Caused by: java.lang.ClassNotFoundException:
org.hipparchus.ode.ODEIntegrator
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 7 more


A "jar tf" on the ODE jar verifies that ODEIntegrator is, in fact, in the
library.

Could it be something about how I'm running the program, from the command
line?

java  SpritePropOrig -cp
./orekit-9.0.jar:./hipparchus-geometry-1.1.jar:./hipparchus-ode-1.1.jar:./hipparchus-core-1.1.jar

I'm on my second day with this. And completely mystified.

You should probably put the -cp configuration first and the name of the main class (SpritePropOrig) afterwards in the command line. It seems the java command line is picky about order.

best regards,
Luc



Regards,
Michael Turner
Executive Director
Project Persephone
K-1 bldg 3F
7-2-6 Nishishinjuku
Shinjuku-ku Tokyo 160-0023
Tel: +81 (3) 6890-1140
Fax: +81 (3) 6890-1158
Mobile: +81 (90) 5203-8682
turner@projectpersephone.org
http://www.projectpersephone.org/

"Love does not consist in gazing at each other, but in looking outward
together in the same direction." -- Antoine de Saint-Exupéry