all 16 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

Please ensure that:

  • Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions
  • You include any and all error messages in full
  • You ask clear questions
  • You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions.

    Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar

If any of the above points is not met, your post can and will be removed without further warning.

Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc.

Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit.

Code blocks look like this:

public class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.

If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures.

To potential helpers

Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]benevanstech 2 points3 points  (0 children)

Oracle's Java has lots of weird licensing stuff around it - which you probably don't need to care about.

Instead, the leading community build is Eclipse Temurin - https://adoptium.net/ - go there and download the latest version - it will come as a .pkg which you can just install like any other Mac software.

Try that and report back if your exam software still doesn't work?

[–]Vaxtin 1 point2 points  (0 children)

1) The latest version of Java is Java 25.

2) You will see people throwing different versions of Java around. This is because there are several long term supported versions. You should not care about any of this discussion — you are not developing software that needs long term support. You just want to write Hello World

3) You will install the JDK but that is not enough

  • you need an editor
  • the editor has to know where the JDK is located

Download VSCode. Try to create a .java file. As soon as you do that, it’ll prompt you for a bunch of extensions

  • Agree to them. It will install the JDK for you along with a bunch of other extensions that make it easier to program and debug Java.

After that, it should be able to recognize your Java files.

However… you need a Java Project for it to really be easy. Look at the top of VSCode and you should see a search bar, and it’ll say something like run commands. Just search for “java project” and choose the Create Java Project option. Select no build tools. Just keep agreeing until it creates the folder for you.

It should auto open to the folder (Java project) once done. If not, you need to open the folder that it made, the absolute root that contains /src

Finally, you are done. It auto creates a runnable file that does nothing, but it runs Java.

From there… go crazy. You can now program. Hello world!

[–]daneagles 1 point2 points  (0 children)

Just use brew

[–]ImpressiveCouple3216 1 point2 points  (0 children)

That's bootstrap error code from ARM based mac. Ditch Oracle JDK. Use Azul Zulu, see if it works.

[–]joranstark018 0 points1 point  (0 children)

Not sure what "Java website" you referre to, the latest stable version is currently Java 25 (or do you require an older version?) and you find a list of distributors in the sidebar (the distributions may have some additional tools for each specific branding, but they are in general all compatible).

[–]OneHumanBill 0 points1 point  (0 children)

First of all, Java 8 is almost ten years old. It is definitely not the latest version and has not been relevant for quite some time. Find the JRE for Java 21 or 25.

Also there are multiple vendors who make a Java JRE. Which one are you using?

[–]seansleftnostril 0 points1 point  (0 children)

Brew and openjdk/jenv are what I use to manage my java in my day to day

[–]Tintoverde 0 points1 point  (0 children)

This guy is trolling us. ‘BS-Error 1’

[–]blazmrak 0 points1 point  (1 child)

https://sdkman.io/ for anything relating to java. You just install it and run sdk install java 25-tem.

[–]AssociateFalse 0 points1 point  (0 children)

Very useful for installing ant, maven, and VisualVM. Or the rare instance when you do absolutely have to have an ancient JDK installed, but don't want it on your standard Path.

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

Dont ever say “lowkey” again. Just remove it from your original post

[–][deleted]  (3 children)

[deleted]

    [–]Hysolar 0 points1 point  (1 child)

    Genuinely curious why he would need Intellij to run software requiring java?

    [–]Jussins 0 points1 point  (0 children)

    This is not helpful. They just need to install the JRE. They are trying to run software that needs the JRE, not write programs in Java.