homehome

Environmental setting to execute Java Application on Mac


Installation of Open JDK

  1. Visit the Open JDK site, and download it.
  2. Decompress the file in a suitable directory,
    $ tar xvzf openjdk-12.0.1_osx-x64_bin.tar.gz
  3. Move the directory to /Library/Java/JavaVirtualMachines/,
    $ sudo mv jdk-12.0.1 /Library/Java/JavaVirtualMachines/
  4. Execute the following command,
    $ /usr/libexec/java_home -V
  5. Export the following environment variable in .bashrc,
    export JAVA_HOME=$(/usr/libexec/java_home)
  6. Renew the shell
    $ source ~/.bash_profile

Installation of OpenJFX

  1. Visit the OpenJFX site, and download it.
  2. Decompress the zip file in a suitable directory.
  3. Move the directory to /Library/Java/JavaVirtualMachines/,
    $ sudo mv javafx-sdk-12.0.1 /Library/Java/JavaVirtualMachines/
  4. Set the path in .bashrc as follows,
    $ export PATH_TO_FX=/Library/Java/JavaVirtualMachines/javafx-sdk-12.0.1/lib

Execution of jar file




Kazushi Neichi
Department of Business Administration, Tohoku Gakuin University