Skip to main content

Posts

Install and Configure JAVA on Ubuntu

Installing the Default JRE/JDK First, update the package index. $ sudo apt-get update Next, install Java. Specifically, this command will install the Java Runtime Environment (JRE). $ sudo apt-get install default-jre There is another default Java installation called the JDK (Java Development Kit). The JDK is usually only needed if you are going to compile Java programs or if the software that will use Java specifically requires it. The JDK does contain the JRE, so there are no disadvantages if you install the JDK instead of the JRE, except for the larger file size. You can install the JDK with the following command: $ sudo apt-get install default-jdk Installing the Oracle JDK First, add Oracle's PPA, then update your package repository. $ sudo add-apt-repository ppa:webupd8team/java $ sudo apt-get update Then, depending on the version you want to install, execute one of the following commands: $ sudo apt-get install oracle-java6-installer $ sudo apt-get install ora...

Solve ECJ Installation Error

Liferay Builds with the ECJ Compiler and Ubuntu provides ecj compiler separately. 1. sudo apt-get install ecj 2. If you using ant of Ubuntu (sudo apt-get install ant) 3. You need to link ecj.jar to its directory     ( If ecj.jar already in /usr/share/ant/lib/ecj.jar then first remove this )      sudo ln -s /usr/share/java/ecj.jar /usr/share/ant/lib/ecj.jar

Set ANT_OPTS on Ubuntu

1. See the error :  Please set the environment variable ANT_OPTS to the recommended value of "-Xmx1024m -XX:MaxPermSize=512m". 2. It recommend you a value "-Xmx1024m -XX:MaxPermSize=512m" 3. Open terminal and execute     sudo nano .bashrc [open .bashrc file in edit mode] 4. Add this two lines at the end of the file     ANT_OPTS="-Xmx1024m -XX:MaxPermSize=512m"     export ANT_OPTS   5. Now save the file. 6. source .bashrc Note: Don't do that using "fish" or other terminal. Always use Ubuntu default terminal.

Install Java Development Kit 1.7 & 1.8

1. Check Before Installing update-java-alternatives -l [return all java version installed on your computer] 2. Install: sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java7-installer sudo apt-get install oracle-java8-installer 3. Check Version update-java-alternatives -l [return all java version installed on your computer] java -showversion [return java verison using currently] java -version [return java version only] 4. Alter Version sudo update-alternatives --config java