Powered By

Powered by Blogger

Tampilkan postingan dengan label jdk. Tampilkan semua postingan
Tampilkan postingan dengan label jdk. Tampilkan semua postingan

Sabtu, 30 Oktober 2010

Java (JDK) Updater - Script To Update The Java (JDK) Paths After Manual Installation

Ubuntu is kind of slow at updating JDK in the official repositories. And not only that but if you've used Ubuntu 10.10 Maverick Meerkat before the final release, you probably know that Java has only been uploaded to the Ubuntu Partner repository a few days before the final release so you could either use the Ubuntu 10.04 repository or manually install Java.

When you manually install JDK, you have to update the paths to get it to work. For this, you can use a script created by WebUpd8 reader Bruce Ingalls (this is actually a new version as we've already wrote a while back about this script) which uses Zenity and can easily update the Java (JDK) paths - all you have to do is select the folder where you've installed Java and the script will do the rest.


The script only works for Ubuntu (10.04 and 10.10) and I've packages the script in a .deb file which is available in the WebUpd8 PPA so you can install it using the following commands (for Ubuntu 10.04 and 10.10):
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install update-java

Or you can manually download the .deb (works with both Lucid and Maverick)

Once installed, you can launch it via the Applications > Other > Update Java menu item.

If you want to use the script without adding the PPA, you can download it from HERE.

In case something doesn't work, you can create a bug report using the following command:
bash -x /usr/bin/update-java > ~/bugreport.txt 2>&1


How to use install the latest Java (JDK) manually (this is just an example for the latest Java JDK):


Firstly, you'll have to download Java (JDK) from HERE. Then you'll have to move the .bin file to /usr/local/ and run it:

sudo mv jdk-6u22-linux-i586.bin /usr/lib/jvm/
sudo chmod +x jdk-6u22-linux-i586.bin
sudo ./jdk-6u22-linux-i586.bin

Then simply run the Update Java script - either from the menu (if you've installed the .deb) or manually run the script and select the folder where Java JDK has been installed and select the folder where you've installed JDK manually (in my example it should be /usr/local/jdk1.6.0_22).


Thanks to Bruce Ingalls for the script!

Minggu, 11 April 2010

JDK Linux Update Script

WebUpd8 reader Bruce Ingalls sent us script which should make it easy for users to upgrade JDK. The script doesn't download JAVA or install it, but after you do that it updates the the path to the new JDK location.

Why use it?

Well, for instance JDK 1.6.0_19 was recently released and instead of creating symbolic links after installing it (which is not the recommended way to do it), you can use this script.


How to use JDK Linux Update Script



After downloading JDK from HERE, extract it and place the extracted folder to /usr/local/

Then simply run the script. It will detect your installed version and update to the new one.

To download and run the script, simply paste this in a terminal:
sudo apt-get install zenity
wget http://webupd8.googlecode.com/files/jdk-update.sh
chmod +x jdk-update.sh
sudo ./jdk-update.sh