error while running 'demo_build.sh' script

133 views
Skip to first unread message

Sony

unread,
Aug 25, 2010, 11:06:52 PM8/25/10
to Schrödinger Developer Forum
Dear All,

Since I don't have any knowledge about java, I was not able to
understand the error I got while running 'demo_build.sh' script, which
is embedded below. Could some one shed light on what mistake I am
doing.

Thanks & Best Regards
Sony


**************************************
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home/: Command
not found.
mkdir sandbox
cd sandbox; \
unzip -uo ../lib/jogl-1.0-natives-linux-i686.jar; \
unzip -uo ../lib/jymol-1.0-natives-linux.jar; \
unzip -uo ../lib/gluegen-rt-1.0-natives-linux-i686.jar; \
/bin/javac -classpath ../lib/jymol-1.0.jar -d . ../src/demos/jymol/
simple/*.java
; \
/bin/java -classpath ../lib/jymol-1.0.jar:../lib/jogl-1.0.jar:../lib/
gluegen-rt
-1.0.jar:. -Djava.library.path=. demos.jymol.simple.Simple;
unzip: cannot find or open ../lib/jogl-1.0-natives-linux-i686.jar, ../
lib/jogl-
1.0-natives-linux-i686.jar.zip or ../lib/jogl-1.0-natives-linux-
i686.jar.ZIP.
unzip: cannot find or open ../lib/jymol-1.0-natives-linux.jar, ../lib/
jymol-1.0
-natives-linux.jar.zip or ../lib/jymol-1.0-natives-linux.jar.ZIP.
unzip: cannot find or open ../lib/gluegen-rt-1.0-natives-linux-
i686.jar, ../lib
/gluegen-rt-1.0-natives-linux-i686.jar.zip or ../lib/gluegen-rt-1.0-
natives-linu
x-i686.jar.ZIP.
/bin/sh: /bin/javac: No such file or directory
/bin/sh: /bin/java: No such file or directory
make: *** [all] Error 127
****************************************

JVertrees

unread,
Aug 25, 2010, 11:25:37 PM8/25/10
to Schrödinger Developer Forum
Hi Sony,

JyMOL's demo_build.sh is a script that attempts to be as cross-
platform friendly as possible. It calls "Makefile.demo" which unzips
the necessary jar & java files, compiles a demo, and then runs the
demo. The top of the Makefile.demo file has a configuration section
for Windows, Linux and Mac. You just need to tell the Makefile.demo
where to find your java and javac binaries. To do that, just open up
"Makefile.demo" in a text editor and find the section that matches
your computer and set the following. Let's say you're using Linux,
then you need to find these lines
**********
ifeq ($(strip $(UNAME)),Linux)
PLATFORM = linux
JAVA_HOME=/home/vertrees/playground/jdk1.6.0_21-$(ARCH)/
ANT_HOME = /usr/bin/ant
LIB_NAME = libjymol.so
endif
**********
and change

JAVA_HOME=/home/vertrees/playground/jdk1.6.0_21-$(ARCH)/

to point to wherever your Java JDK (java.sun.com) is installed, for
example

JAVA_HOME=/home/sony/jdk1.6.0_21


This also assumes you have "unzip" installed.

For more information on Java, check out the free and useful book
"Thinking in Java" (http://www.mindview.net/Books/TIJ/).

To run this you should just be able to type: "sh demo_build.sh".

Give that a shot and let me know if that helps.

Happy hacking!

-- Jason
Reply all
Reply to author
Forward
0 new messages