Brew your first java application on Linux
Posted 08-07-2010 at 04:21 AM by aher.praju@yahoo.com
Java uses the slogan “Create once and run everywhere” , means absolutely platform independent..!!
It consists of a programming language, utility programs and a run time environment.A Java program can be developed on one computer and run on any other computer with the correct run time. There are two types of java programs those are java applets and servlets.
Linux having its own popularity, java on Linux server provides the makes superior combination. Java server programming is the one of the best programming on Linux servers.
Article involves,how to steps to install the java on Linux and execute the java application on Linux:-
Part I:
Install J2SE, JDK On Linux:-
Rather than Rpm packages,BIN gives you more control over how and where you want to have your Java-environment installed.
Get download the latest version of jdk ,Bin ,like java_ee_sdk-5_01-linux.bin from java.sun.com/download.html.
Now lets start with the installation of java on linux platform by changing the file permissions as 755(to get start with installation make sure you are appear as root user).
Change the file permissions:-
[root@localhost:~]# chmod 755 java_ee_sdk-5_01-linux.bin
Changing the file permissions of java_ee_sdk-5_01-linux.bin as 755
Change the path of directory:-
[root@localhost:~#]cd /usr/local/java
it's nice to always have JDK installed in /usr/local/jdk, But still you want to install it any other then you can install it just by changing the directory.
Run the self exracting binary:-
[root@localhost: java/#]./ java_ee_sdk-5_01-linux.bin
The license agreement is displayed. Review the agreement. Press the space bar to display the next page. At the end, enter yes to proceed with the installation.
Now Jdk been install on /usr/local/java.
Part II
Execution of java application on Linux platform:-
Lets test.java be our java application and be sure, /usr/local/java be your current working directory.
[root@localhost:/java]$javac test.java
This interpreter takes your byte code file and carries out the instructions by translating them into instructions that your computer can understand.
Now the compilation of your application be done and class file of name test.class be created(test.class is in the byte code format)
[root@localhost:/java]$java test
And here is the execution of your application, now you can see the output of your application...
**And now you ride on the two strong technologies..JAVA+LINUX
It consists of a programming language, utility programs and a run time environment.A Java program can be developed on one computer and run on any other computer with the correct run time. There are two types of java programs those are java applets and servlets.
Linux having its own popularity, java on Linux server provides the makes superior combination. Java server programming is the one of the best programming on Linux servers.
Article involves,how to steps to install the java on Linux and execute the java application on Linux:-
Part I:
Install J2SE, JDK On Linux:-
Rather than Rpm packages,BIN gives you more control over how and where you want to have your Java-environment installed.
Get download the latest version of jdk ,Bin ,like java_ee_sdk-5_01-linux.bin from java.sun.com/download.html.
Now lets start with the installation of java on linux platform by changing the file permissions as 755(to get start with installation make sure you are appear as root user).
Change the file permissions:-
[root@localhost:~]# chmod 755 java_ee_sdk-5_01-linux.bin
Changing the file permissions of java_ee_sdk-5_01-linux.bin as 755
Change the path of directory:-
[root@localhost:~#]cd /usr/local/java
it's nice to always have JDK installed in /usr/local/jdk, But still you want to install it any other then you can install it just by changing the directory.
Run the self exracting binary:-
[root@localhost: java/#]./ java_ee_sdk-5_01-linux.bin
The license agreement is displayed. Review the agreement. Press the space bar to display the next page. At the end, enter yes to proceed with the installation.
Now Jdk been install on /usr/local/java.
Part II
Execution of java application on Linux platform:-
Lets test.java be our java application and be sure, /usr/local/java be your current working directory.
[root@localhost:/java]$javac test.java
This interpreter takes your byte code file and carries out the instructions by translating them into instructions that your computer can understand.
Now the compilation of your application be done and class file of name test.class be created(test.class is in the byte code format)
[root@localhost:/java]$java test
And here is the execution of your application, now you can see the output of your application...
**And now you ride on the two strong technologies..JAVA+LINUX
Total Comments 0