Running FrostWire with OpenJDK-Jre-13 binaries

Some of our friends not running FrostWire on Ubuntu have had LOTS of issues getting the old OpenJDK 11 JRE to install with their package managers, won’t name on what Linux distribution.

When your package managers fail, you can either compile the source, or if you can get a binary distribution from a reputable signed source you can add it to your PATH and FrostWire will use the `java` binary that’s on the linux PATH.

Here’s an email we wrote to one of our most patient Linux users, Cheers Donald!

1. go to your home folder
$ cd
2. If you don’t have a “src” folder in your home, let’s create one in your home folder. I use a “src” folder for everything that I compile or download this way already compiled that’s outside the apt realm
$ mkdir src

3. Download the JDK 13 SDK (187MB), much better,faster than the 11. (the -4 switch is to use IPv4, I had issues downloading via IPv6), there’s already JDK 14, but I won’t test it until we do the next build since the unpack tool has been removed and the installer won’t work with JDK14 *sigh*.
~/src$ wget -4 https://download.java.net/openjdk/jdk13/ri/openjdk-13+33_linux-x64_bin.tar.gz
Saving to: ‘openjdk-13+33_linux-x64_bin.tar.gz’
openjdk-13+33_linux-x64_bin.ta 100%[====================================================>] 187.27M  3.90MB/s    in 50s     
2020-04-15 22:20:30 (3.72 MB/s) - ‘openjdk-13+33_linux-x64_bin.tar.gz’ saved [196363513/196363513]
4. Untar and unzip the .tar.gz file
~/src$ tar xvfz openjdk-13+33_linux-x64_bin.tar.gz

...

jdk-13/lib/server/classes.jsa
jdk-13/lib/server/libjsig.so
jdk-13/lib/server/libjvm.so
jdk-13/lib/src.zip
jdk-13/lib/tzdb.dat
jdk-13/release
5. Make sure java 13 runs
~/src$ ./jdk-13/bin/java --version
openjdk 13 2019-09-17
OpenJDK Runtime Environment (build 13+33)
OpenJDK 64-Bit Server VM (build 13+33, mixed mode, sharing)
6. Let’s fix your ${JAVA_HOME} env variable on your .bashrc to be now, PATH should stay the same, the beauty of JAVA_HOME variable. We don’t add the ‘/bin’ at the end because we can use JAVA_HOME/lib and other folders for other things when we’re coding.
export JAVA_HOME=${HOME}/src/jdk-13

export PATH=${JAVA_HOME}/bin:${PATH}
7. You can reload the variables of your terminal by executing the .bashrc file (or opening a new terminal window)
$ source ~/.bashrc
8. Now if you run `java –version` you should see openjdk 13. Notice how my PATH has the old Java 11, but the new one at the start is parsed first
$ echo ${PATH}
/home/gubatron/src/jdk-13/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/gubatron/src/cmake-3.16.2-Linux-x86_64:/home/gubatron/src/gradle-6.1/bin::/bin::/usr/lib/jvm/java-11-openjdk-amd64/bin:/home/gubatron/src/android-studio/bin

$ java --version

openjdk version "13" 2019-09-17
OpenJDK Runtime Environment (build 13+33)
OpenJDK 64-Bit Server VM (build 13+33, mixed mode, sharing)
9. Install the latest frostwire 6.8.4 (if you don’t have it get it from here) with
$ sudo dpkg -i frostwire-6.8.4.amd64.deb

Selecting previously unselected package frostwire.
(Reading database ... 381934 files and directories currently installed.)
Preparing to unpack frostwire-6.8.4.amd64.deb ...
Unpacking frostwire (6.8.4) ...
Setting up frostwire (6.8.4) ...
Unpacking libraries...
Unpacking frostwire.pack
Warning: The unpack200 tool is deprecated, and is planned for removal in a future JDK release.
Unpacking gettext-ant-tasks-0.9.7.pack
Warning: The unpack200 tool is deprecated, and is planned for removal in a future JDK release.
Unpacking jlibtorrent-1.2.3.0.pack
Warning: The unpack200 tool is deprecated, and is planned for removal in a future JDK release.
Done unpacking
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
10. Run FrostWire
$ frostwire
HOSTNAME IS gubatron-VirtualBox
Starting FrostWire...
Java exec found in PATH. Verifying...
Suitable java version found [java = 13]
Configuring environment...
Loading FrostWire:
os.name="Linux"
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.frostwire.gui.theme.ThemeMediator (file:/usr/lib/frostwire/frostwire.jar) to method java.awt.Toolkit.setDesktopProperty(java.lang.String,java.lang.Object)
WARNING: Please consider reporting this to the maintainers of com.frostwire.gui.theme.ThemeMediator
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
FrostWire version 6.8.4 build 292
OpenJDK 64-Bit Server VM Oracle Corporation 13 Oracle Corporation
Peer Fingerprint: -FW6842-
User Agent: FrostWire/6.8.4 libtorrent/1.2.3.0
Apr 16, 2020 1:38:49 PM BTEngine 
INFO: Listen succeeded on endpoint: 0.0.0.0:51302 type:TCP
...
Screen Shot 2020-04-16 at 1.39.00 PM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s