0

Does anybody have idea about fixing the below issue?

scons: Entering directory `/Users/ajchandra15/Documents/Developer/Framework/alljoyn-ios/alljoyn/alljoyn' scons: Reading SConscript files ... Checking c++ compiler support for -std=c++11 flag... (cached) yes Using debug settings for darwin build... Using flags for iOS simulator... debug Using iOS debug configuration Using OpenSSL crypto Building bindings: cpp, c, java, js Building services: GTEST_DIR not specified skipping common unit test build Not building unit tests for iOS... GTEST_DIR not specified skipping alljoyn_c unit test build JAVA_HOME not set Command /usr/local/bin/scons failed with exit code 1

enter image description here

enter image description here

Jayachandra A
  • 1,335
  • 1
  • 10
  • 21

2 Answers2

0

Since you're building the Alljoyn binding for Java (together with c++, c and js) then you have to set the JAVA_HOME environment variable otherwise scons is not able to find the java compiler.

Lino
  • 5,084
  • 3
  • 21
  • 39
  • I already added _java_home_ path to my os environment variables, though it is throwing same error. – Jayachandra A Jun 17 '16 at 02:40
  • it should be something like this: `export JAVA_HOME="/usr/lib/jvm/java-6-sun"` and `export CLASSPATH="/usr/share/java/junit4.9.jar"` – Lino Jun 17 '16 at 06:45
  • I couldn't find any directories as you mentioned, the path may be in windows version but i'm using mac – Jayachandra A Jun 21 '16 at 18:08
  • the directory I mentioned were only examples.You have to find out on your mac where 1) the java directory is, 2) the junit4.9.jar is – Lino Jun 21 '16 at 19:02
0

Newer versions of XCode 7 do not inherit environmental variables. You'll have to add a custom user-defined variable for JAVA_HOME.

To find your java path, type ">which java" on the terminal.

Reference for Xcode env variables: https://forums.developer.apple.com/thread/8451

TheJeff
  • 3,665
  • 34
  • 52