sparecycle
sparecycle

Reputation: 2058

"ant all" build unable to continue. 'Cannot run program "java".'

My system is CentOS 6.4. The package I'm trying to build is the latest version of OpenGTS. The problem I'm having is that upon executing ant all I'm getting the following output:

[root@OpenGTS OpenGTS_2.5.0]# ant all
Buildfile: /usr/local/OpenGTS_2.5.0/build.xml

clean:
   [delete] Deleting directory /usr/local/OpenGTS_2.5.0/build

custom.jar:
     [echo] Skipping General Custom build ...

customtrack.jar:
     [echo] Skipping Track Custom build ...

custom:

prepare:
    [mkdir] Created dir: /usr/local/OpenGTS_2.5.0/build
    [mkdir] Created dir: /usr/local/OpenGTS_2.5.0/build/lib
     [echo] OS = Linux
     [echo] JavaHome = /usr/lib/jvm/java-1.6.0-openjdk/jre

BUILD FAILED
/usr/local/OpenGTS_2.5.0/build.xml:182: Execute failed: java.io.IOException: Cannot run program "java" (in directory "/usr/lib/jvm/java-1.6.0-openjdk/jre"): java.                                                                                       io.IOException: error=2, No such file or directory

My environment variables are all defined correctly but from what I can tell, the build wants to execute java inside of the jre directory. Currently, I can only execute it from inside the binary directory. Should I modify .bashrc so I can execute java from any directory? Thanks in advance.

Upvotes: 0

Views: 864

Answers (1)

Sajan Chandran
Sajan Chandran

Reputation: 11487

Set your PATH to include jdk/bin folder

Upvotes: 1

Related Questions