Minecraft won't run after updating Java?
My mother downloaded the newest version of java and now it wont run.
Here is the error message:
[18:15:59 ERROR]: Couldn't launch game
java.io.IOException: Cannot run program "C:\Program Files\Java\jre7\bin\javaw.exe" (in directory "C:\Users\Sarina\AppData\Roaming\.minecraft"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source) ~[?:1.7.0_55]
at com.mojang.launcher.game.process.direct.DirectGameProcessFactory.startGame(DirectGameProcessFactory.java:14) ~[launcher.jar:?]
at net.minecraft.launcher.game.MinecraftGameRunner.launchGame(MinecraftGameRunner.java:205) [launcher.jar:?]
at com.mojang.launcher.game.runner.AbstractGameRunner.onDownloadJobFinished(AbstractGameRunner.java:177) [launcher.jar:?]
at com.mojang.launcher.updater.download.DownloadJob.popAndDownload(DownloadJob.java:122) [launcher.jar:?]
at com.mojang.launcher.updater.download.DownloadJob.access$000(DownloadJob.java:12) [launcher.jar:?]
at com.mojang.launcher.updater.download.DownloadJob$1.run(DownloadJob.java:86) [launcher.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.7.0_55]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.7.0_55]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.7.0_55]
at java.lang.Thread.run(Unknown Source) [?:1.7.0_55]
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method) ~[?:1.7.0_55]
at java.lang.ProcessImpl.<init>(Unknown Source) ~[?:1.7.0_55]
at java.lang.ProcessImpl.start(Unknown Source) ~[?:1.7.0_55]
... 12 more
[18:15:59 INFO]: Deleting C:\Users\Sarina\AppData\Roaming\.minecraft\versions\1.7.4-mcpatcher\1.7.4-mcpatcher-natives-35438263712980
Best Answer
It seems as though Java is not included in your PATH variables.
What is PATH?
PATH is a list of directories (or paths) in which your OS is supposed to look for executable files (like *.exe) when running things via the command line, if it is not in the current working directory.
In this case, the minecraft launcher needs to execute javaw.exe from the minecraft directory, rather than the java installation folder, something like:
C:\Users\[user]\AppData\roaming\.minecraft> javaw.exe [more stuff that makes javaw run minecraft]
The java installation folder needs to be in PATH for this to work. Normally that is the case automatically, but something might have gone wrong somewhere.
Adding Java to PATH manually
There's an explanation as to how to do it manually on the java website for the most common operating systems:
It seems you are using Windows 7 or 8, so I will copy the corresponding segments here (You will need Administrator rights for this):
Windows 7
- Select Computer from the Start menu
- Choose System Properties from the context menu
- Click Advanced system settings > Advanced tab
- Click on Environment Variables, under System Variables, find PATH, and click on it.
- In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
- Reopen Command prompt window, and run your java code.
Windows 8
- Drag the Mouse pointer to the Right bottom corner of the screen
- Click on the Search icon and type: Control Panel
- Click on -> Control Panel -> System -> Advanced
- Click on Environment Variables, under System Variables, find PATH, and click on it.
- In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
- Close the window.
- Reopen Command prompt window, and run your java code.
Editing PATH in this case means to add C:\Program Files\Java\jre7\bin to the list of values, separated from the other entries by a ;. Here's a picture showing it in Windows 7 (click to enlarge), but 8 should be mostly identical in this case.
Pictures about "Minecraft won't run after updating Java?"



