I passed my 1Z0-803 Java SE 7 Programmer I exam the other day – and it was without doubt the hardest exam I’ve ever taken by a country mile.
The entire thing’s made of trick-questions, corner-cases and large ‘human-compiler’ questions which have you substituting multiple pieces of borderline-legal nonsensical code into large swathes of horribly structured and badly laid out code to mentally determine which ones result in a given set of output. Horrific.
Also, on top of having to race your way through 70 questions in two hours, there are an undisclosed number of “non-assessed questions” which don’t count towards your score – the only possible reason for these I can think of is to burn the clock and artificially inflate the fail rate, thus scoring Oracle ~$300 a pop on resits for people who need an Oracle cert for their work. What a complete and utter rort.
Nailed it – but the only way I’d ever do another Oracle certification would be if there was something big like a specific job riding on it. And even then I’d think twice about whether it’d be worth the grief.
Final rating: 0 out of 5 Rubber Chickens. Avoid like leprosy.
Installing the official Sun/Oracle Java implementations used to be as easy as installing sun-java6-* and uninstalling all the OpenJDK and IcedTea (Java plugins based on OpenJDK) packages you could find – but you can’t get the offical “Sun” packages anymore, instead you have to go get the binaries from Oracle (who bought Sun Microsystems). You can take a swiz at the possible Java implementations here if you like.
Anyways, to get and install the official JRE or JDK (I’ll assume that most people aren’t going to be developing in Java so only want the Runtime Environment and not the full Development Kit):
- Head on over to: http://www.oracle.com/technetwork/java/javase/downloads/index.html and download tar.gz version of the latest JRE, which at the time of writing is 1.7 update 7 (i.e. 1.7.0_07, the Linux 64-bit version of which is called jre-7u7-linux-x64.tar.gz),
- Extract the downloaded archive through any way you see fit. I’ll assume you downloaded it to your Downloads folder and extracted it there for the following commands,
- Create a new folder for it wherever your distro likes to put Java installs, for example:
sudo mkdir /usr/lib/jvm/jre1.7.0_07
- Move your extracted JRE to that location using:
sudo mv ~/Downloads/jre7_u7/* /usr/lib/jvm/jre1.7.0_07/
- Update your alternatives to prefer the new version of java by running (one line at a time):
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jre1.7.0_07/bin/java" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jre1.7.0_07/bin/javaws" 1
If you’re installing the JDK you’ll prolly want to set the javac (Java Compiler) binary to the new version too using:
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jre1.7.0_07/bin/javac" 1
The number at the end of the line is the priority of this binary out of any other java/javac/javaws binaries alternatives knows about, and goes from 1 (most important – try to use first) to 100 (least important – use only as a last resort)
- To make sure that the update-alternatives commands take, you can also run (again, one line at a time):
sudo update-alternatives --config java
sudo update-alternatives --config javaws
sudo update-alternatives --config javac <-- only if you installed the JDK
- Finally, to check it all really took, issue:
and you should see some output showing that the newest version of Java is in effect, like this:
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
Done & dusted.