I am trying a sample C++ program in Xcode IDE. With an empty main just running the sample, it gives the error
To use the "java" command-line tool you need to install a JDK.
Which I did. In terminal I type "java -version" get the following output.
$ java -version
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
I put the java path in my PATH variable in .profile
PATH=.:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/aspi/gae/google_appengine:/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin
I have tried this on my imac and a laptop. Both same.
Is there a place in Xcode to set the PATH env variable?