0

I apt-get install pdfsam in 16.04. It doesn't work with the OpenJDK 9 (preinstalled). Author's site says it works with JDK8. So i did:

 sudo apt-get install openjdk-8-jdk  

That didn't work ,so i tried:

sudo apt-get install openjdk-8-jre  

Still nothing. Nada. Any ideas what i did wrong?

muru
  • 207,228
ipse lute
  • 2,614

2 Answers2

0

I had no desire to change the system default so the fix to make pdfsam run is simply to add to your home bin directory a shell script which starts it using the the right Java flavor. Here is what I did:

$ cat ~/bin/pdfsam
#!/bin/bash
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export JAVACMD=$JAVA_HOME/jre/bin/java
export PATH=$PATH:$JAVA_HOME/bin

/usr/bin/pdfsam

and all works fine thereafter. Even my menu shortcut works fine which pleased me (clearly did not point at the /usr/bin/pdfsam script).

0

If you have multiple Java versions installed, you can set the version used by default.

Use the following command:

sudo update-alternatives --config java
dufte
  • 14,198
  • 5
  • 41
  • 43