Question
I'm unable to run Tizen Studio because it's using OpenJDK runtime instead of my preferred Oracle Java 8 installation. The issues I'm facing are:
- Tizen Studio doesn't respect my JAVA_HOME environment variable settings
- Modifying eclipse.ini doesn't change the Java version being used
I need to configure Tizen Studio to use Oracle Java 8 without uninstalling my existing OpenJDK installations. I'm currently running macOS.
Answer
Problem Understanding
Tizen Studio, which is based on Eclipse, doesn't automatically use the Java version specified in JAVA_HOME during startup. This is a common Eclipse behavior where the environment variable isn't read at boot time.
Solution Methods
-
Modify eclipse.ini:
- Locate the eclipse.ini file in your Tizen Studio installation directory
- Add the following lines at the beginning of the file (before any -vmargs):
-vm /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin - Replace the path with your actual JDK 8 installation path
- Save the file and restart Tizen Studio
-
Alternative Method:
- Create a symbolic link to force Tizen Studio to use your preferred JDK:
sudo ln -sfn /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home /Library/Java/Home
- Create a symbolic link to force Tizen Studio to use your preferred JDK:
Code Examples
For the eclipse.ini modification:
-vm
/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/bin
Additional Tips
- Make sure to add the -vm argument before any -vmargs in eclipse.ini
- Verify your Java installation path using:
/usr/libexec/java_home -V - After making changes, restart Tizen Studio completely for the changes to take effect
- For more information, refer to Eclipse documentation on eclipse.ini configuration