[tor-bugs] #12881 [Onionoo]: Set Java version to 7

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Sep 5 07:18:55 UTC 2014


#12881: Set Java version to 7
-----------------------------+-----------------
     Reporter:  iwakeh       |      Owner:
         Type:  enhancement  |     Status:  new
     Priority:  normal       |  Milestone:
    Component:  Onionoo      |    Version:
   Resolution:               |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+-----------------

Comment (by karsten):

 Oh well, no luck.  Here's what I did:

 {{{
 diff --git a/vagrant/bootstrap.sh b/vagrant/bootstrap.sh
 index d4b1724..cc7ab57 100644
 --- a/vagrant/bootstrap.sh
 +++ b/vagrant/bootstrap.sh
 @@ -6,10 +6,19 @@ echo "Updating package list and upgrading existing
 packages."
  apt-get update
  apt-get -y upgrade

 +echo "Removing Java 6 packages."
 +apt-get purge -y openjdk-6-jdk default-jre
 +
  echo "Installing required packages."
  apt-get install -y libcommons-codec-java libcommons-compress-java \
  libcommons-lang-java libgoogle-gson-java junit4 libservlet3.0-java \
 -openjdk-6-jdk ant tomcat6 libslf4j-java liblogback-java
 +openjdk-7-jdk ant tomcat6 libslf4j-java liblogback-java
 +
 +echo "Switching to Java 7."
 +#update-java-alternatives -s java-1.7.0-openjdk-amd64
 +
 +echo "Restarting Tomcat, so that it runs with Java 7."
 +#service tomcat6 restart

  echo "Setting up paths and creating symbolic links."
  mkdir -p /srv/onionoo.torproject.org/onionoo/
 }}}

 Still, I get:

 {{{
 vagrant at vagrant:~$ java -version
 java version "1.6.0_32"
 OpenJDK Runtime Environment (IcedTea6 1.13.4) (6b32-1.13.4-1~deb7u1)
 OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
 vagrant at vagrant:~$ javac -version
 javac 1.7.0_65

 vagrant at vagrant:~$ dpkg -l | egrep "jdk|jre"
 ii  default-jre-headless                1:1.6-47
 amd64        Standard Java or Java compatible Runtime (headless)
 ii  icedtea-6-jre-cacao:amd64           6b32-1.13.4-1~deb7u1
 amd64        Alternative JVM for OpenJDK, using Cacao
 ii  icedtea-6-jre-jamvm:amd64           6b32-1.13.4-1~deb7u1
 amd64        Alternative JVM for OpenJDK, using JamVM
 ii  openjdk-6-jre-headless:amd64        6b32-1.13.4-1~deb7u1
 amd64        OpenJDK Java runtime, using Hotspot JIT (headless)
 ii  openjdk-6-jre-lib                   6b32-1.13.4-1~deb7u1          all
 OpenJDK Java runtime (architecture independent libraries)
 ii  openjdk-7-jdk:amd64                 7u65-2.5.1-5~deb7u1
 amd64        OpenJDK Development Kit (JDK)
 ii  openjdk-7-jre:amd64                 7u65-2.5.1-5~deb7u1
 amd64        OpenJDK Java runtime, using Hotspot JIT
 ii  openjdk-7-jre-headless:amd64        7u65-2.5.1-5~deb7u1
 amd64        OpenJDK Java runtime, using Hotspot JIT (headless)

 vagrant at vagrant:/srv/onionoo.torproject.org/onionoo$ ant war
 Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6
 -openjdk-amd64/lib/tools.jar
 [...]
 }}}

 But let's try something else: what virtual box are you using?  Ideally, we
 should use the same development environment, so that we don't have to
 fight problems like this.  And ideally, the development environment is as
 close to the production environment as possible, which means Debian
 stable.  So, if you're using a different Debian stable image, I'd like to
 try that.  And if you're using a different system, please consider
 switching to Debian stable.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/12881#comment:8>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list