Error while running ice on ubuntu ( java)

246 views Asked by At

I am having trouble while trying to run the example for printer. when i try to run the class for the server it prints

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: Ice/LocalException
    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: Ice.LocalException
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 7 more

For what i have been searching it is caused by the classpath export? i did export CLASSPATH=$CLASSPATH:./classes:$ICE_HOME/share/java/ice.jar

ICE_HOME is /usr.

Does anyone know how to fix? thanks

1

There are 1 answers

0
heav1811 On

After typing the question continued looking for it. As it seems exports are wierd, when i do ctrl + shift + T for a new terminal it deletes them. Only after looking at the exports page i realized they were getting deleted.