Category: Java

Execute java program in ubuntu from terminal

  Please make sure that you have java path set in  /etc/environment file. Then you go to the directory where you created the .java file(your java program). Then compile the .java file using following command- javac -cp . helloworld.java This

Posted in Java, Linux, Ubuntu Tagged with: , , , , , , , , , , ,

Install java manually in UBUNTU Linux

Install the new java in any folder you like. Set the environment variables in /etc/environment file. My /etc/environment file looks like this- PATH=”/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/java/jdk1.6.0_11/bin:/usr/jboss/jboss-5.0.1.GA/bin” CLASSPATH=”/usr/java/jdk1.6.0_11/lib:/usr/jboss/jboss-5.0.1.GA/lib” JAVA_HOME=”/usr/java/jdk1.6.0_11″ JBOSS_HOME=”/usr/jboss/jboss-5.0.1.GA” Save this file and restart the computer. It should have new java installed and

Posted in Java, Linux, Ubuntu Tagged with: , , , , , , , , , , , , , ,
%d bloggers like this: