-
Partition Wizard
-
Partition Manager
- Fixed: Java Virtual Machine Launcher Error in Minecraft & Eclipse
By Ariel | Follow |
Last Updated August 16, 2022
A lot of users encounter the Java Virtual Machine launcher error when running some Java programs like Minecraft and Eclipse. Don’t worry. This post of MiniTool explores several proven ways to fix the JVM launcher error.
What Does Java Virtual Machine Launcher Error Mean
Java Virtual Machine, also known as JVM, is a virtual environment that allows a computer to run Java programs written in other programming languages that are translated to Java bytecode. Without the JVM, Java programs won’t run properly. Here’s a user who encountered the Java Virtual Machine launcher error in Eclipse.
I’m having an issue with the eclipse JVM launcher. Last night, everything was working fine, as far as I know, nothing at all has changed on my pc since then. However, I woke up this morning to find that when I run any of my projects in eclipse, I receive this error: Java Virtual Machine Launcher- Error: could not open C:Program FilesJavajre1.8.0_60libamd6jvm.cfg
https://stackoverflow.com/questions/33324363/how-to-fix-eclipse-java-virtual-machine-launcher-error
After analyzing extensive user reports, the Java Virtual Machine launcher errors mainly occurs when running in Eclipse and Minecraft. It’s so annoying that the failed to create the Java Virtual Machine error will prevent you from opening the Java-based software.
The error usually indicates that your computer cannot read or understand the bytecode you’re trying to execute. There are different possible reasons behind the Minecraft could not create the Java Virtual Machine error, such as insufficient permissions, corrupt/missing Java components, and incompatibility issues.
How to Fix the Java Virtual Machine Launcher Error
How to fix the Java Virtual Machine launcher errors? Here we summarize some effective fixes. You can try them in order until the JVM error gets fixed.
# 1. Add a New System Variable for Java
Many users reported that Minecraft could not create the Java Virtual Machine error can be resolved by adding a new system variable for Java. You may have a try.
Step 1. Type system variable in the Search box and select Edit the system environment variables from the Best match.
Step 2. In the pop-up window, navigate to the Advanced tab and click on Environment Variables.
Step 3. Click on New under the System variables window.
Step 4. Input _JAVA_OPTIONS in the Variable name box, and then input –Xmx512M in the Variable value box and click on OK to save the change. This will increase RAM allocation to 512 megabytes for Java.
Step 5. Click on OK in the Environment Variables window.
Once done, restart the program and check if the Java Virtual Machine launcher error Minecraft disappears.
# 2. Run Java as an Administrator
The “failed to create Java Virtual Machine” error can occur due to insufficient admin rights. Here you can follow the steps below to run the program with admin rights.
Step 1. Right-click the Java executable file and select Properties. If you can’t find the file, type Java in the search box, right-click the Java icon, and select Open file location.
Step 2. In the Properties window, go to the Compatibility tab and select the Run this program as an administrator option.
Step 3. Click on Apply and then on OK to save the change.
Now, you can relaunch the program and see if the “failed to create the Java Virtual Machine” error gets fixed.
# 3. Reinstall Java
Sometimes the Java Virtual Machine launcher errors can occur due to corrupted or outdated Java components. In this case, you can try reinstalling Java and see if it works.
Step 1: Press Win + S to open Search. Then search for Control Panel and launch it.
Step 2: In Control Panel, select View by: Category in the upper right corner. Then click Uninstall a program.
Step 3: Select each Java-related program from the list and then click Uninstall. Follow the onscreen instructions to finish the process.
Step 4. Once uninstalled, you can go to the Java official website, download the latest version and install it. If you don’t know how to do that, refer to one of the tutorials:
Java Runtime Environment Download and Install for Windows 10/11
Java Virtual Machine (JVM) Download & Install for Windows 10/8/7
Download, Install, and Update Java 32 Bit & 64 Bit [JDK vs JRE]
Further Reading: Do you want to manage your partition and disk on Windows effectively? MiniTool Partition Wizard is a good choice that can help you extend/resize/delete partition, convert a disk to MBR/GPT, migrate OS, etc. Besides, it can help fix various problems such as C drive full, and corrupt file system. Perhaps you need such a tool.
About The Author
Position: Columnist
Ariel has been working as a highly professional computer-relevant technology editor at MiniTool for many years. She has a strong passion for researching all knowledge related to the computer’s disk, partition, and Windows OS. Up till now, she has finished thousands of articles covering a broad range of topics and helped lots of users fix various problems. She focuses on the fields of disk management, OS backup, and PDF editing and provides her readers with insightful and informative content.
So like the title says, Im having an issue with eclipse JVM launcher. Last night, everything was working fine, as far as I know, nothing at all has changed on my pc since then. However, I woke up this morning to find that when I run any of my projects in eclipse I recive this error: Java Virtual Machine Launcher- Error: could not open C:Program FilesJavajre1.8.0_60libamd6jvm.cfg
I have already verified the integrity of my Path variable, (C:Program FilesJavajdk1.8.0_65bin
) Now at this point, you may notice, my jdk is on version 65. So is my JRE and java installation. I dont understand why eclipse is using jre 60. I also checked the preferences and changed the jre version too 65. No luck. Furthermore, I ran a simple java file without using eclipse through the command line and that ran/compiled just fine. I tried adding the -vm tag (It didn’t already exist there) to eclipse.ini and setting it too the jvm but it didn’t help. (I than removed it) I have no idea what to do… Please help, I’ve tried everything I know how to do. Thanks!
EDIT:
My eclipse.ini file below:
-startup
../../../.p2/pool/plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
../../../.p2/pool/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.300.v20150602-1417
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-install
C:/Users/Sanjiv/eclipse/java-mars/eclipse
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms256m
-Xmx1024m
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
EDIT 2
I have already tried reinstalling java, eclipse and jdk.
What is ‘Java Virtual Machine Launcher error’ in Windows 10/11?
If you are experiencing ‘Java Virtual Machine Launcher error’ or ‘Could not create the Java Virtual machine’ error while trying to open application that is build around Java in your Windows 10/11 computer, then you are in right place for the solution. Here, you will be guided with easy steps/methods to resolve the error. Let’s starts the discussion.
‘Java Virtual Machine’: Java is one of the most popular programming languages that can run on variety of different operating systems and devices. This programming language is used for web development, mobile applications, desktop applications and server-side programming. Java programming language generates JVM (Java Virtual Machine) that executes codes written in Java.
However, several users reported that they faced ‘Java Virtual Machine Launcher error’ issue on their Windows 10 computer while they tried to launch the application based on Java or that is build around Java. This error is occurred usually if something goes wrong with data or code that is being processed by JVM (Java Virtual Machine). This issue indicates your Windows computer is unable to read or understand the code. One possible reason behind this error is outdated Windows OS or current Windows OS version is not compatible with Java installed in your computer. Let’s take a look at error message.
“Error: Could not create Java Virtual Machine
Error: A fatal expectation has occurred. Program will exit”
‘Java Virtual Machine Launcher error’ issue is occurred possibly when you trying to open application like Minecraft or other apps based of Java programming language in your computer, that hasn’t enabled Java to run as Administrator. You should make sure you are running the app with administrator permission or you have enabled Java to run as Administrator. You can configure your Java program to run as Administrator in order to fix the issue.
This issue can be occurred if there is some issue with Java program installation. Corruption in files or component relating to Java program could be reason behind the issue. You can uninstall and then reinstall Java program in order to fix the issue. Also, this error is occurred when Java Virtual Machine (JVM) needs more RAM than its current allocation. You can increase the allocation in order to fix the issue. Let’s go for the solution.
How to fix Java Virtual Machine Launcher error in Windows 10/11?
Method 1: Fix Java Virtual Machine Launcher error with ‘PC Repair Tool’
‘PC Repair Tool’ is easy & quick way to find and fix BSOD errors, DLL errors, EXE errors, problems with programs/applications, malware or viruses issues, system files or registry issues and other system issues with just few clicks. You can get this tool through button/link below.
⇓ Get PC Repair Tool
Method 2: Configure or set Java program to run with Administrator permission
One possible way to fix the issue is to allow Java program to run with administrator permission. This way, you can fix the issue with all Java based application that was causing ‘Java Virtual Machine Launcher error’.
Step 1: Type ‘Java’ in ‘Windows Search Box’ or ‘Cortana’ and right-click on ‘Configure Java’ from results appear, select ‘Open File Location’
Step 2: Once you are inside the correct folder location, find and right-click on Java executable, and select ‘Properties’
Step 3: In ‘Properties’ window, click on ‘Compatibility’ tab, tick ‘Run this program as an administrator’ checkbox under ‘settings’ section and then hit ‘Apply’ and ‘OK’ button to save the changes
Step 4: Once done, retry opening the application based on Java that was causing error and check if the issue is resolved.
Method 3: Uninstall Java program and then reinstall it
This issue can also be occurred due to corrupted files and components relating to Java Program in your computer. You can uninstall and then reinstall Java in your computer in order to fix the issue.
Step 1: Open ‘Control Panel’ in Windows 10 and go to ‘Uninstall a Program > Programs & Features’
Step 2: Find and select ‘Java’ program, and select ‘Uninstall’ option. Follow on-screen instructions to finish uninstall process and after that, restart your computer.
Step 3: After restart, open your browser and visit ‘Java Official page’ or visit ‘https://www.java.com/en/download/manual.jsp’ page and download latest version of Java according to your Windows OS version like Windows 32-bit or 64-bit. You can download both 32-bit and 64-bit version of Java if you don’t know which one you need
Step 4: Once downloaded, find and double-click on ‘Downloaded Java Setup file’ file and follow on-screen instructions to finish installation.
Step 5: Once installed, retry running the application based on Java and check if the error is resolved.
Method 4: Expand the allocated RAM for Java in Windows 10
You can increase RAM allocation for Java in your computer in order to fix the issue.
Step 1: Press ‘Windows +R’ keys on keyboard, type ‘sysdm.cpl’ in the opened ‘Run’ dialog box and hit ‘Ok’ button to open ‘System Properties’ window
Step 2: In the opened ‘System Properties’ window, click on ‘Advanced’ tab and click on ‘Environment Variables…’ button at bottom
Step 3: Go to ‘System Variables’ section and click on ‘New’. Fill the available field in following way.
‘Variable Name – _JAVA_OPTIONS
Variable Value – –Xmx512M’
Step 4: Finally, hit ‘Ok’ and then hit ‘Apply’ and ‘OK’ on ‘System Properties’ window to save the changes.
Step 5: Once done, restart your computer to see the changes and retry opening the application based on Java and check if the issue is resolved.
Method 4: Run System scan for malware or viruses with some powerful antivirus
Sometimes, this type of error is occurred due to malware or viruses attack in computer. You can run system scan with Windows 10 build-in Windows Defender antivirus in computer in order to remove all threats in computer. You can also try some powerful third-party antivirus software for this purpose. Check if malware removal step resolves the issue.
Method 5: Edit Startup programs in Windows 10
You can also try to fix the issue by editing your Windows Startup programs. Let’s try.
Step 1: Press ‘Windows + R’ keys on keyboard, type ‘msconfig’ in the opened ‘Run’ dialog box and hit ‘OK’ button to open ‘System Configuration’ window
Step 2: In ‘System Configuration’ window, click on ‘Startup’ tab, find ‘WJView.exe’ and ‘Javaw.exe’ startup item from lists, and deselect their checkboxes if checked
Step 3: Finally, hit ‘Apply’ and ‘OK’ to save the changes and restart your computer. After restart, retry opening the program/application based on Java and check if the issue is resolved.
Conclusion
I am sure this post helped you on How to fix Java Virtual Machine Launcher error in Windows 10 with several easy steps/methods. You can read & follow our instructions to do so. That’s all. For any suggestions or queries, please write on comment box below.
Данная публикация посвящается всем ценителям Minecraft и других игр, требующих установки Java. На днях знакомые попросили помочь: при попытке запустить Майнкрафт у них появлялось сообщение — Java Virtual Machine Launcher ошибка, как исправить сейчас расскажу.
Не хватает памяти
При установке Джавы, необходимой для работы некоторых игр, отображалось следующее окно:
Она указывает на то, что для создаваемой виртуальной машины не хватает памяти. Очень часто подобная ситуация возникает, если некорректно выходить из игры (нажав Alt + F4 ) или при внезапном отключении ПК.
В моем случае, ошибка появилась после того, как пользователь случайно удалил компонент Java, потом пытался его переустановить, но на последнем этапе инсталляции отображалось вышеупомянутое окно.
На зарубежных источниках нашел два решения. Начну с более простого.
Настройка переменной среды
- Открываем панель управления. В Windows 7 это можно сделать через меню «Пуск», в «десятке» достаточно кликнуть правой кнопкой мышки по кнопке «Старт» (или нажать Win + X ), и выбрать из списка нужный элемент:
- Переходим к разделу «Система»:
- Слева кликаем по ссылке «Дополнительные параметры…»:
- В новом окне снизу есть кнопка «Переменные среды», которую стоит нажать:
- Кликаем по кнопке «Создать…», присваиваем новой переменной:
имя «_JAVA_OPTIONS»
значение «-Xmx512M»
- Обязательно сохраняем все изменения, нажав на ОК. Перезагрузка компьютера не требуется.
Теперь при запуске установщика Джава ошибка Java Virtual Machine Launcher не появиться.
Переходим ко второму способу.
Создание файла запуска
Покажу всё на примере Minecraft.
- Открываем пользовательскую папку, где хранятся игровые настройки. Для этого нажимаем Win + R и пишем команду:
%appdata%
- На экране отобразится каталог, в котором нужно найти игровую директорию, войти в неё и внутри создать новый текстовый документ (Блокнот):
- Туда стоит записать следующую фразу:
java -Xms650m -jar "c:UsersUSER_NAMEAppDataRoaming.minecraftminecraft.exe
Вместо USER_NAME пишем название своего аккаунта. Оно указано в адресной строке окна. Учетная запись не должна содержать русских символов. Только латинские (английские), иначе способ не сработает.
- Теперь нажимаем на пункт меню «Файл», затем выбираем «Сохранить как». Указываем имя «minecraft.bat» и указываем тип «Все…», как показано на скриншоте:
- Осталось только создать ярлык для созданного элемента и отправить его на рабочий стол, чтобы через него запускать игру.
Видео
Вы узнали, как исправить ошибку Java Virtual Machine Launcher. Но если вопросы остались, обязательно задавайте их с помощью формы комментирования внизу страницы.
Рекомендуем:
- Устраняем ошибку «Опаньки» в Google Chrome
- Что делать если не работает безопасный режим в Windows 10
- Как восстановить удаленные фотографии, сообщения, контакты на iPhone?
- d3dx9_43.dll скачать, чтобы устранить ошибку на компьютере
- Четыре способа получить роль администратора в Windows 10
Вам помогло? Поделитесь с друзьями — помогите и нам!
Java is a versatile, machine-independent programming language that is used to write a variety of different applications. Unlike most other applications, you can run java applications equally well in Windows, Mac, or Linux, provided you have installed Java Virtual Machine (JVM) in your system. However, if JVM breaks, then none of your java applications run.
One recent impact having a broken JVM launcher was felt by users of Minecraft. A recent update brought new features, but also required Java 16 to set up a server. Those with older version of JVM were greeted with a Java Native Interface (JNI) error.
There are other examples where a malfunctioning JVM launcher caused an application to not work, and it could probably happen again in the future. We have this article prepared, so that you can be prepared when your JVM launcher has an error.
What Causes Java Virtual Machine Launcher Errors
When there is a JVM launcher error in your system, the following are the most common reasons:
- JVM needs to be updated.
- Default app has not been set to Java.
- Insufficient global maximum heap memory.
- Application needs administrative rights to run.
You can somewhat diagnose what is wrong with your JVM and attempt a corresponding fix based upon the type of error message that you see when you JVM does not work.
Reinstall/Update Java
If the error message you see is “Java Virtual Machine Launcher Could Not Find The Main Class,” then Java has been incorrectly installed or Java installation has been corrupted in your machine.
JNI errors can be caused by outdated version of Java.
To fix this, you need to reinstall Java Runtime Environment.
Windows 10
- Launch Settings (Press Win + I), then navigate to Apps.
- Scroll to find Java and select Uninstall.
- Download and install the latest version of Java.
- Restart your computer.
Windows 11
- Launch Settings, navigate to Apps > Apps & features.
- Scroll to find Java.
- Click on the kebab button to its right, then select Uninstall.
- Download and install the latest version of Java.
- Restart the computer.
Increase System Memory for Java
You will get a “Could not create the Java virtual machine” error if Java is trying to use more memory than has been assigned to it.
You can fix this by increasing the amount of memory allotted to Java.
Note: The variable value -Xmx512M sets memory available to Java to 512 MB. You can change this value depending upon how much memory your Java was utilizing before. For instance, setting this to -Xmx1024M assigns 1024 MB system memory to Java.
Run as Administrator
Sometimes JVM errors can occur because you do not have sufficient user privilege to run the application.
You can fix this by configuring Java to run as administrator.
- Press Win + E to launch Windows Explorer, then navigate to Java installation folder. (Usually located at “
…/Program Files(x86)/Common Files/Oracle/Java/javapath
”) - Find
java.exe
and right-click on it. - Select Properties.
- Switch to Compatibility tab and put a tick mark on Run this program as an administrator.
- Click Apply, then click OK.
Set File Type Association to Java
If your error message is “Unable to access Jar file,” then one of the reasons for this issue is that your jar file association is not set to Java.
Windows 10
- Launch Settings (Press Win + I)
- Navigate to Apps > Default apps.
- Click on Default apps by file type.
- Scroll to find
.jar
from the list of file types. - Click on the currently set default application next to it.
- Click on Java(TM) Platform SE binary.
- Close Default apps setting.
Windows 11
- Press Win + I to launch Settings.
- Navigate to Apps > Default apps.
- Enter
.jar
file type in the box under Set a default for a file type of link type. - Click on the application that is currently selected to open .jar files, then click on Java under Other options.
- Close settings.
Frequently Asked Questions
What is Java Exception Error?
And exception is an unexpected event which occurs during program execution. Java has methods to catch and handle exceptions.
An application that has implemented exception handling methods will create an exception object when it runs into an exception during execution.
The object contains information such as name and description of the exception, as well as the state of the application when the exception was caught.
What is the Maximum Java Heap Size for Windows?
The maximum allowable heap size for Java in Windows is 16 EB (exabyte). For 32 bit of Windows, maximum heap size is 4 GB.
How Do I Install Java on Mac?
Please follow the steps below if you want to install Java on your MacOS:
- Download
jre-8u65-macosx-x64.pkg
from the official site. - Launch the file by double clicking on it.
- Double click the package icon to launch Install Wizard.
- Follow on-screen instructions.
Please note that you need a macbook with Intel processor to install Java. Oracle does not officially support Java on M1/M2 processors yet.