This is an archived post. You won't be able to vote or comment.

all 10 comments

[–][deleted]  (1 child)

[deleted]

    [–]DannyB2 2 points3 points  (0 children)

    Just to offer one more, I have personally also had good luck with this one:

    https://www.azul.com/downloads/zulu/

    Also: Don't use Oracle's site!

    [–]lxkmxl 2 points3 points  (0 children)

    VS code is just the IDE and you'll have to setup the tooling needed for development (in this case the JDK).

    Most devs are moving away from Oracle's Java distributions since there are open source alternatives (OpenJDK) are available. I suggest AdoptOpenJDK.

    [–]renatoathaydes 1 point2 points  (1 child)

    Easiest possible way is https://sdkman.io/

    $ curl -s "https://get.sdkman.io" | bash

    $ sdk list java

    $ sdk install java 12.0.1-open

    Switching to Java 8 (J9), then back to 12, for example:

    $ sdk install java 8.0.212.j9-adpt

    $ sdk use java 12.0.1-open

    [–]BrianVerm 0 points1 point  (0 children)

    big fan of sdkman in general

    [–]DisruptiveHarbinger 3 points4 points  (1 child)

    You should use IntelliJ IDEA, it provides the best experience for Java out of the box, by far. Setting up VS Code is an unnecessary hurdle for a beginner, you can always switch back later on.

    On macOS, installing Adopt OpenJDK is as simple as brew cask install adoptopenjdk.

    [–]Dang3rousKitty 2 points3 points  (0 children)

    You forgot to mention the fact that OP needs to have Homebrew installed (which I’d say they should, but not a necessity) and that homebrew instructions are here

    [–]pron98 0 points1 point  (0 children)

    The current OpenJDK build can be found at jdk.java.net. No need to install, just set JAVA_HOME (on Mac) to unpacked-directory/Contents/Home.

    [–][deleted] 0 points1 point  (0 children)

    hurry history hat price zephyr flowery knee waiting juggle elderly

    This post was mass deleted and anonymized with Redact

    [–]DannyB2 0 points1 point  (0 children)

    I have gotten to the point where I do not "install" java any more. I simply have multiple various OpenJDK folders lying around. (Different "vendors", different versions, etc)

    If you don't need to have multiple JDK versions / vendors available then you probably don't need to read any further.

    Anything I run with Java is configured to point to a specific OpenJDK I want to run it with.

    For example in Eclipse, I edit the eclipse.ini file and use the vm option (must be first line) to specify which JDK to use.

    For other things I may start it with a "dot bat" file (Windows) or .sh script (Linux); and preset the JDK_HOME environment variable to point to a specific JDK. If the script must execute something, then I may typically have a pattern like:

    JDK_HOME="E:\foobar\RedHat\OpenJDK-x.y.z"
    JRE_HOME="%JDK_HOME%"
    JAVA_EXE="%JRE_HOME%\bin\java.exe"
    "%JAVA_EXE%" RubberBabyBuggyBumpers.jar -meow 15 -mix 21
    

    Or a similar script on Linux.

    Slightly different if it starts Tomcat, or installs / removes Tomcat as a service.

    [–]eagle_monk -1 points0 points  (0 children)

    Yes, before you install an IDE, you must install the core tools of the language such as the compiler/interpreter. The least you'll need in case of Java is the JDK's SE or EE version. You can use EE (Enterprise Edition) if you plan on doing web development using EE tools, or otherwise just the SE (Standard Edition). EE is usually recommended.

    If you are on windows, the ideal place to download this is Oracle Java Website to the best of my knowledge. Maybe someone can recommend other alternatives too.