Getting Error When I Run The Griffon Application
I'm using Ubuntu and i have installed Griffon by taking the steps from this site. Even though there is no error in my installation. When i try to run the Griffon app using the command :
griffon run-app
I'm getting the error as:
java.io.IOException: Cannot run program "null/bin/java" (in directory "/home/anto/anto/staging"): java.io.IOException: error=2, No such file or directory
at java_util_concurrent_Callable$call.call(Unknown Source)
at org.codehaus.griffon.cli.GriffonScriptRunner.executeWithGantInstance(GriffonScriptRunner.java:659)
at org.codehaus.griffon.cli.GriffonScriptRunner.callPluginOrGriffonScript(GriffonScriptRunner.java:518)
at org.codehaus.griffon.cli.GriffonScriptRunner.executeCommand(GriffonScriptRunner.java:300)
at org.codehaus.griffon.cli.Gri开发者_C百科ffonScriptRunner.main(GriffonScriptRunner.java:116)
at org.codehaus.griffon.cli.support.GriffonStarter.rootLoader(GriffonStarter.java:198)
at org.codehaus.griffon.cli.support.GriffonStarter.main(GriffonStarter.java:223)
Caused by: java.io.IOException: Cannot run program "null/bin/java" (in directory "/home/anto/anto/staging"): java.io.IOException: error=2, No such file or directory
at RunApp$_run_closure2.doCall(RunApp.groovy:100)
at java_util_concurrent_Callable$call.call(Unknown Source)
at RunApp$_run_closure1.doCall(RunApp.groovy:32)
at java_util_concurrent_Callable$call.call(Unknown Source)
at java_util_concurrent_Callable$call.call(Unknown Source)
... 7 more
Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
... 12 more
How to escape from this and run my first Griffon app?
null/bin/java
is probably being expanded from $JAVA_HOME/bin/java
.
To properly set your JAVA_HOME
on an Ubuntu box, add export JAVA_HOME=/usr/lib/jvm/java-6-openjdk
to your .bashrc
, substituting your actual JDK path. Try readlink /etc/alternatives/javac
if you're not sure where your JDK is installed.
It looks like that ppa package is broken.
** Best to use the standard installation method: http://groovy.codehaus.org/Installing+Griffon .
However, it's possibly just because you need to set JAVA_HOME environment variable, and possibly install the JDK itself? ... approximately:
sudo apt-get install sun-java6-jdk
sudo echo "export JAVA_HOME=/wherever/java/is/installed" > /etc/profile.d/java.sh
sudo chmod a+x /etc/profile.d/java.sh
. /etc/profile.d/java.sh
HTH
It looks like you don't have Java installed/configured properly. Type the following at the command line:
java -version
You should see output similar to:
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
If not, you need to install Java (if it's not already installed), then set a JAVA_HOME
environment variable to the directory where Java is installed. You should also add $JAVA_HOME\bin
to your $PATH
variable
Sometimes, some ubuntu package upgrades or new installs break (some of) the configured java* alternatives. When this happens, check and correct them into a shell:
Type 'update-alternatives --config java' and type the [TAB] key twice in order to use the bash completion and see all java* alternatives.
Now, check and correct them one by one if needed: 'update-alternatives --config java' etc..
精彩评论