cannot find jre path что делать
JAVA_HOME должны указывать на JDK не JRE
Узнайте о первопричине ошибки Maven ‘JAVA_HOME должны указать на JDK, а не JRE’ и как ее устранить
1. Введение
В этом учебнике, мы будем говорить об исключении, что Maven бросает, когда неправильно настроены: JAVA_HOME должны указывать на JDK, а не JRE.
Maven является мощным инструментом для создания кода. Мы заглянем под капот, чтобы понять, почему эта ошибка происходит, и увидим, как ее решить.
2. JAVA_HOME проблема
После установки Maven, мы должны установить JAVA_HOME переменная среды, так что инструмент знает, где найти команды JDK для выполнения. Цели Maven управляют соответствующими командами Java в отношении исходных кодов проекта.
Например, наиболее распространенным сценарием является компиляция кода путем выполнения Явак команда.
3. JDK или JRE
Как Maven проверить JAVA_HOME путь?
Перед запуском каких-либо целей, Maven проверяет на существование Ява командный в пути, указанном JAVA_HOME или попросив ОС для установки JDK по умолчанию. Если выполненный не найден, Maven завершает работу с ошибкой.
Вот мвн выполняемая проверка linux (Apache Maven v3.5.4):
Эта проверка может показаться разумной на первый взгляд, но мы должны учитывать, что и JDK и JRE имеют бен папка и оба содержат выируемый Ява файл.
По этой причине, mvn компиляции команда потерпит неудачу – как мы увидим в следующем подразделе.
3.1. Сбой компиляции из-за JRE вместо JDK
Как обычно с настройками по умолчанию, они очень полезны, если у нас есть “стандартная” конфигурация.
Например, если мы установим Java 11 на систему Ubuntu 18.04 и не установим JAVA_HOME окружающей среды переменной, Maven будет по-прежнему счастливо найти наш JDK и использовать его для различных целей, в том числе компиляции.
Но если нам удалось настроить нестандартную конфигурацию (не говоря уже сделал беспорядок) на нашей системе, помощь Maven не достаточно больше. Это может даже вводить в заблуждение.
Допустим, у нас есть следующая конфигурация на Ubuntu 18.04:
Если мы сделаем нашу основную проверку:
Мы получим значимый результат, как это:
Давайте посмотрим, что произойдет, если мы попытаемся составить проект:
Теперь мы получаем ошибку:
3.2. Исправление ошибки компиляции на уровне проекта
Как и во многих других случаях с Maven, рекомендуется настроить значимые системные настройки – в этом случае мы изменим значение JAVA_HOME переменной, описанной в разделе 5, чтобы указать на JDK вместо JRE.
Однако, если мы не можем настроить по умолчанию по какой-либо причине, мы все еще можем переопределить настройки на уровне проекта. Давайте посмотрим, как это сделать.
Во-первых, мы откроем пом.xml нашего проекта, перейдите в раздел сборка/плагинУгон/плагины и взглянуть на запись для Maven-компилятор-плагин :
Затем мы добавим конфигурацию к нему, чтобы он использует пользовательские выполняется и пропустить поиск Явак в JAVA_HOME/бин каталог:
В системах Unix этот выируемый должен быть скриптом с адекватным разрешением. В системах Windows это должно быть .exe файл.
Далее мы попытаемся составить проект еще раз:
4. Проверка конфигурации JAVA_HOME
Это довольно просто проверить, если JAVA_HOME указывает на фактический JDK. Мы можем либо распечатать его содержимое в терминале, либо запустить одну из следующих команд оболочки:
4.1. Проверка JAVA_HOME на Linux
Просто откройте терминал и ввех:
Если JAVA_HOME указывает на JDK, выход должен выглядеть так:
Если JAVA_HOME не указать на JDK, ОС будет бросать сообщение об ошибке:
4.2. Проверка JAVA_HOME на Windows
Откройте командный запрос и ввех:
Если JAVA_HOME указывает на JDK, выход должен выглядеть так:
Если JAVA_HOME не указать на JDK, ОС будет бросать сообщение об ошибке:
5. Как решить проблему
Прежде всего, мы должны знать, где найти наш JDK:
6. Заключение
В этом кратком учебнике мы обсудили « JAVA_HOME должны указать на JDK не JRE “ Maven ошибки и рассмотрел его первопричину.
Наконец, мы обсудили, как проверить ваши JAVA_HOME переменной среды и как убедиться, что она указывает на JDK.
Установка Java (JDK) в Windows и Linux, переменная PATH и JAVA_HOME
Давайте проясним несколько вещей перед тем, как мы начнем.
Установка Java (JDK) в Windows
Первым делом необходимо скачать JDK с официальной страницы Oracle. В нашем случае нужна версия под Windows, в самом низу.
После установки запустите скачанный exe-файл и установите его на ваш компьютер. Как только вы это сделаете, нужно будет настроить окружение.
Теперь нужно найти и дополнить переменную PATH так, чтобы она содержала путь до установленной Java. Выберите PATH и нажмите «Изменить»:
Вы увидите список уже установленных переменных. Сейчас необходимо нажать «Новый» и добавить путь, по которому установлена Java (каталог bin!). По умолчанию это обычно «C:\Program Files(x86)\Java\jdk\bin».
Нажмите «Готово» (или «Ок»), сохраните настройки и на этом всё готово! Чтобы проверить, что установка прошла корректно, откройте консоль и введите:
Если вы получили сведения о версии Java, значит всё хорошо.
Установка Java (JDK) на Linux
Откройте терминал и напишите команду для установки пакета:
Чтобы прописать JAVA_HOME в окружение, выполните следующую команду (только убедитесь, что такой каталог уже есть):
Чтобы прописать компилятор Java в PATH, выполните другую команду (опять же, ваши пути до Java могут отличаться от моих):
На этом установка закончена. Чтобы проверить, что всё работает правильно, достаточно написать в терминале:
О том, как же всё-таки писать на Java, мы расскажем в следующий раз.
error while starting ARIS Express: «launcher.cfg»
after last update of ARIS Express to version 2.4c I cannot launch ARIS Express. Following error is displayed: «Unable to find a JRE in the specified directory. Please repair the settings in launcher.cfg and try again».
Java 8 Update 111 is present on my computer. Uninstalling and installing of setup.exe was not helpful. File «launcher.cfg» ist not existing on installing path of ARIS Express.
Can help me someone?
Comments
please uninstall and delete the installation folder completely before installing Express 2.4c,
How do I uninstall Aris Express and start all over with a fresh install? I have this installed on Windows 10 on a Mac (using Virtualbox). I’ve had the same error message and follow other instructions on the forum which has not worked and I’d like to start fresh.
I have recently changed my laptop. Installed ARIS Express, and when I started it, I received the following message instead.
Even thenI am getting that same error message.
Please guide me on what I should do to get ARIS Express running.
Please guide what I should do.
I was also checking the directory under ARIS Express\Client\jre in my older machine. That also does not have a launcher.cfg file, but ARIS Express runs there.
Matter resolved. Thank you.
I get the same error message and even if I delete the installation folder and reinstall I get the error message again. I am trying to run it on a Mac Pro computer with Parallells and Windows 10. Installing the Microsoft version of Aris Express.
i have already uninstalled and deleted all aris-folders before installing Express 2.4c. But its still not working. I have no idea how to fix it.
I hope someone can help pls.
you state that the message about a missing JRE is shown.
The system-wide installed JRE is not important, JRE (windows version) brings its own JRE.
It should be located in ARIS Express\client\jre, so there should be subfolders containing (bin and lib). Is that that case on your computer after installing?
Do you try to install on a remote directory?
enclosed you find the screenshots of the installation folder. It contains all subfolder.
What do you mean with installing on a remote directory? I have just a local installation.
Regarding the error message something has to be wrong with the launcher file.
Bonjour j’ai suivi toute la procédure que vous avez mis dans vos capture d’écran mais dans le dossier «lib» je n’ai pas «launcher» comment je pourrais faire?
The same here, today installed a clean Win 10, so for sure there are no registry problems etc.
actually, the launcher.cfg should not be needed. Your installation seems to be ok.
You can try to place a file named «launcher.cfg» in the folder » \client\config» with the following content:
have done as described but it doesnt help.
Hello, I’m afraid I have the same error message, clean first-time installation on Windows 10.
I have found a solution.
Execute the file C:\Program Files\ARIS Express\client\lib\express.jnlp
After executing the file, a new application exe file will be generated. Install it in your desktop and use it to run the program.
You can email me at jmonagas@ecoem.com.ve for further assistance
Hello Jose, I don’t seem to have a file called ‘express.jnlp in the location you’ve named. Where is this file? And by exexcute, do you mean ‘click to open’?
Thank You Jose Monagas!
Your advise is very useful.
the program has start working.
O meu estava com esse erro, fazendo isso resolveu, Obrigado!
Thank you, that helped. =)
Estava com o mesmo prolema após executar o processo do Jose Monagas deu tudo certo.
3 years, and this solution still works. Thank you Jose
Thank you Jose Monagas. As of 2019-09-04 the solution is working fine!
Where exactly do I find the newly generated file?
Thanks Jose, Your solution helped me to get Aris express running. Thank you for sharing.
The solution explained by Jose Monagas is working.
I tried your solution, and it worked.
Thank you very much.
Thanks a lot, Jose! It’s working now! 🙂
i don’t have: Execute the file C:\Program Files\ARIS Express\client\lib\express.jnlp
This path also leads to the target in october 2021 for version 2.4h. Great tip!
Thank You Jose Monages!
I did not try Frank’s solution as it doesn’t seem to work for anyone and I also tried to launch the Express file which also did not work. I’m still unable to use Aris Express since upgrading.
I started express and then expresslauncher and a new shortcut on the desktop (win10) was created automatic.
I faced the same problem recently, with almost the same setup: Win10 VM in Virtual Box on a Mac Sierra (10.12.4).
The current Java Version and Aris express have been downloaded and installed, but I didn’t get it running. I found out that in the System panal «Java» in security tab the option «Java in Browser» (or similiar in English) had to been enabled (disabled by default).
After that, execute
jawas «C:\Program Files\ARIS Express\client\lib\express.jnlp
in the command program. It’ll run afterwards (with a new Desktop icon).
I have found a solution.
Execute the file C:\Program Files\ARIS Express\client\lib\express.jnlp
After executing the file, a new application exe file will be generated. Install it in your desktop and use it to run the program.»
а после осуществил запуск ARIS Express от имени администратора и проблема устранилась
I have tried the above suggestions with no success. I am running Windows 10. I love Aris Express, but starting to think I’ll have to find a new tool. Can someone help with how to fix? Would be greatly appreciated as I don’t want to learn a new tool and have to migrate all my docs. Thanks.
The download links for ARIS Express are not working and neither is the first use activation process.
get file launcher.cfg by Frank Weyand (posted on 2016-10-28 ) to c:\Program Files\ARIS Express\client\ (only)
run ARIS Express.exe. 🙂
I have the same problems on a W10 pro, Update 1709 with aris 2.4d. The installation is new, I’ve never installed Aris before on this maschine.
Executing the ArisExpress.exe doesn’t work.
Copying the msvcr100.dll to c:\Program Files\ARIS Express\client doesn’t work.
Creating the launcher.cfg with the content posted by Frank Weyand doesn’t work.
Executing the file C:\Program Files\ARIS Express\client\lib\express.jnlp created a new Desktop icon, pointing to a location in the local java cache. This works, but it doesn’t execute the installed version, but the downloaded web version. This is not what I want. I want to execute the installed version.
Как прописать JAVA_HOME?
Картинка для привлечения внимание. Ноги, кафель, ну вы поняли.
Windows:
Приступим к настройке.
Окно «Свойств системы» в Windows
Не будет лишним так-же указать переменную «JRE_HOME», она пригодится, например, для разработки портлетов для портала Liferay, для этого по аналогии повторите пункт 6. Как правило, JRE находится в папке с JDK, примерный путь «C:\java\jdk1.7.0_79\jre\».
После установки дистрибьютива JDK виртуальная машина «java.exe» будет доступна в консоли повсеместно. Для выполнения некоторых задач, необходимо так-же предоставить доступ к компилятору «javac.exe», для этого отредактируйте переменную Path. Добавьте в значение переменной «;» и путь до папки с компилятором, например «C:\Java\jdk1.7.0_79\bin\».
Ubuntu:
Для начала необходимо понять куда была установлена Java, выполните команды:
Результатом выполнения команды будет список установленных виртуальных машин Java:
Из этого списка нам потребуется столбик Path. Полный путь до виртуальных машин должен быть до «jre/bin/java», например в нашем случае 0-ой пункт будет иметь полный путь до машины «/usr/lib/jvm/java-8-oracle».
Для установки переменной JAVA_HOME, необходимо прописать ее в /etc/environment, используя путь до машины Java.
Изменения вступят в силу автоматически после перезагрузки, либо мы можем перегрузить переменные окружения командой:
Осталось выполнить проверку:
Если в результате команда напечатает путь до машины JAVA, значит настройка завершена успешно.
JRE_HOME
Не будет лишним так-же указать переменную «JRE_HOME», она пригодится, например, для разработки портлетов для портала Liferay. Как правило, JRE находится в папке с JDK, т.е. значение JRE_HOME = путь до виртуальной машины + «/jre».
Why am I still getting a cannot find Java SE Runtime Environment?
These are the errors I get when I try to run a simple java version in the command window.
I followed the advice on Error: Registry key ‘Software\JavaSoft\Java Runtime Environment’\CurrentVersion’?. When I went on regedit, here’s what I saw
And my current environmental variables are
Does anyone know how i can get rid of this issue? I could do one more uninstall/install but I think that be a waste of time and won’t make a difference.
6 Answers 6
Now the part I don’t get is how the java.dll library file was deleted in the first place.
Please try the steps. I hope, it will help you.
Step 1: Delete all previous versions of Java (using «Programs and Features» uninstall process). If java folder is remain in «C:/Program Files/. «, please delete it.
Step 2: Clean up your registry(delete your java key). Please follow the below link for step by step clean up
https://java.com/en/download/help/manual_regedit.xml
I had similar problem. Turns out, even when you have 64-bit OS, your browser is most likely 32-bit and therefore your JAVA too. You need to manually install 64-bit JAVA.
I hope that will help.
try adding «%JAVA_HOME%\bin;» in the Path section instead of this «C:\Program Files\Java\jdk1.7.0_71\bin», should make no difference but just try it like this.
make sure you have path variable set to latest jre/bin folder
I haven’t seen this answer, but this is how I ran into the problem and then solved it.
I had Java 14.0.2 installed and I needed IntelliJ and Maven installed. This computer is an enterprise computer so I didn’t have much saying on the installation process. I suppose IntelliJ came with Java 10.0.1 or that IT installed it as part of their process and it of course threw all my system out of the window.
So to fix this, I had to get someone from IT to unlock the admin things for me, and then:
No need to fiddle with registry, or even restart the computer (just to restart the Terminal after Path changes).