Closed mbjones closed 6 years ago
Original Redmine Comment Author Name: David LeBauer (David LeBauer) Original Date: 2011-06-06T21:28:34Z
need to run from morpho-1.9.0 directory.
Original Redmine Comment Author Name: ben leinfelder (ben leinfelder) Original Date: 2011-06-06T21:30:07Z
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.
Original Redmine Comment Author Name: Jing Tao (Jing Tao) Original Date: 2011-06-06T21:37:13Z
I totally agree with Ben. The script should be run under morpho-1.9.0.
Original Redmine Comment Author Name: Jim Regetz (Jim Regetz) Original Date: 2011-06-07T04:32:38Z
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:
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!
Original Redmine Comment Author Name: Redmine Admin (Redmine Admin) Original Date: 2013-03-27T21:30:22Z
Original Bugzilla ID was 5421
Author Name: David LeBauer (David LeBauer) Original Redmine Issue: 5421, https://projects.ecoinformatics.org/ecoinfo/issues/5421 Original Date: 2011-06-06 Original Assignee: Jing Tao
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.