Showing posts with label JDK. Show all posts
Showing posts with label JDK. Show all posts

Saturday, October 24, 2015

Install Oracle java8 on Ubuntu 15.10 via PPA


To install Oracle java8 on Ubuntu 15.10 via PPA, enter the command:
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer



Download and Install JDK8 on Ubuntu 15.10 using update-alternatives, and also set JAVA_HOME


This post show how to Install JDK8 on Ubuntu 15.10 (running in VirtualBox hosted on Windows 10).

To download Oracle JDK:
- visit Java SE Downloads page.
- Click to download Java Platform (JDK).
- Accept agreement and sselect download file, jdk-8u65-linux-x64.tar.gz.

Download and unpack in your local storage. /home/eric/jdk1.8.0_65 folder for me.

Setup java and javac update-alternatives:
Run the command:
$ sudo update-alternatives --install /usr/bin/javac javac /home/eric/jdk1.8.0_65/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /home/eric/jdk1.8.0_65/bin/java 1

$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java

Where /home/eric/jdk1.8.0_65 is the folder of jdk.

Check the video.


Set JAVA_HOME also:

Setup JAVA_HOME and path to JDK on Linux (Ubuntu in this example), edit the file .bashrc
$ nano .bashrc

Add the line:
export JAVA_HOME=<path to jdk>
export PATH=$JAVA_HOME/bin:$PATH

Where <path to jdk> is the path to the installed JDK.




Alternatively, you can install also Install Oracle java8 on Ubuntu 15.10 via PPA.

Monday, August 31, 2015

Install Android Studio on Windows 10

Android Studio IDE is the official Android development IDE.


Before install, check if your system meet the System Requirements.

In my system:
OS: Windows 10
Java: JDK 8 (Refer the Java-Buddy post "Install JDK 8 on Windows 10, and set Path")

To download Android Studio IDE, visit http://developer.android.com/sdk/index.html.

By default, the Setup Wizard will create a default AVD (Android Virtual Device) for you, Nexus 5 API 23 x86. (If you encounter error of "HAXM is not working and emulator runs in emulation mode" when run Android Emulator with HAXM, refer to the next post "Install Intel x86 Emulator Accelerator (HAXM), on Android Studio/Windows 10")



After installed, I always run SDK Manager to check if any update and install the suggested packages.


Next:
Install Intel x86 Emulator Accelerator (HAXM)



Create Marshmallow Emulator in Android Studio AVD Manager




Related:
- Download and run Android Studio 2.0 Preview on Windows 10

Friday, January 23, 2015

Setup JAVA_HOME and path to JDK on Linux


Setup JAVA_HOME and path to JDK on Linux (Ubuntu in this example), edit the file .bashrc
$ nano .bashrc

Add the line:
export JAVA_HOME=<path to jdk>
export PATH=$JAVA_HOME/bin:$PATH

Where <path to jdk> is the path to the installed JDK.


Save it and exit.

To reload .bashrc without log-out and log-in, enter the command:
$ source ~/.bashrc


Monday, July 21, 2014

Install Oracle JDK 8 on Ubuntu 14.04

This post describe how to download and install Oracle JDK 8 on Ubuntu 14.04, and also update alternatives to correct the links.

Download Oracle JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html.

Accept License Agreement and download the corresponding .tar.gz file, jdk-8u11-linux-i586.tar.gz in my case.

Unpack the downloaded tarball (.tar.gz) and move unpacked folder to where you want, /home/u/jdk1.8.0_11/ in my case.

Run the following commands in terminal to update the alternatives of javac and java. Where /home/u/jdk1.8.0_11/ is the installed folder of jdk.

$ sudo update-alternatives --install /usr/bin/javac javac /home/u/jdk1.8.0_11/bin/javac 1
$ sudo update-alternatives --install /usr/bin/java java /home/u/jdk1.8.0_11/bin/java 1

$ sudo update-alternatives --config javac
$ sudo update-alternatives --config java

After installed and setup

Step-by-step: