title: change JDK version in octave on mac
body: <p>Octave 3.8.2, OS X 10.10.4</p>
  
  <p>I used</p>
  
  <pre><code>ml_jar_version=javaMethod('getProperty','java.lang.System','java.version');
  ml_jar_version=['Java ' ml_jar_version];
  </code></pre>
  
  <p>to check the java version and I got</p>
  
  <pre><code>ml_jar_version = Java 1.6.0_65
  </code></pre>
  
  <p>However, I want Octave to use JDK 1.7 and so I typed</p>
  
  <pre><code>setenv("JAVA_HOME","/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home");
  </code></pre>
  
  <p>but <code>ml_jar_version</code> did not change.</p>
  
  <p><strong>My question</strong> is: how to make Octave to use JDK 1.7?</p>
  
  <p><strong>Edit 1</strong>: my Octave was installed through homebrew. I believe homebrew just downloaded precompiled binaries. The following is the configuration of my Octave installation:</p>
  
  <pre><code>homebrew/science/octave: stable 3.8.2 (bottled), HEAD
  a high-level interpreted language for numerical computations.
  https://www.gnu.org/software/octave/index.html
  /usr/local/Cellar/octave/3.8.2_1 (2111 files, 54M)
    Poured from bottle
  /usr/local/Cellar/octave/3.8.2_2 (2111 files, 54M) *
    Poured from bottle
  From: https://github.com/homebrew/homebrew-science/blob/master/octave.rb
  ==&gt; Dependencies
  Build: pkg-config ✔, gnu-sed ✘
  Required: pcre ✔, qscintilla2 ✔, qt ✔, pstoedit ✔
  Recommended: gnuplot ✔, suite-sparse421 ✔, readline ✔, arpack ✔, fftw ✔, glpk ✔, gl2ps ✔, graphicsmagick ✔, hdf5 ✔, qhull ✔, qrupdate ✔, epstool ✔, ghostscript ✔
  Optional: openblas ✘
  ==&gt; Options
  --with-jit
      Use the experimental JIT support (not recommended)
  --with-native-graphics
      Use native OpenGL/FLTKgraphics (does not work with the GUI)
  --with-openblas
      Use OpenBLAS instead of native LAPACK/BLAS
  --without-arpack
      Build without arpack support
  --without-check
      Skip build-time tests (not recommended)
  --without-curl
      Do not use cURL (urlread/urlwrite/@ftp)
  --without-docs
      Don't build documentation
  --without-epstool
      Build without epstool support
  --without-fftw
      Do not use FFTW (fft,ifft,fft2,etc.)
  --without-ghostscript
      Build without ghostscript support
  --without-gl2ps
      Build without gl2ps support
  --without-glpk
      Do not use GLPK
  --without-gnuplot
      Do not use gnuplot graphics
  --without-graphicsmagick
      Build without graphicsmagick support
  --without-gui
      Do not build the experimental GUI
  --without-hdf5
      Do not use HDF5 (hdf5 data file support)
  --without-java
      Build without java support
  --without-qhull
      Do not use the Qhull library (delaunay,voronoi,etc.)
  --without-qrupdate
      Do not use the QRupdate package (qrdelete,qrinsert,qrshift,qrupdate)
  --without-readline
      Build without readline support
  --without-suite-sparse421
      Do not use SuiteSparse (sparse matrix operations)
  --without-zlib
      Do not use zlib (compressed MATLAB file formats)
  --HEAD
      Install HEAD version
  </code></pre>