Что делать если пишет java runtime environment not found
I was trying to set up Eclipse for trying my hand at Android app dev. I downloaded Eclipse and tried to run it. discovered I needed Java JDK. Googled and found JDK 7u40 (jdk-7u40-windows-x64.exe) and installed it. The install seemed to have gone dandy but when I tried to run Eclipse I got an error as well as if I try java version in cmd.
I went to regedit, HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft and Java Runtime Environment doesn't exist in there. Seems like this is more of a symptom than the root cause of my problems.
My PATH looks like
%JAVA_HOME% = C:\Program Files\Java\jdk1.7.0_40
I'm running Windows 7 Pro 64-bit
I did already read through Error when checking Java version: could not find java.dll and linked materials
java -version also returns the registry error. so I don't thinks it's simply a mismatch problem. My best guess is that one of the older versions of Java that I uninstalled may have screwed up my registry a bit.
You can resolve it in simple way. Just un-install java from control panel and install it again, set java home and add it to path will work.
How to install java runtime environment in Ubuntu 20.04
There are two ways to download and install java or JDK in Ubuntu 20.04
A.) Using apt command
B.) Download Oracle JDK package and install manually
Let's see both options one by one-
Video tutorial-JRE error solved for Windows
"Java Runtime Environment not found" error fixed for windows 10
Steps for finding registry keys for any version of Java 6
Follow format 6.0.xxx
where xxx can be 100, 120, 130, 140 and so on.
for example:
- Type 6.0.100 in search field, finds registry key for Java6 update 10
- Type 6.0.120 in search field, finds registry key for Java6 update 12
- Type 6.0.180 in search field, finds registry key for Java6 update 18
Где скачать и как установить Java 16:
Вам не нужно удалять старую версию Java (она нужна для игры на старых версиях), нужно скачать и установить 16 версию, и использовать именно ее для запуска снапшотов и версии 1.17.
Полезно :
Как верно указали в комментариях, есть несколько "официальных" источников Java 16, реализации от разных компаний, все они одинаково хорошо справятся со своей задачей, так что не пугайтесь.
Теперь, когда вы установили 16 версию, необходимо заставить ваш лаунчер использовать именно ее для запуска игры, и при этом пока лаунчеры не научатся сами знать и выбирать нужную версию, вам придется самим указывать нужную версию Java перед запуском конкретной версии игры, ну либо покупайте лицензию.
Как я уже сказал, большинство актуальных лаунчеров уже давно научилось скачивать и подключаться нужную версию Java, если по каким-то причинам вы хотите использовать другую версию, то вам придется указывать путь до Java.exe вручную.
Адреса расположения версий Java:
При установке 32bit: C:\Program Files\AdoptOpenJDK\jdk-16.0.1.9-hotspot\bin\java.exe
При установке 64bit: C:\Program Files\Java\jdk-16.0.2\bin\java.exe
Предупреждение :
Повторю еще раз, для особенно слепых, кратко и поделу.
До Minecraft 1.17, а именно до снапшота 21w19a все версии игры отлично работали на Java 1.8.0_281, с модами и без модов, НО теперь все новые версии игры требуют версии Java 16, лиц лаунчер сам скачивает и использует нужную версию, а вот пиратам не повезло.
Многие пиратские лаунчеры этого пока не умеют, возможно не все научатся, потому что бы сейчас, а может быть и потом запускать на пиратском лаунчере Minecraft 1.17 нужно установить Java 16 и использовать именно ее для запуска игры. Прочие ванильные версии Minecraft работают на Java 16, а вот версии с модами НЕ РАБОТАЮТ на Java 16, для их запуска вам нужно указывать старую добрую Java 1.8.0.
Большинство лаунчеров позволяют указать адрес до исполняемого файла java.exe, обычно это делается в настройках лаунчера, именно там вы должны указать путь до 16 java, а уже потом запускать Minecraft 1.17, ну а для запуска версий с модами указывать java 1.8.0. В будущем пиратские лаунчеры поумнеют и вам не придется этого делать. ну а пока
Пример как выглядит выбор между двумя версиями Java в Rulauncher, обе версии находятся в C:\Program Files\Java далее выбирается нужная, -> папка bin, а в ней выбирается java.exe
When trying to open a Java .jar file through the command prompt, such as using the command “Java -Jar xxxx.jar”, you might encounter the following error message:
This could be due to several factors, including but not limited to:
- Corrupted registry
- Missing Java path in your Environment Variables
- Java installation folder being moved
For example, we encountered this issue when updating Java SE to the latest version – we likely previously had a 32-bit Java installation, and when running the 64-bit Java installer, our Java path changed.
Error output when trying to run Java commands in Command Prompt.
Luckily, this is fairly easy to fix, as it just requires addressing one of the above problems with the appropriate solution. Follow our steps below to get your Java commands via command prompt working again, and leave a comment in the comments section if you encounter any further issues (or know of a better solution).
- Delete all previous versions of Java (using “Programs and Features” uninstall process). If java folder is remains in “C:/Program Files/…”, please delete it.
- Clean up your registry (delete your java key):
- Go to Start and then Run
- Type in ‘regedit’ in the edit field
- Go to HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Uninstall
- Under this Uninstall folder you will find many registry entries within curly brackets. Regedit uninstall pathway.
- Click on Edit tab and then Find
- Note: Highlight Uninstall folder before performing search for particular registry.
- Enter version string as value to find corresponding registry entry to be deleted.
- Once you find registry key, highlight that key and then Right click on it and choose Delete
- Confirm the delete and click Yes
B.) How to install latest java or JDK in Ubuntu 20.04 from oracle (manually)
Step22
Java JRE download steps -
Alternatively, you can download java using wget command.
Reference output
Step23
Rename .deb file using mv command, if required. Then install Debian package using dpkg command.
output
Default installation directory path of java would be "/usr/lib/jvm/jdk-15.0.1/". So, make a note of it, as it will be required to set up a Java_HOME variable.
How to set "JAVA_HOME" variable in Ubuntu 20.04
Set JAVA_HOME variable for all users in Ubuntu by editing environment file.
Step24
Edit /system/environment file
Add path "/usr/lib/jvm/jdk-15.0.1/bin" to the last of the environment file. Then, save and exit.
Run source command to execute changes made in environment file.
Step25
Check your java version
Video Tutorial - JRE error solved for Ubuntu
Video on "How to fix java runtime environment error in Ubuntu 20.04"
To view this video please enable JavaScript, and consider upgrading to a web browser that supports HTML5 video
Java download
Before installation, first we need to download java -
Step1
A.) How to install java or JRE in Ubuntu 20.04 using apt command
To install java in Ubuntu using repository, Follow these commands
Step17
Update package index using apt command
Step18
Check if you have any old java version installed in system. In my case, java is not installed.
output
Step19
Run "apt" command to install java or JRE. I will install default-jre version 2:1.11-72 in my Ubuntu system from list.
Select "Y" and press Enter. Let installation complete. it will take few minutes.
Step20
Check java version
output
JRE vs JDK
How to Remove java from Ubuntu 20.04
Step21
Run apt command to remove JRE package installed. Press Y and then enter.
Steps for finding registry keys for any version of Java 7
Follow format 7.0.xxx
where xxx can be 100, 120, 130, 140 and so on.
for example:
- Type 7.0.100 in search field, finds registry key for Java7 update 10
- Type 7.0.120 in search field, finds registry key for Java7 update 12
- Type 7.0.180 in search field, finds registry key for Java7 update 18
Steps for finding registry keys for any version of Java 1.5
Follow format 1.5.0.xxx
where xxx can be 100, 120, 130, 140 and so on.
for example:
- Type 1.5.0.100 in search field, finds registry key for jre1.5.0_01
- Type 1.5.0.120 in search field, finds registry key for jre1.5.0_12
- Type 1.5.0.180 in search field, finds registry key for jre1.5.0_18
- Steps for finding registry keys for any version of Java 1.4
Follow format 1.4.2_xxx
where xxx can be 01, 12, 13, 14 and so on.
for example:
- Type 1.4.2_01 in search field, finds registry key for jre1.4.0_01
- Type 1.4.2_12 in search field, finds registry key for jre1.4.0_12
- Type 1.4.2_18 in search field, finds registry key for jre1.4.0_18
Reinstall Java and set system variable JAVA_HOME to your JRE (or JDK) path.
You can check if this was a successful solution with the following commands
Manually open command window to Java pathway.As a side note, you can also launch a command prompt directly from within the Java folder – navigate to your C:\Program Files\Java\bin folder (or wherever your Java is installed), hold Shift + Right click inside the window, and click “Open a command window here”.
Passionate about technology, Windows, and everything that has a power button, he spent most of his time developing new skills and learning more about the tech world. Coming from a solid background in PC. Read more
- A Java Runtime error might appear if you have an older version of JRE software installed.
- If you have wondered how to fix Java issues, reinstalling it can help you.
- To fix the Java Runtime Environment not found error, make sure to have the latest version of Java.
- Download the JRE version that corresponds with your system type so you won't deal with other types of Java issues.
To fix various PC problems, we recommend Restoro PC Repair Tool:
This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:
- Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here) .
- Click Start Scan to find Windows issues that could be causing PC problems.
- Click Repair All to fix issues affecting your computer's security and performance
- Restoro has been downloaded by 0 readers this month.
The Java Development Kit (JDK), the Java Virtual Machine (JVM), and the Java Runtime Environment (JRE) form a trio of Java platform components for developing and running Java apps.
A runtime environment is a piece of software that is designed to run other software. As the runtime environment for Java, the JRE contains the Java class libraries, the Java class loader, and the JVM.
So if you don’t have JRE installed or you have an older version of the software you might encounter one of the following messages:
- Error: Could not find Java SE Runtime Environment – you don’t have the Java SE version installed on your system
- This application needs version 1.x or higher of the Java Runtime Environment – you should update your Java version to the latest you can find on the official website
- A Java Runtime Environment(JRE) or Java Development Kit (JDK) must be available to run this app – like the first error, check if you have installed JRE or JDK and if not, install them
In today’s guide, we will explore the most efficient and easy methods to try out in this situation. Read on for more details.
How can I fix the Runtime error on Java?
Давайте немного разберемся, что это и как:
Начиная с предварительной версии 21w19a и с релиза 1.17 игра работает на более новой версии JAVA, лицензионный лаунчер это знает, он автоматически скачивает и устанавливает все необходимое, а вот многие пиратские лаунчеры этого пока не умеют, потому пиратам придется делать это руками.
К сожалению, не достаточно просто указать в лаунчере новую версию JAVA, новые версии игры работать будут, другие, более старые версии игры работать тоже будут, а вот многие моды на старых версиях всего скорее работать не будут, так как они устарели.
Предупреждение :
Большинство актуальных пиратских лаунчеров (в том числе наш rulauncher) научилось скачивать и правильно подставлять нужную версию Java, потому данная статья уже потеряла актуальность.
9 Answers 9
Finally found a forum post that outlined what the registry is supposed to look like when not broken.
- Added key HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment
- Added String Value CurrentVersion = 1.7
- Added key HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.7
- Added String Value JavaHome = C:\Program Files\Java\jre7
Running cmd java -version and Eclipse now works
It should not be necessary to do this. The Java installer will set these keys up for you. If they are missing, reinstall your JRE.
You can tell eclipse which JRE to use in the eclipse.ini. If you've installed bundles that require 1.7 in your IDE you will need a 1.7 JRE to run the IDE itself. add the below lines to eclipse.ini file
-startup plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
-vm C:\Program Files (x86)\Java\jre7\bin\javaw.exe
.
.
.
You can try reinstall your JDK. I've had this problem because I uninstalled so many java things in my PC. And when I open Eclipse, the error occurred.
A 32 bit eclipse cannot load a 64 bit Java Runtime Environment.
Try again with a 32 bit Java Runtime Environment, or (preferred) upgrade your Eclipse to a 64 bit version.
Also, a good idea (from the command line)
Which should give you details about your JVM. If it doesn't work, focus on fixing that before fixing Eclipse's use of Java.
java -version also returns the registry error. which I already knew and had stated in the op. I am focusing on fixing that but do not know what the next steps I should take are.
As most of us suggested to edit the registry, but in case you don't want to, because it's risky or you don't have permissions to do so, you can uninstall all the java version, restart your machine, install desired java version, make sure to set path settings. This worked for me.
I was getting the same error (below) for Oracle when I clicked on a G2 application.
Error: opening registry key 'Software\JavaSoft\Java Runtime Environment'
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
I restarted the machine, still the same.
I reinstalled the app (which includes Oracle), still the same.
I checked all the suggested registry settings as suggested and my registry was fine.
I checked the shortcut path and it fires up javaw.exe with a string following within the shortcut. I navigated to the G2 program files and I tried clicking in the javaw.exe directly within the application folder and got the same error.
I did some research into this and found that Java has a Javaw.exe within the following path:
I navigated to the path and clicked on this javaw.exe file and didn't get any errors
I renamed the javaw.exe in the G2 app to javaw_old.exe and then copied and pasted the javaw.exe file from the above path into my app folder. Files side by side, you could see a file size difference and the date was 8 months difference. The newer and larger file being the one in the latest Java install folder.
Clicked on the G2 shortcut and the application opened without any errors.
If you have the same issue as me where everything Java is okay and your still getting the error, try find the java(.exe) file that your app is erroring on, rename it and copy and paste the same file from your Java folder (C:\Program Files\Java\jre7\bin) to the same folder your app's Java file is located.
How to Fix "Java Runtime Environment not found" errorIn this post, we will solve "Java Runtime Environment not found error". This java error is one of the common error faced by developers or end-users. Whenever you try to install any software which requires java like eclipse or Minecraft. Also, if you are new to java development, JDK or Java Development Kit is necessary for you.
Following this tutorial will help you to resolve all Java runtime errors. Additionally, you will learn to install, remove and set java variables in Windows10 and Ubuntu.
These are the very common errors you will find related to Java.
- java runtime environment not found
- java runtime environment not found windows 10
- eclipse java runtime environment not found
- eclipse java runtime environment not found path
- java SE runtime environment not found
- java runtime environment not found at bin javaw.exe
- unable to load java runtime environment
- cannot determine a valid java home
- java runtime environment not found mac
Let's understand some basic concepts of Java runtime first
Table of Contents
3. Install Java Runtime Environment (JRE)
- Right-click on the downloaded JRE setup file.
- Select Run as administrator and accept the installation prompt.
- In the next window, you can change the destination folder or leave the default.
- Once selected just click on the Install button to complete the installation.
- You will receive the message that the installation was successful. Click on close the complete the install and close the window.
We recommend you to check if there is a new Java update each time you encounter this issue. The software will not update automatically, so, you will have to manually perform this task.
That is it. You should now have the latest version of Java Runtime Environment on your PC and you should no longer receive the error message.
Please write us in a comment below if these solutions helped you or if there are any other suggestions that we should include in our article.
Still having issues? Fix them with this tool:
what is a runtime environment
Target would be JRE or CLR for your program, need to decide by you. As soon as you execute any program, it's in run time.
1. Run Windows troubleshooter
- Select Start , click on Settings.
- In the next menu, choose Update & Security , and then click Troubleshoot.
- Select the type of troubleshooting you want to run, then select Run the troubleshooter.
- Allow the troubleshooter to run and then answer any questions on the screen.
If you see a message that no changes or updates were necessary, you can try the recovery options. This is a built-in troubleshooter tool from Windows 10.
How to install java runtime environment in Windows 10
Step3
Once Download completes. Browse to "jdk-15.0.1_windows-x64_bin.exe" file and double click on it, to run installer. Click Next.
Step4
I recommend to keep "C:\Program files\java\jdk-15.0.1 (64-bit)" as default installation folder. Select Next.
You may select different installation folder also. For example, if you are installing second instance of java software. Click on change and browse for target folder.
Step5
Let installation complete, it may take few minutes.
Step6
Click close. Now you are done with java installation on windows 10.
How to set environment variable for java in windows10
Set Environment variable for java in windows 10 by these steps -
Step7
Type "environment" in search window. Click "open" on "Edit the system environment variables"
Step8
Click on Environment variables.
Step9
Select "Path" > Then click Edit.
Step10
Select New > Give path of java installation directory > For example, "C:\Program files\java\jdk-15.0.1\bin" in my case. If you have selected different folder for java installation in step4. You can enter your path till bin folder.
Click OK.
Step11
Set "classpath" for java. Click "New" in environment variable window. It allows to setup new environment variable.
Step12
In "Variable name", enter "classpath". Also in "variable value" provide path to your java installation till "lib" folder. In my case it is "C:\program files\java\jdk-15.0\lib > Select OK
Close all open environment variables windows by selecting OK.
How to check what version of java i have ?
Installation and java variables have been setup. Now, Let's validate java installation and version.
Step13
Open command prompt with "run as administrator" rights in windows 10.
Step14
Run "java" command to check your Java and JRE (Java Runtime Environment) version.
Check java SDK version with javac command
How to install Java runtime environment step by step
Let's solve 1 st reason of "Java runtime environment not found", Because of java is not installed.
Step2
First check for any pre-installed java version -
Open command prompt with "Run as administrator" and run java command.
How to uninstall java from Windows 10
In case, you are not happy with your old java or JRE version and want to install new. For that, you need to remove old java version.
Cleanup of Java from windows 10 is pretty easy. Follow these steps to remove java from your system.
Step15
Search add or remove programs and click open
Step16
Select java program and click Uninstall.
Java software will go from window. You can cleanup java variables also, setup in step10 and 11 earlier.
Remove java runtime environment package using dpkg command
Step26
Run dpkg command with --purge option to completely clean java from Ubuntu 20.04
What are causes of "Java Runtime environment not found" error
- Java is not installed in your system
- Java installation not completed (due to errors)
- Environment variables of Java are not set
- Java conflict due to more than one Java Runtime installation
Because JRE is platform-dependent, I have covered java installation, variable setup and un-installation for Windows and Ubuntu both.
Choose Windows 10 or Ubuntu 20.04 from the post and follow step by step to get java issues resolved.
2. Download Java Runtime Environment (JRE)
-
from the official website.
- After visiting the list above, choose if you need a 32bit or a 64bit architecture of JRE.
- Click on the Agree and download button to start the actual download.
If you don’t know which version of Java is the correct version for your system, you can find out by searching in Cortana search the term System Information.
You should open the first option that appears after the search, and then check the value under System Type (32-bit or 64-bit).
Читайте также: