dp

install Java7 on Debian

this is a guide on how to install Java7 on a Debian machine.

  1. download the tar.gz archive that fits ur architecture from Oracle’s download site
  2. extract via tar -xvf jdk-7u*.tar.gz
  3. move to /usr/bin via
    mv ./jdk1.7.0* /usr/lib/jvm/jdk1.7.0uX (swap X w/ ur update number)
  4. create a symbolic link, this allows installing a different version w/o having to re-run the rest of the commands
    ln -s /usr/lib/jvm/jdk1.7.0uX /usr/lib/jvm/jdk-latest
  5. run
    sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk-latest/bin/java" 1
    sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk-latest/bin/javac" 1
    sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk-latest/bin/javaws" 1
  6. run sudo update-alternatives --config java and select Oracle’s JDK
  7. run the previous step again, but instead of java configure javac and javaws

Notes

libjawt.so

I just experienced problems with Java Swing applications, not all, but some. The error printed is

libjawt.so: cannot open shared object file

the solution was to locate the file and update the run script. In my case the following did the trick:

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/jvm/jdk-latest/jre/lib/amd64/ java -jar -Dlog4j.configuration=file:log4j.properties tweclu-sui.jar

please note that this has all to be in one line. I found this solution here


Warning: count(): Parameter must be an array or an object that implements Countable in /homepages/7/d395059870/htdocs/dp/wp-includes/class-wp-comment-query.php on line 405

Comments are closed.