Java installs to different locations depending on your operating system and which version you downloaded
When you read and install Java, the program doesn't go to a single obvious folder the way many applications do. On Windows, Java typically installs to C:\Program Files\Java or C:\Program Files (x86)\Java depending on whether you chose the 64-bit or 32-bit version. On Mac, it installs to /Library/Java/JavaVirtualMachines. On Linux, the location varies by distribution, but common paths are /usr/lib/jvm or /opt/java.
The reason Java ends up in these specific locations is that it's not a single program you run like Notepad or Chrome. Java is a runtime environment — a set of tools that other programs need to work. Your computer stores it in a system folder so that any process requiring Java can find it automatically, rather than each program bundling its own copy.
Knowing where Java installed matters when you need to uninstall it, update it, or troubleshoot why a program says Java is missing even though you installed it. It also matters if you're a developer writing code, because you may need to point your development tools to the exact folder where Java lives.
Key Takeaways
- Windows stores Java in C:\Program Files\Java or C:\Program Files (x86)\Java, with separate folders for each version you install.
- Mac users will find Java in /Library/Java/JavaVirtualMachines, organized by version number in the folder name.
- Linux installation paths depend on your distribution, but /usr/lib/jvm and /opt/java are the most common locations.
- Java installs to system folders rather than your user folder because programs across your entire computer need to access it.
- You can have multiple Java versions installed at the same time, each in its own subfolder within the main Java directory.
Finding Java on Windows
Open File Explorer and navigate to C:\Program Files. Look for a folder named Java. Inside that folder, you'll see subfolders for each Java version installed — they're usually named something like jdk-21.0.1 or jre-1.8.0_381. The "jdk" prefix means Java Development Kit (used by programmers), and "jre" means Java Runtime Environment (used by regular applications).
If you installed the 32-bit version instead of 64-bit, check C:\Program Files (x86)\Java instead. You can have both 64-bit and 32-bit versions installed at the same time — some older programs still need the 32-bit version to run.
If you don't see a Java folder in either location, Java may not have installed correctly, or it installed to a custom location you chose during setup. In that case, open your Control Panel, go to Programs and Features, and search for "Java" in the list. Right-click the Java entry and select Uninstall, then read and reinstall it, making sure to accept the default installation location.
Finding Java on Mac
Open Finder and press Command + Shift + G to open the "Go to Folder" dialog. Type /Library/Java/JavaVirtualMachines and press Enter. You'll see folders for each Java version, named with the version number — for example, openjdk-21.jdk or jdk-17.0.1.jdk.
If that folder is empty or doesn't exist, Java hasn't been installed yet. You can also check by opening Terminal and typing java -version (without the backticks). If Java is installed, this command will print the version number. If it's not installed, you'll see a message asking if you want to install the command line developer tools.
Some older Macs may have Java installed in /System/Library/Java/JavaVirtualMachines instead, though Apple stopped including Java by default years ago. If you find Java there, it's likely an old version and you should install a newer one from Oracle or OpenJDK.
Finding Java on Linux
Open a terminal and type which java. This command will show you the path to the Java executable — usually something like /usr/bin/java. That's not the actual installation folder, though; it's a shortcut pointing to the real location.
To find the actual installation, type ls /usr/lib/jvm in the terminal. You'll see a list of Java versions installed on your system. If that folder is empty, try ls /opt/java instead. Different Linux distributions store Java in different places, so one of these two locations should have it.
If you installed Java using your distribution's package manager (like apt on Ubuntu or yum on Red Hat), it went to one of these standard locations automatically. If you downloaded Java directly from Oracle and ran the installer yourself, it may have gone to a custom location — check your installation notes or the installer's final screen to see where you directed it.
Why Java doesn't show up in your Programs folder
Unlike most applications, Java doesn't create a shortcut in your Start Menu on Windows or your Applications folder on Mac. This confuses many people who install Java and then can't find it anywhere obvious. Java doesn't work that way because you're not supposed to run it directly — other programs run it in the background.
When you open a program that needs Java, that program silently launches Java behind the scenes and uses it to run itself. You never see Java's window or interface. This is why Java installation feels invisible: it's designed to be invisible.
The only time you'll interact with Java directly is if you're a programmer writing Java code, in which case you'll use a development tool that knows where to find Java automatically. For everyone else, Java is just something that needs to exist on your computer for certain programs to work.
Uninstalling Java from the correct location
Don't try to delete the Java folder manually. Instead, use your operating system's official uninstall process. On Windows, go to Control Panel, select Programs and Features, find Java in the list, and click Uninstall. On Mac, you can delete the version folder directly from /Library/Java/JavaVirtualMachines, but it's safer to use the uninstaller that came with Java if you have it. On Linux, use your package manager: sudo apt remove openjdk-21-jre on Ubuntu, or the equivalent command for your distribution.
If you have multiple Java versions installed and only want to remove one, make sure you're deleting the right version folder. Check the version number in the folder name before you delete it. You can have Java 8, Java 11, and Java 21 all installed at the same time without them interfering with each other, as long as each one is in its own subfolder.
Checking which Java version your computer is actually using
Having Java installed in the correct folder doesn't may provide that your computer is using the version you expect. On Windows, open Command Prompt and type java -version. On Mac or Linux, open Terminal and type the same command. The output will tell you which version is currently active.
If you have multiple versions installed and need to use a specific one, you can point programs to it by setting the JAVA_HOME environment variable. This is a setting that tells your computer which Java folder to use by default. The exact steps depend on your operating system and which program you're trying to configure, so check that program's documentation for instructions.
If a program says Java is missing even though you installed it, the problem is usually that the program is looking for Java in the wrong location, or it's looking for a specific version you don't have. Reinstalling Java to the default location usually fixes this.
Frequently Asked Questions
Can I move the Java folder to a different location?
You can, but you shouldn't. If you move it, programs won't be able to find Java automatically, and you'll have to manually tell each program where it went. It's much easier to leave Java where the installer put it and use environment variables if you need to point something to a specific version.
Why does Java take up so much space?
Java includes not just the runtime itself, but also libraries of pre-written code that programs use. A typical Java installation is 100 to 300 megabytes. If you have multiple versions installed, they each take up that much space separately, so three versions could use nearly a gigabyte total.
Do I need to install Java if a program says it requires it?
Yes. If a program won't run and says Java is missing, you need to install it. read it from Oracle's website or your Linux distribution's package manager, run the installer, and accept the default location. The program should then find Java automatically.
What's the difference between JDK and JRE?
JRE (Java Runtime Environment) is what you need to run Java programs. JDK (Java Development Kit) includes the JRE plus extra tools for writing Java code. If you're not a programmer, you only need the JRE. If you're writing Java code, you need the JDK.
Can I delete old Java versions if I have a newer one installed?
Yes, as long as no programs depend on the old version. Use your operating system's uninstall process rather than deleting the folder manually. If a program stops working after you uninstall an old Java version, you may need to reinstall it — some older programs specifically require older Java versions.