Search bar



Tuesday, 8 September 2015

Minecraft Doesn’t Need Java Installed Anymore; It’s Time to Uninstall Java

One of the big complaints Minecraft players have is that Minecraft runs on Java — it’s a pain to deal with because it’s insecure and needs frequent updating to avoid exploits, and they’d rather not deal with it at all. Thanks to a new launcher, Minecraft no longer requires you to install Java, so you can finally remove it.
The short version is that Minecraft is now bundling a standalone version of Java into their installation and it doesn’t have the security problems and annoyances that regular Java does. The really great thing is that Minecraft should actually run faster in our testing if you use their version instead of the version you already have installed.
Update: Microsoft has just released a new launcher for OS X users as well, so we’re updating the article.

What New Changes and Why Does It Matter?

Over the last few months Mojang has been testing a new launcher for the Windows PC Edition of Minecraft (an OS X launcher is in the works and expected by the end of the year). The primary (and newsworthy) change in the launcher is that it now downloads a stand alone version of Java that is independent of the general local installation of Java on the host machine.
Why does that matter and why should you care? Java is notorious for zero day exploits and vulnerabilities. We’ve written extensively about Java and the problems with the platform over the years; if you need a solid primer on why exactly Java is such a problem we’d strongly suggest reading over Java Is Awful and Insecure, It’s Time to Disable It, Here’s How.
As awful as Java is and as prone to zero day exploits as it may be, it’s also the magic that drives Minecraft, for better or worse. Because of this, millions of people around the world who love Minecraft also have to love-hate Java and keep it installed on their system in order to play the game. This new Minecraft development changes the game, however, so that we no longer need a full system-wide Java installation to play the game.
You still technically need Java, but it is now downloaded by the Minecraft launcher and stored with the launcher instead of installed across the entire system. If Minecraft is the only reason you have Java installed, you now have no reason to open up your system to Java vulnerabilities. The Java executable used by Minecraft stays with Minecraft and is as good as invisible and inaccessible to the rest of the system. Better yet, the Minecraft launcher automatically downloads the correct version for your system (all those players inadvertently using Java 32-bit on their 64-bit machines should see significant performance boosts thanks to this) and automatically updates it. All this and you’ll never be prompted to install the Ask Toolbar again.
Right now the new Minecraft launcher for Windows PCs is live on the Minecraft website but the majority of players are still using the old launcher. Let’s take a look at how to update to the new launcher and a peek at the kind of performance benefits you’ll likely reap. Before we proceed, huge thanks to HTG forum member adancom for bringing the new launcher to our attention.

How to Switch to the New Launcher on Windows

The switch over process is as close to painless as it gets; it won’t change where your user data is stored so your there’s no worry about fussing with changing your profile or creating a new one, or any changes with your world saves.
You will need to make a very minor tweak, however, as the installer (as of this tutorial) does not automatically default to the new Java instance and will continue to use your existing Java install.
The first stop is the official Minecraft download page. In the Windows section grab a copy of Minecraft.exe. Historically it didn’t really matter where you put the .EXE file as all it did was call up the data stored in your user data folder; the launcher acted essentially like a super charged shortcut. You probably want to be more particular where you place the new version of the launcher simply because it now creates additional sub-directories to house game files like the stand alone Java instance we’re so interested in.
On first run, and all subsequent runs where a Java update is detected, you’ll see the download indicator seen above appear briefly. The runtime in question is, you guessed it, the most up-to-date and system appropriate runtime for your machine.
After that first run, you’ll see the following sub-directories and files created in the same directory as the launcher. You can see how, if you had the habit of just keeping minecraft.exe on the desktop or the like, you might want to keep it in a distinct folder now.
Once in the launcher one small but important tweak is necessary. Select your profile with the profile selection menu found in the lower left hand corner of the launcher window. Click “Edit Profile.”
Update: the latest launcher should point to the right location already. But it’s a good idea to check anyway.
Inside the profile menu, look for “Java Settings (Advanced)” at the bottom. You’ll note that it currently points toward the system wide Java installation in the screenshot above (and you likely see a nearly identical folder path in your own profile). As mentioned above, the new launcher does not yet automatically default to the standalone instance.
You need to edit that path to point to the javaw.exe file downloaded by the launcher. This file is relatively located to the launcher executable. In our example we placed the launcher in C:\New Minecraft Launcher\ for the purpose of this tutorial. If your launcher is, for example, located in D:\Minecraft\ then your path should reflect that. Look in the \runtime\ folder and look in the sub-folders until you find the java executable in question.
After you’ve made the change (and double checked that your path is correct) click “Save Profile.” Now when you launch that profile Minecraft will use the standalone Java install stored with the launcher instead of the system-wide Java installation.
In fact, if Minecraft is your only use for Java we recommend immediately uninstalling Java from your system.

How to Switch to the New Launcher for OS X

If you’re using OS X, you can head over to this official thread on Reddit and get the download link. Once you do, it’s as simple as double-clicking on the DMG and dragging Minecraft into your Applications folder.
You’ll notice that this launcher is in beta right now, as it has the _stage after the name. You’ll have to assume that soon they will launch this for everybody, and we’ll update this article when they do.
Banners_and_Alerts_and_Minecraft
Once you do this, you can head into the profile settings and see which version of Java it’s currently pointing to. It should be the one that was bundled with the new download.

Performance Comparison

In addition to the huge security boost that comes from isolating Java there are also significant potential performance boosts. Many Minecraft players are using 32-bit Java when their hardware supports 64-bit Java. The launcher automatically grabs the correct version.
We’ll admit that we anticipated a fairly negligible performance boost our test machine as it was running a nearly current version of 64-bit Java 8 (which is a significant improvement over the 32-bit Java 7 most Minecraft players are using).In addition many players fail to keep their Java installs updated. Not only is that terrible from a security standpoint, it’s also terrible from a performance standpoint as Minecraft runs much smoother when you’re using the most current version of Java.
In this screenshot taken before we switched to the standalone Java installation you can see that we’re using 64-bit Java already and pulling down 36 frames per second. This value fluctuated slightly during the test but didn’t rise above 40 FPS.
When we switched to the slightly updated standalone Java instance downloaded by the Minecraft launcher and stood idle in the very same spot, our FPS rose to 70 (which is the vsync setting we have set for our particular monitor). Overall, a surprising shift in performance for what amounted to (on our test machine) a fairly minor change. Players using 32-bit Java 7 upgrading to 64-bit Java 8 should see significant improvements.

No comments:

Post a Comment