Difference between revisions of "Setting up Java"

From Exilent
 
(47 intermediate revisions by the same user not shown)
Line 1: Line 1:
Exilent currently works only with '''Java 8 (JRE/JDK)'''.  
+
Exilent requires '''Java 11+ JRE/JDK''' installed. On '''Mac''' it best works with Oracle JDK.
  
 +
== Verify default Java version ==
 
There can be several Java versions installed on your computer. When you double click a JAR file it will be executed on the Java version which is set as default.
 
There can be several Java versions installed on your computer. When you double click a JAR file it will be executed on the Java version which is set as default.
  
https://i.imgur.com/MfTVcxq.png
+
https://i.imgur.com/RhBjx8v.png
 +
 
 +
Open up a Command Prompt/Terminal and type '''java -version'''. This will print out the current default Java version.
 +
 
 +
https://i.imgur.com/LnxBqAX.png
  
If you get errors about unrecognized option and not being able to create Java Virtual Machine then its possible that you have Java 9+ installed and set as default.
+
12.x.x means Java 12.
  
* Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
+
== Removing other Java versions ('''Mac''') ==
* Unrecognized option: -Xincgc
+
If you are '''on Mac''' you have to remove other versions of Java first.
* Error: Could not create the Java Virtual Machine.
 
* Error: A fatal exception has occurred. Program will exit.
 
  
== Verify default Java version ==
+
To do this, download the installer of the java that you currently have installed, run it and select uninstall.
Open up a Command Prompt/Terminal and type '''java -version'''. This will print out the current default Java version.
 
  
https://i.imgur.com/giWilQt.png
+
== Installing Java ==
  
1.8.x means Java 8, if you have anything else then you need to follow the next steps.
+
=== AdoptOpenJDK ===
 +
Go to: https://adoptopenjdk.net
 +
 +
Choose a Version: OpenJDK 11 (LTS) or OpenJDK 16 (Latest)
  
== Removing other Java versions ==
+
Choose a JVM: Hotspot
If you are on Mac you need to remove other versions of Java before installing Java 8.
 
  
To do this, navigate to '''/Library/Java/JavaVirtualMachines/''' in your file explorer and delete the folders which are not Java 8.
+
Select your platform.
  
== Install Java 8 ==
+
Download and install.
  
Search for '''java 8 jdk''' in Google.
+
=== Oracle JDK===
  
[https://www.google.com/search?q=java+8+jdk https://www.google.com/search?q=java+8+jdk]
+
Go to: https://www.oracle.com/java/technologies/downloads/
  
It should be the first result (Java SE Development Kit 8).
+
Select your platform.
  
*Accept the License Agreement
+
Download and Install.
*Select the version you need (Linux/Mac/Windows). You should pick the x64 version over the x86.
 
*Download and install it.
 
*Restart your computer if it says its required.
 
  
{{See also|Downloads}}
+
{{See also|Getting started}}

Latest revision as of 22:33, 19 October 2022

Exilent requires Java 11+ JRE/JDK installed. On Mac it best works with Oracle JDK.

Verify default Java version

There can be several Java versions installed on your computer. When you double click a JAR file it will be executed on the Java version which is set as default.

RhBjx8v.png

Open up a Command Prompt/Terminal and type java -version. This will print out the current default Java version.

LnxBqAX.png

12.x.x means Java 12.

Removing other Java versions (Mac)

If you are on Mac you have to remove other versions of Java first.

To do this, download the installer of the java that you currently have installed, run it and select uninstall.

Installing Java

AdoptOpenJDK

Go to: https://adoptopenjdk.net

Choose a Version: OpenJDK 11 (LTS) or OpenJDK 16 (Latest)

Choose a JVM: Hotspot

Select your platform.

Download and install.

Oracle JDK

Go to: https://www.oracle.com/java/technologies/downloads/

Select your platform.

Download and Install.

See also: Getting started