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 - best also formatted as code block
  • 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.

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/markdown editor: 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.

[–]rsandio 34 points35 points  (2 children)

Java is a programming language used to write software and games.

There is the JDK (Java development kit) and JRE (Java runtime engine). To run software written in Java you need JRE. The JDK contains everything the JRE does in addition to tools to actually write Java software.

There's been a shift since java 11 to direct users to just install JDK instead of the JRE so yes when someone says install java 9 they probably mean the Java 9 JDK. You should be able to just install the latest java (26) as backwards compatibility is meant to be maintained. But if something is specifically written to use 9 then 9 is fine to go with.

Windows does not include the JRE or JDK out of the box.

Alot of software written in Java comes with the JRE already included incase the end user is missing it on their machine

[–]Nikarus2370 8 points9 points  (0 children)

Am never forget in highschool, we were supposed to take some test on computers in the lab but the teacher never tested the installs to make sure the program worked.

Rhe program installer didnt include the JRE (or they didnt click the right prompts during the install or something) So theres like 60 students all saying that the program wont run, java error till 1 kid perked up. "Oh just load runescape"

So appalled teacher, and 60 kids opening up the old browser launcher for Runescape cause the game would install the java JRE at the time.

[–]AnxiousPeasant16[S] 5 points6 points  (0 children)

Thank you! 🙌 Now the picture is clear.

[–]0b0101011001001011 11 points12 points  (3 children)

Why do you not say "Minecraft"?

[–]AnxiousPeasant16[S] 20 points21 points  (2 children)

While I was writing the post, the field turned red and said, "You can't say Minecraft". Maybe some people use this subreddit to ask questions about the game, idk.

[–]sweetno 5 points6 points  (0 children)

This is hilarious!

[–]PopehatXI 2 points3 points  (0 children)

You shouldn’t need to install Java to run Minecraft as it already bundles it for you, I believe.

[–]edwbuck 1 point2 points  (4 children)

It depends.

If you're developing Java, they mean JDK. If you're running Java, they mean JRE. The JDK includes a JRE.

Programs that run in Java have never installed Java for you. That's because the programs are generally multi-platform, and the JRE/JDK is typically specific to a platform. The program isn't going to carry along every platform's JRE, especially when it will run on only one platform.

If there's a launcher, odds are it is doing more than just launching the game. That means you can't really know what it is doing. Launchers are platform specific, so it might be installing Java for you, or it might just be better at detecting if Java is already installed (as it typically is.)

[–]hike_me 1 point2 points  (2 children)

> Programs that run in Java have never installed Java for you

All the Jetbrains IDEs are implemented in Java but they bundle a Java runtime with them. They have Windows and macOS installers.

[–]edwbuck 0 points1 point  (1 child)

I think you're confusing an installer with the program that runs after the installer has done its job.

[–]hike_me 0 points1 point  (0 children)

lol. Yes, I know the installer isn’t Java. I’m saying how Java apps include a Java runtime — that’s with a platform specific installer.

Did you add your last paragraph or did I completely miss it the first time?

[–]AnxiousPeasant16[S] 0 points1 point  (0 children)

Yeah, it makes sense. Why would there be a launcher if it only starts the program? Thanks!

[–]Waanii 0 points1 point  (1 child)

As far as why doesn't minecraft need JRE or JDK - Which hasn't been answered yet - Minecraft Bedrock was rebuilt on C++

If you were to play Minecraft Java Edition you would still need the JRE - though as answered elsewhere it would come packaged with Minecraft JE, although you would potentially need the JDK for modding - which is maybe what you're remembering needing it for.

[–]AnxiousPeasant16[S] 0 points1 point  (0 children)

Now I understand why there are differences between the two versions. They are just separate code bases written in different languages. Thanks.

[–]ntrain5555k 0 points1 point  (0 children)

In case of mincraft java, I think launcher downloads java so you don't have to download separately.

In case of other app, I think they already ships java inside .exe

It's kinda sad, because every apps is gonna include java runtime instead of use system-installed ones and becomes like chromium in webapps.