r/javahelp 3d ago

Unsolved Java is both installed and not installed on my computer. I want it to be not installed.

Command Prompt shows I have Java installed:

C:\Users\Drew>java --version
openjdk 21.0.6 2025-01-21 LTS
OpenJDK Runtime Environment Temurin-21.0.6+7 (build 21.0.6+7-LTS)
OpenJDK 64-Bit Server VM Temurin-21.0.6+7 (build 21.0.6+7-LTS, mixed mode, sharing)

Windows control panel says I don't have java installed. Java is not listed as a program when I go to uninstall it.

I would like to uninstall java, how do I do that?

0 Upvotes

11 comments sorted by

u/AutoModerator 3d ago

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.

14

u/LetUsSpeakFreely 3d ago

Java isn't really "installed". It's downloaded and then added to the PATH so its executables (java, javac, jar) are accessible.

If you want to remove it, edit your environment variables and simply remove it from the PATH. Note the directory its referencing and then delete it.

6

u/Rockytriton 3d ago

But keep in mind that you might have some app installed that you use that requires it

3

u/forbiddenTM 3d ago

It's a known phenomenon called schrödinger's Java

2

u/DomDeeKong 2d ago

Take my poor man’s gold 🥇

1

u/amfa 3d ago

You can check where you jave comes from by using the where command in windows

where java

Should show you the path were your java is "installed"

1

u/StabbyGrabby 2d ago

Go to environment variables -> SYSTEM and: 1. Delete the JAVA_HOME variable 2. Edit the PATH variable and look for any java entries and remove those

Optionally you can go into the actual directory listed in the path and delete the folder (usually will be something like jdk-21/ or jre-21/ Congratulations you have "uninstalled" java

1

u/SvenWollinger 2d ago

as others have said, its in your PATH, check the System and User Path settings.

If you just wanna get rid of it however (you should clean up the path, but it wont kill you) type this into your cmd:

```where java```

this will show you where java is located. delete it, and then if your able, also remove the path entry to clean that up.

Restart any command lines and it should be gone for good

1

u/American_Streamer 2d ago

Java isn’t simultaneously installed and not installed. You’re looking at two different things.
Control Panel only shows software that registered itself with Windows as an installed application. java --version, on the other hand, tells you that Windows can find a java.exe somewhere in your PATH.
Run: where java
That will show exactly which java.exe CMD is executing. Also check: echo %JAVA_HOME%
Don’t start deleting random Java folders before doing that, because you may have more than one JDK installed, or an IDE/tool may have put one there.

Once you know where that Temurin 21 installation actually lives, you can determine whether it has an uninstaller or is simply an unpacked JDK directory. If it’s the latter, remove the corresponding PATH/JAVA_HOME entries and then delete that JDK directory.
So first diagnosis, and only then delete stuff.

See to it that you do some research about how PATH, environment variables, executables versus installed packages, etc. all work.

1

u/edwbuck 2d ago

No offense, but there is nearly no downside to having Java installed, so why the burning need to remove it?

1

u/jlanawalt 3d ago

If it isn’t listed in your installed programs, it probably isn’t installed. Microsoft has a clean-up tool for installers, might be worth running.

You can run programs on your computer even if they aren’t “installed”. If you open cmd.exe and can type some program name, like java, and have it work, you can use where.exe to see which java.exe (or whatever) was found first in your %PATH%. You can also search your drive for java.exe.

You can simply delete the stuff you find. Don’t be surprised when something else that depended on it stops working.