Question

I just downloaded and installed Grails 2.0.1 and am attempting to run a new app. I am on Mac OS 10.7 (Lion). My installations are as follows:

java -version
openjdk version "1.7.0-internal"
OpenJDK Runtime Environment (build 1.7.0-internal-b00)
OpenJDK 64-Bit Server VM (build 20.0-b03, mixed mode)

grails -version
Grails version: 2.0.1

groovy -version
Groovy Version: 1.8.4 JVM: 1.7.0-internal

I created a brand new application:

grails create-app g2
| Created Grails Application at /Users/aalonso/projects/g2

Attempting to run the application produces the following error:

cd g2
grails run-app
| Compiling 38 source files.
| Error Compilation error: startup failed:
Invalid commandline usage for javac.
javac: invalid flag: -Xlint:-options
Usage: javac <options> <source files>
use -help for a list of possible options


1 error

I was running Grails 1.3.7 with no issues prior to this. Does anyone have any ideas?

Was it helpful?

Solution

Your JDK version doesn't support the -Xlink-options option.

-Xlint:{all,cast,deprecation,dep-ann,divzero,empty,fallthrough,finally,overrides,path,processing,serial,unchecked,rawtypes,static,varargs,try,-cast,-deprecation,-dep-ann,-divzero,-empty,-fallthrough,-finally,-overrides,-path,-processing,-serial,-unchecked,-rawtypes,-static,-varargs,-try,none} Enable or disable specific warnings

OTHER TIPS

Use openjdk version "1.6.0-internal"

Change project used jdk version to 1.6 then it work properly. It is tested and proved solution.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top