Unable to touch the Grails

Hey,
I have IDEA 7.0.4 and JetGroovy5461 plugin installed on my Ubuntu 7.10
I created JAVA_HOME and GRAILS_HOME and appended bin of GRAILS_HOME to the PATH env var (updating .bashrc file).
When I tried to create Grails application in IntelliJ, I got this error:
===

grails: JAVA_HOME is not defined correctly; can not execute: java
Done!
===
What is wrong?

6 comments
Comment actions Permalink

Hello, Hussein.

You need no define JAVA_HOME and GRAILS_HOME as explicit system variables. JAVA_HOME environment variable is automatically defined when you start IDEA (ans points to your JDK, with which IDEA was started), GRAILS_HOME is extracted form your Grails settings. So you have to setup only correct path to your Grails libraries.

With best regards,
Ilya

0
Comment actions Permalink

I removed JAVA_HOME and GRAIL_HOME from .bashrc file.
I set Grails libraries in IntelliJ correctly.
When I tried to create a project, I got bunch of this error dialogs:
==
Failes to create Grails application within this project
==
and then, the same previous error
Any idea?

0
Comment actions Permalink

Ok, make sure you follow next steps:
1. File -> Create new Project/Module
2. Select Grails application
3. Choose Grails SDK version among already installed or add new one

And, please, download last available plugin form our repository.

0
Comment actions Permalink

Hey,
I got the latest version of the plugin.
No way, it is not working.
Here is a snippet from my idea.sh

I coded IDEA_JDK by hand.
What to do?
I opened the shell, export JAVA_HOME by hand and then launched idea.sh by hand and every thing works!
I don't know really what is happening.

0
Comment actions Permalink

Hussein,

As for me, I launch IDEA with script like


So, JAVA_HOME is set up automatically to the same place.

0
Comment actions Permalink

Yeah ... just make sure that you can run java from the command line. Sounds like that's your initial problem. If you installed java then you might still be running the older one that comes with the OS. Remove the old one (look in usr/bin/java) and then do a symbolic link from /usr/bin/java to the location of the new one you installed. e.g ln -s /usr/local/java/1.6.0 /usr/bin/java. Do the same for javac. Point your JAVA_HOME variable accordingly (to the new java directory) and test it out again. Then try which java at the command line. Run both java and javac.

0

Please sign in to leave a comment.