Showing posts with label java on ubuntu. Show all posts
Showing posts with label java on ubuntu. Show all posts

18 October 2011

Installing Sun Java 6 on Ubuntu 11.10 - Oneiric Oclrot

There are two Java versions available one is OpenJDK and other is from Sun called Sun Java.
OpenJDK is supported by Ubuntu team and is directly available for download through Software Center.

OpenJDK works with most of applications offline or online, but some applications like Minecraft do not work on OpenJDK (well at least in case of me, it didn't). So here's how to download and install Sun Java 6 for Ubuntu 11.10 Oneiric Ocleot.

Step 1: Add an additional repository in your software sources list by 
sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"

Yes MAVERICK partner even if u have Oneiric running. This is because Canonical still didn't upload the sun-java6-jre and sun-java6-jdk packages to the Oneiric repos. You could later remove the Maverick repository.

Step 2: Update your sources list with 
sudo apt-get update

Step 3: Now install whichever package you want, either Java6-JRE which is Java Runtime Environment meant for just running Java apps or Java6-JDK - Java Development Kit meant for programming in Java by.
sudo apt-get install sun-java6-jre  (For Java6-JRE)
                                  OR
sudo apt-get install sun-java6-jdk (For Java6-JDK)
Accept all the license agreements from Java in terminal. 
If you aren't able to click the <OK> button, press TAB and enter.

This would install Java6 packages into your Ubuntu. 
You could even download and install Java from http://java.com. 

15 June 2011

Installing Java JRE and JDK + Netbeans

Short information and steps to install Java JRE and JDK with Netbeans.

On ubuntu you don't get Java preinstalled, lets first see what is Java.

Wikipedia says:
Java is a programming language originally developed by James Gosling at Sun Microsystems (which is now a subsidiary ofOracle Corporation) and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities. Java applications are typically compiled to bytecode (class file) that can run on any Java Virtual Machine (JVM) regardless of computer architecture. Java is a general-purpose, concurrent, class-based, object-oriented language that is specifically designed to have as few implementation dependencies as possible. It is intended to let application developers "write once, run anywhere". Java is currently one of the most popular programming languages in use, and is widely used from application software to web applications.[9][10]
 

So Java softwares can be used anywhere windows, linux, mac, mobile phones and even your car. A ubuntu user would need Java JRE (Java Runtime Environment)  to run Java applications.

To install Java JRE on ubuntu 10.10

Open Applications > Ubuntu Software Center

Now there are two versions of Java available for Ubuntu, one from Sun Microsystems and other Open Java, Sun Java was dropped out and now Ubuntu supports Open Java.

Type "java6" without quotes in your Ubuntu Software Center search box and click "The Java(TM) Runtime Environment(JRE) 6 " > Install.



After installing Java JRE now you would be able to run Java applications.

Installing Java JDK + Netbeans

Java JDK (Java Development Kit) is only necessary if you want to develop Java applications with an external IDE like Netbeans or Eclipse. You can install Java JDK in two ways, one which comes with Netbeans and other in which you have to install Netbeans and Java JDK separately.

You can install Netbeans which comes with JDK directly from Sun Java website (http://www.oracle.com/technetwork/java/javase/downloads/index.html)

Alternatively you can also install Netbeans IDE and JDK separately.
First install JDK from Ubuntu Software Center, search "java6" in Ubuntu Software Center search box and install "Sun Java(TM) Development Kit (JDK) 6" then download Netbeans IDE from http://netbeans.com or again from ubuntu software center.

To install Netbeans downloaded from netbeans.com move your file to Home folder and type this in terminal

./name_of_your_file.sh

replace "name_of_your_file" with the name of file in your Home Folder.

This will install Netbeans IDE and Java JDK on your Ubuntu and you can now develop Java apps.

Remember that If you have OpenJDK installed first uninstall it and install Sun Java from Ubuntu software center, Netbeans wont detect OpenJDK.

Shobha Yatra 2024 - Gudi Padwa - Vasai Road | शोभा यात्रा २०२४ - गुढी पाडवा - वसई रोड

Vasai Road - Din Dayal Nagar Shobha Yatra 2024 on the ocassion of Gudi Padwa organized by Pandit Din Dayal Nagar Utsav Mandal and Rajadhiraj...