Error in java launcher could not open file

Путь Java .. Ошибка jvm.cfg

Может кто-нибудь скажет мне, почему я получаю следующую ошибку, когда я пытаюсь запустить свои Java-программы? Программы успешно скомпилируются, но не могут быть запущены. Я уже установил путь Java.

C:\JavaServ>javac hello1.java C:\JavaServ>java hello1 Error: could not open C:\Program Files\Java\jre6\lib\amd64\jvm.cfg 

17 ответов

это должен быть внутренний файл JRE, и в целом вы не должны иметь дело с ним при запуске/компиляции java.

Здесь вы можете найти объяснение того, для чего именно предназначен этот файл. В конце концов, ваша установка Java каким-то образом повреждена, поэтому, чтобы сначала решить эту проблему, я предлагаю вам переустановить jre.

Вы должны убедиться, что вы устанавливаете правильный jre для своей архитектуры.

Если вы переустановите его, он просто будет искать этот файл в JRE, поэтому он не позволит вам удалить JRE.

Не полезно. Если что-то не так, что я могу исправить, я посещаю SO, чтобы узнать, что это такое и как это исправить.

Читайте также:  Html шаблон windows 10

Не думаю, что это правильный способ. (возможно, правильная установка Java — это постоянное решение). но это трюк. )

Удалите файл «java.exe» из «c:\windows» и «c:\windows\system32». Это должно исправить его.

Это работает для меня, просто найдите «Java» в «c: \ windows» и удалите все «java.exe», «javaw.exe», «javaws.exe»

Вы не можете удалить/переустановить JRE, если у вас есть эта ошибка. Поэтому, поскольку предыдущая установка скопировала 3 файла, а именно Java.exe, Javaw.exe, javaws.exe в папку c:/windows/system32. Просто зайдите туда и удалите эти файлы и загрузите новую версию jre из oracle и установите ее. Я предпочту обновление JDK 1.6 45. Это очень стабильно.

Это произошло для меня, когда я переместил установку по умолчанию из переполненного основного раздела в другое место. Пихта

Java загадочно сломалась на моем рабочем ПК после того, как исправление безопасности было вытолкнуто нам, давая эту ошибку всякий раз, когда вы пытались запустить Java-программу. Так или иначе, подкаталог «lib» установки Java 7 исчез! Возможно, это связано с тем, что одновременно установлено несколько версий Java.

Если вы получаете эту ошибку, есть две вещи, которые могут быть неправильными:

1) Ваша установка Java нарушена. Если файл/каталог, на который он жалуется, не существует, удалите и переустановите JRE, а затем он должен быть там. Это исправило это для меня.

2) Если файлы есть, ваш PATH каким-то образом неверен или указывает на старую/сломанную установку Java. В этом случае вам нужно либо исправить свой PATH, чтобы указать на правильный файл java.exe/javaw.exe, либо использовать полный путь. Поэтому вместо:

