Saturday, June 15, 2013
Today I will show you how to install Java on Ubuntu. New Linux users may find it difficult to install, so I will be sharing this post to help you people out. There are two procedures to do that. First is do it directly from terminal and the second is do it manually if you already have the binaries. We will show you the second procedure.
Step 1 : Download Java from Oracle Java SE Downloads . Download the appropriate version according to your platform architecture. [NOTE : The download link is subject to change. If dead please report it. ]
Step 2 ; Unpack the archive using the following command
tar xvzf <file-name> [ e.g. jdk-7u21-linux-x64.tar.gz ]
You will get a folder something named jdk1.7.0.
Step 3 : Next we will have to create a directory named jvm and copy the extracted folder into it with following command.
mkdir jvm
cp -r <extracted-folder-name> jvm [ e.g. cp -r jdk1.7.0 jvm ]
Now we will have to move this jvm folder to /usr/lib directory.
sudo mv jvm /usr/lib . Enter password when asked.
Step 4 : Since we have successfully copied the folder, now we will only have to tell the Linux system where your Java is installed.
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
-It will tell that JRE is available
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
-It will tell Java Compiler is available
Step 1 : Download Java from Oracle Java SE Downloads . Download the appropriate version according to your platform architecture. [NOTE : The download link is subject to change. If dead please report it. ]
Step 2 ; Unpack the archive using the following command
tar xvzf <file-name> [ e.g. jdk-7u21-linux-x64.tar.gz ]
You will get a folder something named jdk1.7.0.
Step 3 : Next we will have to create a directory named jvm and copy the extracted folder into it with following command.
mkdir jvm
cp -r <extracted-folder-name> jvm [ e.g. cp -r jdk1.7.0 jvm ]
Now we will have to move this jvm folder to /usr/lib directory.
sudo mv jvm /usr/lib . Enter password when asked.
Step 4 : Since we have successfully copied the folder, now we will only have to tell the Linux system where your Java is installed.
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
-It will tell that JRE is available
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
-It will tell Java Compiler is available
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1
-It will tell Java Web Start is available
NOTE : There are many more executables that you may need to install like jar, javap, appletviewer and so on. Just perform the step 4 for installing any other features. We have just mentioned about java, javac and javaws. Also note that it is not mandatory to name the folder as jvm.
Hope this helps you. Keep coding :)
Labels:Java FAQs
Subscribe to:
Post Comments
(Atom)
Total Pageviews
Followers
Labels
- Algorithms (7)
- Annotation (3)
- Files (6)
- Generics (3)
- Graphics2D (5)
- Graphics2D-Images (7)
- Inheritance (2)
- J2EE (9)
- Java 8 (4)
- Java FAQs (19)
- JDBC (3)
- Networking (2)
- Packages (1)
- Reflection (4)
- Security (7)
- Sorting (2)
- Swing (3)
- Threads (3)
- Utils (3)
Popular Posts
-
Today I will show you how you can implement Bankers algorithm in Java. The Banker's algorithm is a resource allocation and deadlock a...
-
------------------------- UPDATE ------------------------- I have updated the code on request of some followers so that they can directly...
-
Today I am going to show how to convert a postfix expression to an infix expression using stack in Java. In an earlier post here we ...
-
Today in this article I will tell you how to convert an infix expression to postfix expression using stack. This is an important applicat...
-
--------------------UPDATE------------------- I have updated my post so that now it can detect IE 11. This modification was necessary as t...
-
Today I am going to show you how you can generate and validate captcha. A CAPTCHA (an acronym for "Completely Automated Public Turin...
-
Today I am going to post a program that will be able to produce all the mColorings of a given graph G. What is mColoring : The problem st...
-
Today in this article I will show you how to create or develop a Tower of Hanoi game in Java. The Tower of Hanoi is a famous problem tha...
0 comments:
Post a Comment