Error log trying to build r14343

Well... let me point out that "setjdk" is a bash function, not a built-in command. I found it via google. If you use bash, put the following into your .bashrc:

Code:
function setjdk() {
  if [ $# -ne 0 ]; then
   removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
   if [ -n "${JAVA_HOME+x}" ]; then
    removeFromPath $JAVA_HOME
   fi
   export JAVA_HOME=`/usr/libexec/java_home -v $@`
   export PATH=$JAVA_HOME/bin:$PATH
  fi
 }
 function removeFromPath() {
  export PATH=$(echo $PATH | sed -E -e "s;:$1;;" -e "s;$1:?;;")
 }
and you can do:

setjdk 1.7.0_55
setjdk 1.6

Note that on OS X - at least, on Mavericks - the "default Java" you have installed for running in browsers has nothing whatsoever to do with the version you are using to compile with.

Edit: to make that completely clear (I hope), I currently have two shell windows open. In one:

Code:
bash-3.2$ setjdk 1.6
bash-3.2$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
bash-3.2$ java -jar KoLmafia-16.3.jar 

KoLmafia v16.3 r14352
Released on April 16, 2014

Currently Running on Mac OS X
Local Directory is /Users/xxx/Library/Application Support/KoLmafia
Using Java 1.6.0_65
In the other:

Code:
bash-3.2$ java -version
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
bash-3.2$ java -jar KoLmafia-16.3.jar 

KoLmafia v16.3 r14352
Released on April 16, 2014

Currently Running on Mac OS X
Local Directory is /Users/xxx/Library/Application Support/KoLmafia
Using Java 1.7.0_55
If I compile in one, it uses 1.6.0_65. In the other, 1.7.0_55. And "java -jar KoLmafia-16.3.jar" will start KoLmafia using the Java runtime associated with the JDK my path says to use, whether or not the executable was compiled with it.

But, my system Java runtime, as used in Web Browsers, is 1.7.0_67
 
Last edited:
Ok, I was able to fix this on Snow Leopard 10.6.8 in the following way:

sudo vi /System/Library/CoreServices/SystemVersion.plist

change 10.6.8 to 10.7.8 and write out the changes.

Install the latest JDK 1.7.0_67

edit the file again, and change 10.7.8 back to 10.6.8

In my bash script that compiles the code, I just had to add these two lines:

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home
export PATH=${JAVA_HOME}/bin:$PATH

Then all worked great.

Just FYI, I did try updating my laptop to Mavericks at one point, and it was so painfully slow, I had to reinstall Snow Leopard even though downgrading took a month to get everything back to normal. So until I buy new hardware, I'm sticking with Snow Leopard.

Thanks for the help and although I didn't use setjdk it helped me configure my build script.
 
I agree: Mavericks was a major downgrade in performance. I cannot stand how, every time I ask for an Open File Dialog, it wants to spin up my external disk (which is used for backups), just in case I want to open file there - and the entire system hangs for 10 seconds or so until the disk is ready. What the **** did you break with interrupt handling?

Note that the the external disk is on USB, although it used to be on Firewire, because Mavericks no longer puts Firewire disks to sleep when it decides to sleep. CPU sleeps, Firewire disk keeps on spinning.Worked perfectly in Lion.

I keep holding on, since I hope Apple will fix these major issues in a System Upgrade, by and by, but, so far, no joy.
 
Back
Top