Why is my Minecraft Java Edition not working?
You need to check your computer for software updates. Check for and apply any updates your computer needs. Specifically, any graphics card or system updates. Restart your computer after updates have been completed.Why is my Minecraft not loading after update?
Fix 1: Reinstall Minecraft Often this will be enough to fix your Minecraft not loading issue. And many players find it working by reinstalling the game. So you can uninstall Minecraft from your computer, then download and install the latest version of Minecraft to see if it works.What version of Java do I need for Minecraft 1.18 server?
1(1.18: 1.18 Pre-release 1), Minecraft requires Java 16 or newer.MINECRAFT FA SCHIFO: 4 MOTIVI
More answers regarding minecraft won't run after updating Java?
Answer 2
I stumbled onto this question trying to resolve it myself. I only play minecraft every few months or so and things change rapidly these days. I found the real answer on my own and posted it here.
The Problem
The problem is that the "answers" here don't actually answer the question. First, I am a Java developer and an Android developer. I know, without a doubt, that my Java is properly configured and that there is nothing wrong with my path. The Minecraft Launcher was even able to successfully identify the Java on my system:
[13:34:34 INFO]: Minecraft Launcher 1.5.1 (through bootstrap 5) started on windows...
[13:34:34 INFO]: Current time is Aug 9, 2014 1:34:34 PM
[13:34:34 INFO]: System.getProperty('os.name') == 'Windows 7'
[13:34:34 INFO]: System.getProperty('os.version') == '6.1'
[13:34:34 INFO]: System.getProperty('os.arch') == 'amd64'
[13:34:34 INFO]: System.getProperty('java.version') == '1.8.0_05'
[13:34:34 INFO]: System.getProperty('java.vendor') == 'Oracle Corporation'
[13:34:34 INFO]: System.getProperty('sun.arch.data.model') == '64'
[13:34:34 INFO]: JFX is already initialized
[13:34:34 INFO]: Refreshing local version list...
[13:34:34 INFO]: Refreshing remote version list...
[13:34:36 INFO]: Refresh complete.
[13:34:37 INFO]: Loaded 4 profile(s); selected 'mawcs'
[13:34:37 INFO]: Refreshing auth...
[13:34:37 INFO]: Logging in with access token
And yet, I still get this error when I try to hit the "Play" button:
[13:42:04 ERROR]: Couldn't launch game
java.io.IOException: Cannot run program "D:\Program Files\Java\jre7\bin\javaw.exe" (in directory "C:\Users\<user>\AppData\Roaming\.minecraft"): CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source) ~[?:1.8.0_05]
at com.mojang.launcher.game.process.direct.DirectGameProcessFactory.startGame(DirectGameProcessFactory.java:14) ~[launcher.jar:?]
at net.minecraft.launcher.game.MinecraftGameRunner.launchGame(MinecraftGameRunner.java:208) [launcher.jar:?]
at com.mojang.launcher.game.runner.AbstractGameRunner.onDownloadJobFinished(AbstractGameRunner.java:185) [launcher.jar:?]
at com.mojang.launcher.updater.download.DownloadJob.popAndDownload(DownloadJob.java:122) [launcher.jar:?]
at com.mojang.launcher.updater.download.DownloadJob.access$000(DownloadJob.java:12) [launcher.jar:?]
at com.mojang.launcher.updater.download.DownloadJob$1.run(DownloadJob.java:86) [launcher.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_05]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_05]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_05]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_05]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_05]
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method) ~[?:1.8.0_05]
at java.lang.ProcessImpl.<init>(Unknown Source) ~[?:1.8.0_05]
at java.lang.ProcessImpl.start(Unknown Source) ~[?:1.8.0_05]
... 12 more
The story in screen shots:


The Solution
I knew something other than the launcher was looking for Java elsewhere. It turns out, my "profile" was pointing to a specific Java version because I'd overridden the memory settings in a previous play session. To fix this problem, simply edit your profile or create a new one. If you choose edit, at the bottom of the screen is a selection for the Java executable (see screen shots). The simplest solution is to create a new profile.


Answer 3
Cannot run program "C:\Program Files\Java\jre7\bin\javaw.exe"
The system cannot find the file specified
So the system cannot find C:\Program Files\Java\jre7\bin\javaw.exe.
You said a new version of java was installed. Since now we have Java 8, the path may have been changed to C:\Program Files\Java\jre8\bin\javaw.exe.
Check your C:\Program Files\Java\ folder. If there is a folder called jre8, the problem may be some outdated reference to the old jre7 folder.
Open Control Panel » System » (Windows 7 and above: Advanced System Settings) » Advanced » Environment Variables, look at the variables (especially PATH and JAVA_HOME), and edit the jre7 to jre8.
You can also try a quick-and-dirty fix: create a directory link (mklink /d jre7 jre8 in that folder with administrator privileges).
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Mary Taylor, Trần Long, Gustavo Fring, Gustavo Fring

