Project

General

Profile

Actions

Bug #5421

closed

trouble setting $JAVA_HOME: ls: cannot access ./lib/*.jar: No such file or directory

Added by David LeBauer over 13 years ago. Updated over 13 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
morpho - general
Target version:
Start date:
06/06/2011
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
5421

Description

I am trying to start morpho.

I have set my Paths as such:

desktop:~$ echo $JAVA_HOME
/usr/lib/jvm/java-6-sun

desktop:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-6-sun/bin

but when I try to launch morpho using

./morpho-1.9.0/morpho

I get the following error

ls: cannot access ./lib/*.jar: No such file or directory
Using dynamic classpath: .:/usr/lib/jvm/java-6-sun/jre/lib/rt.jar
----------------------------------
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
----------------------------------
Exception in thread "main" java.lang.NoClassDefFoundError: edu/ucsb/nceas/morpho/Morpho
Caused by: java.lang.ClassNotFoundException: edu.ucsb.nceas.morpho.Morpho
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: edu.ucsb.nceas.morpho.Morpho. Program will exit.

Not sure why this is happening, but I do have both java-6-sun and java-6-openjdk installed, and I get a similar error when setting either as the JAVA_HOME path.

Actions #1

Updated by David LeBauer over 13 years ago

need to run from morpho-1.9.0 directory.

Actions #2

Updated by ben leinfelder over 13 years ago

Moot point now:
-------------
Hi David,
Try changing into the morpho-1.9.0 directory and invoking the script from
there:
cd morpho-1.9.0
./morpho

I believe the script assumes relative paths from that directory.

Actions #3

Updated by Jing Tao over 13 years ago

I totally agree with Ben. The script should be run under morpho-1.9.0.

Actions #4

Updated by Jim Regetz over 13 years ago

For what it's worth, on my linux box I keep a simple bash script named 'morpho' in ~/bin (which is on my path). I just start morpho at the command line that way, from anywhere. You'd need to tweak the paths to match your morpho install, of course:

#----------------------------------------------------
#!/bin/bash

export JAVA_HOME='/usr/lib/jvm/java-6-sun/jre'
cd /opt/morpho-1.9.0
./morpho
#----------------------------------------------------

Just remember to update it the next time you install a new morpho version and/or upgrade java!

Actions #5

Updated by Redmine Admin over 11 years ago

Original Bugzilla ID was 5421

Actions

Also available in: Atom PDF