3) Если ваш PATH правильный, и файлы там, и он все еще не работает, путь может быть усечен, потому что он слишком длинный. см.: Запуск Java дает» Ошибка: не удалось открыть `C:\Program Files\Java\jre6\lib\amd64\jvm.cfg ‘».

Удаление / переустановка не решает проблему. Папка amd64 не создается, а верификатор версии java.com проверяет последнюю версию. Тем не менее, даже простая командная строка java -version не удается.

Программа может быть скомпилирована, но во время ее запуска приводит к такой ошибке:

Не удалось открыть C:\Program Files\Java\jre6\lib\amd64\jvm.cfg

Указывает, что в файлах программы отсутствует файл jvm.cfg. Причинами могут быть повреждение файла или файл может быть удален. Установите JRE снова в папку «Program Files».

Другой случай, который произошел со мной, заключается в том, что я установил 32-разрядный jdk и jre в 64-разрядную систему в Program Files (x86), а папка Program Files была пуста. В этом причина этой ошибки. Поэтому я установил 64-битную JRE в папку Program Files и начал работать. Обратите внимание, что это не связано с версией jdk. Связан только с проблемой JRE.

Источник

[Solved] Error Could Not Open jvm.cfg

If you are facing the error could not open jvm.cfg then do not worry. It has a simple but weird fix.
I faced the same issue when I tried to run a simple java program. I was using the jdk8. The interesting fact was that the program compiled successfully. But when I was executing the java program then it was giving Error: could not open C:\Program Files\Java\jre8\lib\amd64\jvm.cfg.

In short, below is the scenario

C:\JavaHungry>javac SimpleProgram.java C:\JavaHungry>java SimpleProgram Error: could not open C:\Program Files\Java\jre8\lib\amd64\jvm.cfg 

Let’s find out the solution/fix.

Fixed- Error: could not open C:\Program Files\Java\jre8\lib\amd64\jvm.cfg

2. Remove below files from this folder
java.exe,
javaw.exe,
javaws.exe

3. Run the program again, voila, the error is resolved.

If the above problem does not resolve even after deleting the .exe files, then, try this

2. PATH is not correct

1. Put below the line at the beginning of the PATH.

voila, the error is resolved.

If the above problem still persists, then

3. Remove Oracle directory executable files

Check the below directory

C:\Program Files\Common Files\Oracle

and remove the java related executables.

voila, the error is resolved.

If you are reading this line it means, you are still facing this annoying error. So the last trick is

4. Uninstall Java, Remove references to it from Registry and Reinstall it

That’s all for today, please let me know in comments which of the above 4 methods solved the error: Could not open C:\Program Files\Java\jre8\lib\amd64\jvm.cfg.

About The Author

Subham Mittal has worked in Oracle for 3 years.
Enjoyed this post? Never miss out on future posts by subscribing JavaHungry

Источник

Тема: Проблема в лаунчере

EzgaC

  • Просмотр профиля
  • Сообщения форума
  • Личное сообщение
  • Репутация

EzgaC вне форума

Новичок

Аватар для EzgaC

Проблема в лаунчере

Error: could not open `C:\Users\Nikita\AppData\Roaming\.minecraftonly\ja va\Java\lib\i386\jvm.cfg’ Незнаю что делать
зарание спасибо

EugeneTokarev

  • Просмотр профиля
  • Сообщения форума
  • Личное сообщение
  • Репутация
  • Домашняя страница

EugeneTokarev вне форума

Наблюдатель

EzgaC, Попробуй скачать Java 7, вот ссылка http://www.java.com/ru/download/
или же зайди в пуск напиши %appdata% зайди в папку Roaming удали папку MinecraftOnly
и скачать клиент/ Launcher заново вот ссылка http://minecraftonly.ru/download.html

EzgaC

  • Просмотр профиля
  • Сообщения форума
  • Личное сообщение
  • Репутация

EzgaC вне форума

Новичок

Аватар для EzgaC

Nexus11

  • Просмотр профиля
  • Сообщения форума
  • Личное сообщение
  • Репутация
  • Домашняя страница

Nexus11 вне форума

Местный Мудрец

Источник

Fix Could Not Open jvm.cfg in Java

Fix Could Not Open jvm.cfg in Java

  1. the Could Not Open jvm.cfg Error in Java
  2. Fix the Could Not Open jvm.cfg Error in Java

Sometimes, we think everything is working as expected, but some issues are behind the scenes. Today, we will discuss a similar situation and determine possible solutions.

the Could Not Open jvm.cfg Error in Java

This error occurred when we updated our machine to Windows 10 but later reverted to Windows 8 for a few reasons. All the applications worked fine, but we had an issue running Java Programs.

Whenever we try to compile the Java program, it compiles successfully, but as soon as we run this, it gives an error as follows.

Example Code (We are using JDK 8 ):

C:\>javac test.java C:\>java test Error: could not open C:\Program Files\Java\jre8\lib\amd64\jvm.cfg 

Fix the Could Not Open jvm.cfg Error in Java

There are a few possible solutions for this. Let’s have a look at each of them below.

Solution 1: Remove .exe Files From the System32 Folder

Go to the folder System32 , which resides in the C:\Windows location.

Remove the java.exe , javaws.exe , and javaw.exe from the folder. The error is gone; now, run the program again to get your desired results.

If this solution does not work for you even after deleting the .exe files, then go for the following solution.

Solution 2: Make Sure the Java PATH Is Correct

The other reason can be having an incorrect Java Path. So, write the following line at the start of the PATH .

The error must be resolved. If the error persists, then we can try the following solution.

Solution 3: Delete Oracle Directory Executable Files

Go to the following directory.

C:\Program Files\Common Files\Oracle 

Start looking for the executable files related to Java. Remove them if you find them.

Now, the error is resolved. If you are still reading this article, the error still annoys you.

So, go for the final solution, which is given below.

Solution 4: Uninstall Java and Reinstall It

The final solution is to uninstall Java. Make sure that you remove the references to it from the Registry and then reinstall it.

This trick must work, and you must eliminate the error now.

Mehvish Ashiq is a former Java Programmer and a Data Science enthusiast who leverages her expertise to help others to learn and grow by creating interesting, useful, and reader-friendly content in Computer Programming, Data Science, and Technology.

Related Article — Java Error

Источник

[Solved] Error: could not open ‘C:\Java\jre8\lib\amd64\jvm.cfg’

Hello guys, if you are getting «Error: could not open ‘C:\Java\jre8\lib\amd64\jvm.cfg'» error or just Error: could not open ‘jvm.cfg and wondering what to do and how to solve this error then you have come to the right place. I will show you how I solved this error and how you can use my tips to solve your error as well. A couple of weeks back I updated my laptop to Windows 10 but after trying for one day, I reverted back to Windows 8.1. Everything was alright until I open Eclipse, which was throwing «Error: could not open ‘C:\Program Files\Java\jre8\lib\amd64\jvm.cfg’ , as soon as I launch it. It was quite bizarre because everything was fine earlier.

I suspect a Java installation problem, so I went to the command prompt and typed Java, only to find the same error there as well. You can see below, I am just trying to run the «java» command from the MS-DOS window. Here «java» command is picked from PATH environment variable.

$ java
Error: could not open `C:\Program Files\Java\jre8\lib\amd64\jvm.cfg’

Then I checked my environment variables, JAVA_HOME, and PATH and they all refer to C:\Program Files\Java. So this bit frustrating. After some time, I found that the default installation also copied java.exe , javaw.exe, and javaws.exe to C:\Windows\System32 (i.e. uninstall of JRE didn’t go well). I just removed them and voila, the error was gone. That annoying error is no longer popping.

Error: could not open ‘C:\Java\jre7\lib\i386\jvm.cfg’ — Solution

If you are facing the same problem i.e. getting the Error: could not open ‘C:\Java\jre7\lib\i386\jvm.cfg’, then check your System32 folder and remove java.exe, javaw.exe, and javaws.exe if they exist there.

Here are the exact steps to solve could not open ‘C:\Program Files\Java\jre8\lib\amd64\jvm.cfg’ error:

1) Go to C:\Windows\System32
2) Search for Java in that folder
3) Remove java.exe, javaws.exe and javaw.exe from this folder
4) Open the command prompt
5) Type Java it should work

Mind you, your error could be little different than mine depending upon whether your laptop is 32-bit or 64-bit. For example, if you are using 32-bit JVM then you can get something like Error: could not open ‘C:\Java\jre7\lib\i386\jvm.cfg’.

Error: could not open



That’s all about how to fix this error: could not open ‘C:\Program Files\Java\jre8\lib\amd64\jvm.cfg’ in Windows 8 and Windows 10. I have got this with Eclipse, but you can also see this with any other Java application like IntelliJIDEA, NetBeans or Minecraft.

  • How to fix Caused By: java.lang.NoClassDefFoundError: org/apache/log4j/Logger (solution)
  • How to solve «could not create the Java virtual machine» error in Java? (solution)
  • Fixing java.lang.unsupportedclassversionerror unsupported major.minor version 50.0 (solution)
  • How to avoid ConcurrentModificationException while looping over ArrayList in Java? (solution)
  • How to deal with java.lang.NoClassDefFoundError: org/apache/xmlbeans/XmlObject? (solution)
  • Difference between NoClassDefFoundError and ClassNotFoundException? (answer)
  • How to fix ‘javac’ is not recognized as an internal or external command (solution)
  • java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory error (solution)
  • How to solve java.lang.OutOfMemoryError: Java Heap Space in Eclipse, Tomcat? (solution)
  • How to solve java.lang.ClassNotFoundException: com.mysql.jdbc.Driver error? (hint)
  • How to fix java.lang.OutOfMemoryError: Direct Buffer Memory? (solution)
  • How to solve java.lang.classnotfoundexception oracle.jdbc.driver.oracledriver? (solution)
  • java.lang.ClassNotFoundException : org.Springframework.Web.Context.ContextLoaderListener (solution)
  • How to fix java.lang.OutOfMemoryError: Java Heap Space in Eclipse, Tomcat? (solution)

Источник

Оцените статью