Sabya
Sabya

Reputation: 1429

Could not execute the java executable while running Play 1.2.1

I am facing this issue whenever I am trying to run Play 1.2.1 in my system . Previously I had , Play2.0 in my system . I exported the PATH variable , so that PATH contains the path to Play 2.0 directory .

Now , I am trying to run Play 1.2.1 in Mac OS X 10.7.4 .

My PATH variable looks like ,

-bash: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/local/mysql/bin:/Users/sabya/Documents/Play_Framework/play-2.0: No such file or directory

After exporting the PATH for play 1.2.1 my PATH looks like

-bash: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/local/mysql/bin:/Users/sabya/Documents/Play_Framework/play-2.0:/Users/sabya/Downloads/Work/play-1.2.1: No such file or directory

I created a new project through play new test_app .

But whenever I am trying to do play run , its showing me

Could not execute the java executable, please make sure the JAVA_HOME environment variable is set properly (the java executable should reside at JAVA_HOME/bin/java).

Typing javac/java in the same directory gives me proper output .

My $JAVA_HOME outputs -bash: /Library/Java/Home: No such file or directory

Everything working fine in Ubuntu .

What can be the work around at this situation ? I have googled extensively . Did not get anything suitable .

Is the trailing ":" in JAVA_HOME a problem ?

Upvotes: 0

Views: 1157

Answers (2)

Morfic
Morfic

Reputation: 15518

Actually the No such file or directory message means that the specified path is incorrect, that it does not really exist. You might want to check that it was not (re)moved in the meantime, for example by issuing a simple ls -al /Library/Java/Home.

Upvotes: 1

ndeverge
ndeverge

Reputation: 21564

Be carefull, you seem to mix Play 1 and Play 2 in your path.

Also, JAVA_HOME should point to the directory where Java is installed in your system. I doubt that this /Library/Java/Home (try to open this directory with the Finder, and see if it exists).

Upvotes: 1

Related Questions