Skip to content

Commit

Permalink
Merge pull request #62 from ksclarke/set-system-java-home
Browse files Browse the repository at this point in the history
Set JAVA_HOME for system and prior to Tomcat install
  • Loading branch information
ruebot committed May 22, 2015
2 parents 1090ab3 + 7d67cde commit fb89c73
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ apt-get install -y oracle-java8-installer
update-java-alternatives -s java-8-oracle
apt-get install -y oracle-java8-set-default

# Set JAVA_HOME variable both now and for when the system restarts
export JAVA_HOME=$(readlink -f /usr/bin/java | sed "s:bin/java::")
echo "JAVA_HOME=$JAVA_HOME" >> /etc/environment

# Maven
apt-get -y install maven

Expand All @@ -46,9 +50,6 @@ apt-get -y install tomcat7 tomcat7-admin
usermod -a -G tomcat7 vagrant
sed -i '$i<user username="islandora" password="islandora" roles="manager-gui"/>' /etc/tomcat7/tomcat-users.xml

# Set JAVA_HOME -- Java8 set-default does not seem to do this.
sed -i 's|#JAVA_HOME=/usr/lib/jvm/openjdk-6-jdk|JAVA_HOME=/usr/lib/jvm/java-8-oracle|g' /etc/default/tomcat7

# Wget and curl
apt-get -y install wget curl

Expand Down

0 comments on commit fb89c73

Please sign in to comment.