IntelliJ + External Tool

125 views
Skip to first unread message

Mohammad Als

unread,
Feb 13, 2017, 9:29:18 AM2/13/17
to ceylon-users
I'm trying to execute the following command after configuring external tool in IntelliJ but it fails with an exception

/usr/bin/ceylon war jsf.ceylon -p javax.servlet -p javax.servlet.servlet-api -R web --static-metamodel

Unable to determine Java version (java.version property missing, empty or has unexpected format: '9-internal'). Aborting.

The same runs fine with CLI. 

Bastien Jansen

unread,
Feb 13, 2017, 9:34:10 AM2/13/17
to ceylon-users
It looks like the external tool config is not picking up your $PATH correctly. Have you try prepending your command with something like `JAVA_HOME="/path/to/java/bin" /usr/bin/ceylon war ...`?

Bastien Jansen

unread,
Feb 13, 2017, 9:36:59 AM2/13/17
to ceylon-users
Oh sorry, it's using a JDK 9. What's does `java -version` output when you run it from the CLI?

Mohammad Als

unread,
Feb 13, 2017, 9:38:11 AM2/13/17
to ceylon-users
Its:
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

Bastien Jansen

unread,
Feb 13, 2017, 9:42:59 AM2/13/17
to ceylon-users
Could you try forcing a JDK 8 in your external tool configuration using the JAVA_HOME env var I mentioned in my previous post?

Mohammad Als

unread,
Feb 13, 2017, 10:00:35 AM2/13/17
to ceylon-users
Am I doing it correct that is, is a space required between the JAVA_HOME/bin and  /usr/bin/ceylon?

$JDKPath$/bin /usr/bin/ceylon

where $JDKPath$ points to /usr/lib/jdk1.8

Bastien Jansen

unread,
Feb 13, 2017, 10:12:57 AM2/13/17
to ceylon-users
Well, apparently it's not possible to configure environment variables in external tools: https://youtrack.jetbrains.com/issue/IDEA-14429

Is your project configured to use a JDK 9?

Mohammad Als

unread,
Feb 13, 2017, 10:21:54 AM2/13/17
to ceylon-users
No, the project is using Java 8. However, Jdk 9 is installed on my system.

Reply all
Reply to author
Forward
0 new messages