Install Oracle JDK on OpenSUSE

Due to licensing issues, OpenSUSE comes with OpenJDK. I personally prefer using Oracle’s JDK. It’s worth mentioning that OpenJDK will not work in some cases such as building Android source code and it’s not recommended for Android development.

Here is how to install and setup Oracle JDK on OpenSUSE.

1. Download the JDK from Oracle’s site. I use 64-bit OpenSUSE so i downloaded the ‘Linux x64‘ version rpm. For 32 bit systems download the ‘i586′ version of the package.

2. Install the JDK by opening a terminal, becoming root and switching to the directory where you downloaded the RPM package.

For x64 version execute:

rpm -i jdk-8u5-linux-x64.rpm

For 32-bit version execute:

rpm -i jdk-8u11-linux-i586.rpm

3. Make the OracleJDK default system JDK.

While at the terminal and with root privileges execute the following sequence of commands:

update-alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_05/bin/java 1551
update-alternatives --install /usr/bin/javadoc javadoc /usr/java/jdk1.8.0_05/bin/javadoc 1551
update-alternatives --install /usr/bin/jar jar /usr/java/jdk1.8.0_05/bin/jar 1551
update-alternatives --install /usr/bin/javap javap /usr/java/jdk1.8.0_05/bin/javap 1551
update-alternatives --install /usr/bin/javac javac /usr/java/jdk1.8.0_05/bin/javac 1551
update-alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.8.0_05/bin/javaws 1551
update-alternatives --install /usr/bin/javah javah /usr/java/jdk1.8.0_05/bin/javah 1551
update-alternatives --install /usr/bin/jarsigner jarsigner /usr/java/jdk1.8.0_05/bin/jarsigner 1551

4. Define JAVA_HOME environment variable.

Type ‘exit‘ at the terminal to become your normal everyday user again. Open .bashrc in your favorite command line text editor and the following:

export JAVA_HOME=/usr/java/jdk1.8.0_05

Save the file and exit from the editor. Type:

source .bashrc

5. Verify Java version by typing ‘java -version‘ it should says “java version “1.8.0_05”“. If that’s the case you have OracleJDK correctly installed.

My mind about having a tablet recently changed

I was skeptical about having a tablet, finding no use of the device at all, but due to my recent involvement with my gift – Samsung Galaxy S3  i got fascinated with the development opportunities android based devices offer. As a software developer this side of things is more interesting.

Now on the topic. Having some ideas for apps I was looking for a debug console and device  beside my phone to test the apps on. So after quick research i decided that 100 euro tablet would do the trick. I was also looking into the even cheaper tablets but they felt laggy while in use.

The device I brought is Privileg MID-7A tablet.

image

Cheap 7″ tablet with 1GB of ram, 8GB of internal storage, 1.2 Ghz processor, resolution of 1024×600 and WiFi. Also front and back cameras. The touch screen is good. The OS is Android 4.0.3.  Perfect for debugging and testing apps.

Here are the device specs on Bulgarian.

While doing the job of a development tool I slowly started using the tablet for different things like watching a movie in bed. Browsing the net and playing games. I also blog from the device while on the road. Its usefully for the times when you don’t want to carry a laptop around or having some time to kill. The tablet in combination with my S3 is my new mobile setup. I share the net from the phone.

I am considering the idea to buy a case with a keyboard.

In conclusion. I like having a tablet around. I really like it. When I have some free time I will root the device and install Android 4.2 on it.

Nice little thing  🙂 I’m writing this post from it.