Showing posts with label Oracle. Show all posts
Showing posts with label Oracle. Show all posts

Thursday, May 23, 2013

Install Oracle GlassFish 3.1.2.2 on Mac OS X 10.7 or later

#Update Java from Apple Software Update, currently its version Java 6

#Set JAVA_HOME depending on current java version installed
vi ~/.bash_profile

export JAVA_HOME=`/usr/libexec/java_home -v 1.6`
 
#or
#export JAVA_HOME=`/usr/libexec/java_home -v 1.7` 

# Download Oracle GlassFish 3.1.2

# Add executable permission to run GlassFish
chmod +x ./ogs-3.1.2.2-unix.sh
 
# Run Installer 
sh ./ogs-3.1.2.2-unix.sh

Sunday, May 5, 2013

Installing Oracle Java binaries on Debian Linux

#Check Linux version
uname -a

#Download appropriate binaries from Oracle site
#http://www.oracle.com/technetwork/java/javase/downloads/index.html
#Choose Linux x64 e.g. jdk-6u45-linux-x64.bin

#Remove java
sudo apt-get purge openjdk-\*
sudo apt-get remove --purge sun-java6-jdk

#Create java dir
sudo mkdir -p /usr/local/java

#Copy java to the newly created java dir
chmod a+x jdk-XuYY-linux-x64.bin

#extract
./jdk1.6.0_45-linux-x64.bin


#include java in system environment
vi /etc/profile
JAVA_HOME=/usr/local/java/jdk1.6.0_45
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH

#
update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.6.0_45/bin/java" 1
update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.6.0_45/bin/javac" 1

#reload environment
./etc/profile

#Check version
java -version
javac -version