Installing Eclipse in Windows10

READ THIS WHOLE PAGE BEFORE YOU START. You need to know why backups are necessary so you won't be tempted to skip over that step. I did, and now I have a computer that Eclipse won't run on AT ALL. Don't do that.

Windows has put a lot of effort into making Win10 harder to use than OSX. That's not an easy task, but they somehow succeeded (or at least got within roundoff error). These are some of the things you need to know to use Eclipse+Java in Win10. If you have OSX, my condolences, I couldn't make Eclipse install. I think it's a unix thing, they see me coming and go on strike.

I originally wrote this document in late 2016, it's probably different now. An important component of the modern notion of "creative" is to jerk people around, I think it's some kind of macho thing. As Somebody once said, "They have their reward." True creativity is to make things seamlessly easy to use, but you don't get noticed so often, at least not in your lifetime. But the tools we are constrained to use are not being made by the smartest, most creative people, so we must use up our own intelligence and creativity getting over the hurdles. That's why this document is necessary.

Eclipse is written in Java, so first you must have Java on your computer. Google "download Java" and the first hit (today) is Oracle's download site. Apparently I did that successfully, because I have no frustration notes from back then.

32-bit data is faster than 64, but the (foolish) American mantra is "Bigger is better," so lots of things require 64 bits. They are not compatible in Windoze, you must choose one or the other, then be very careful to make the same choice every time. If they don't offer you the choice, ask, because it matters. I always try to download the installer, rather than running it from the internet, because Bad Things Happen, and if you have the installer in a separate file, you don't need to wait on a slow or flakey internet connection again and again. Besides, everything online is subject to change on Somebody Else's whim, it's so unstable (I think that's what happened to Eclipse on OSX, they insist on an older version of Java, which Apple no longer supports). My policy is, "If it ain't broke, don't fix it." But if you get paid for your time rather than for your smarts, you might like waiting on other people while the clock is ticking. <end rant> Anyway -- backup your system first -- then download the installer(s) you want and run it/them.

I Googled "download eclipse" and chose the top hit, which was the Eclipse website, and clicked the Download button. It offered to "Install" or "Download". Choose the Download option. This is important, because Eclipse is badly designed and/or has more bugs than a downtown walkup flat, so you need to be able to recover. Eclipse is designed by and for unixies and it won't let you do that by normal means like the program uninstall feature of Windows, but you can delete the whole thing and re-install the hard way, by creating a system image backup. [In 2018 I see they fixed that bug: deleting the Workspace folder gets you back to the beginning, but make a backup anyway.] Backups are good to have anyway, because Bad Things Happen.

Create Backup

Go to the Control Panels (right-click Start menu) or Settings (same thing, by other means) and choose "Backup and Restore (Windows 7)". You need a removable drive (USB is less than $100 at WalMart), which you will select when you click "Create a system image". It will create a new folder "WindowsImageBackup" there. When I want to make another backup, I rename this one, so it always creates a new folder. By selectively renaming the folders with descriptive (dated) names I can control which backup I want to restore from. I also copied the downloaded Eclipse installer file to the backup drive, because it will go away if you restore to an earlier version. The backup process takes a while (about an hour in my case) so you need to find something else to do, like go eat lunch.

Install Eclipse

I copied the installer file from the backup to the main hard drive, then removed the backups disk (so it wouldn't get altered accidentally), then 2-clicked the installer. When I did it (these things are so unstable, they are always changing), the top panel installed Java, then I clicked the Launch button, but closed the window that asked about a workspace to abort the startup. Then I made another backup, which is ready to start in the Eclipse welcome page (there was no other way to get back to it in Win10, as far as I could tell when I wrote that, but in 2018 I see that deleting the Workspace folder does it).

New Java Project

After you have installed Eclipse (or restored it from a backup), you can start to work in Java. It turns out you don't need that welcome screen (unless you want to work through their tutorials) but it's comforting to know you are back at the beginning. You need to close it to get on with life. First you need a project: from the File Menu -> New -> Java Project. It opens up a dialog to name your project, then Finish. Then you need a new package, which is from the same File -> New menu, or else click the little package icon on the toolbar. Java expects package names to begin lower case. Within that, you need a new class (same menu, or the "C" in a green circle). Now you are ready to start writing code.

Restore From Backup

If you have any files you want to preserve, copy them to the external hard drive. If there are a lot of files (such as Java source files), you might want to put them all in a single folder there. This is important, because they will all be gone from your computer after you restore. Also, if you renamed the "WindowsImageBackup" folder, you need to put the original name back.

They make restoring from the system image hard to find. The control panel you used to make it fails. Instead, right-click the Start menu and choose Restart while holding the shift key down. This brings up a panel where you choose "Troubleshoot" and then "Advanced Options" and finally "System Image Recovery". It takes almost as long to restore as it did to make the backup.

After the system is fully restored, it puts up the logon page (don't forget to change the backup folder name back to whatever reminds you of what it is), and you can also now restore your saved files -- I usually leave them in their own folder somewhere (typically in a folder I use for my working data), and copy them into the Eclipse workspace as needed -- then remove the external backups drive. Double-click the Eclipse icon and you are ready to go from the beginning.

Rev. 2018 May 11