Hot questions for Using Ubuntu in jar

Question:

I am using Ubuntu 15.04 and Java 1.7. After updating to 15.04, whenever I type any Java command, I get a message like:

Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar

For example:

hduser@ubuntu:~$ java -version
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

How can I suppress this behavior?


Answer:

I also upgraded to Ubuntu 15.04 and had the same problem (though, I didn't feel it as a problem).

$ echo $JAVA_TOOL_OPTIONS
-javaagent:/usr/share/java/jayatanaag.jar
$ apt-cache search jayatana
jayatana - Java Native Library for ayatana project

From this output I can conclude, that something ayatana is trying to attach its agent to all started Java code.

Ubuntu Wiki says, that

Ayatana is a collective effort to improve the user experience of software in and for Ubuntu.

So, it looks like this application is attaching agent to ensure application to be stable or something like this.

The easy way of eliminating this variable is just unsetting it in ~/.profile:

$ echo unset JAVA_TOOL_OPTIONS >>~/.profile

But this looks more like workaround and if you're sure you don't need this application, you can fully remove it:

$ sudo apt-get remove jayatana

Question:

I get this error when signing an Ionic android apk, I'm on Kubuntu 17.04, using Ionic 3, java 8 installed

The error I get:

Enter Passphrase for keystore: 
updating: META-INF/MANIFEST.MF
adding: META-INF/TEST2.SF
adding: META-INF/TEST2.RSA
signing: AndroidManifest.xml
jarsigner error: java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0

java version

$ java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.17.04.3-b11)
OpenJDK 64-Bit Server VM (build 25.131-b11, mixed mode)

javac

$ javac -version
javac 1.8.0_131

I have Android Studio installed and it's working fine, I tested the app source code and it ran on the emulator no problems.


Answer:

This issue could be solved on Debian 9 by setting the correct update-alternative for jarsigner that matches the version of java and javac.

Version of java

$ java -version
openjdk version "1.8.0_141"
OpenJDK Runtime Environment (build 1.8.0_141-8u141-b15-1~deb9u1-b15)
OpenJDK 64-Bit Server VM (build 25.141-b15, mixed mode)

Version of javac

$ javac -version
javac 1.8.0_141

Version of jarsigner

$ sudo update-alternatives --get-selections | grep jarsigner
jarsigner   manual   /usr/lib/jvm/java-8-openjdk-amd64/bin/jarsigner

To set the version of jarsigner

$ sudo update-alternatives --config jarsigner
There are 4 choices for the alternative jarsigner (providing /usr/bin/jarsigner).

  Selection    Path                                             Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-9-openjdk-amd64/bin/jarsigner   1091      auto mode
  1            /usr/bin/gjarsigner-4.9                           1049      manual mode
  2            /usr/bin/gjarsigner-6                             1060      manual mode
* 3            /usr/lib/jvm/java-8-openjdk-amd64/bin/jarsigner   1081      manual mode
  4            /usr/lib/jvm/java-9-openjdk-amd64/bin/jarsigner   1091      manual mode

Question:

I have created a package based on http://packaging.ubuntu.com/html/packaging-new-software.html sample. In this sample, sources are c++ files. I want to create my new package from executable jar files source. I found maven, ANT and dhBuild tools but I don't want to use this tools. So I need a way to create my package with command line. please give me some hints or samples to know most about that.


Answer:

The goal is to create a package that simply puts a shell script where I want it.

  1. Create a directory to build your packages in. Some use "deb" and others use "packages". Others create a directory structure for making multiple packages under "deb" (or whatever).

    mkdir deb

  2. Create the directory structure in deb that represents where you want the script to be placed1

mkdir -p ./deb/usr/local/bin

3.Copy the script into your new directory

cp /path/to/my/script/myscript.sh ./deb/usr/local/bin/

4.Make a subdirectory called "DEBIAN", this will host the package control file.

mkdir -p ./deb/DEBIAN
Create a control file.
touch ./deb/DEBIAN/control

5.Open the control file and enter the text below.

Package: myPackagename (no spaces or underscores allowed) 
Priority: optional
Section: misc
Maintainer: Maintainer Name <user@mail.com> 
Architecture: all Version: 1.0       
Depends: package1, package2, .........
Description: short description here 
 long description here (don't remove space at the beginning of 
 line(replace this with an empty line)

Change ownership:

sudo chown -R root:root ./deb

6.Create the debian package.

dpkg -b ./deb /my/output/destination/packagename.deb

Question:

I have my middle layer jar file running on the linux server. I want that jar file running in background non-stop.

nohup java -jar RushMiddleLayer.jar &

But when i re-run this command, another new instance of the jar created and running.

I have searched through google. They suggested some options. "Bind a ServerSocket". But which is not working for me. Process killed after press enter or Ctrl+C.

I want to have two benefits from the jar. One is always running with fail. Another if restart the jar using the same command (nohup java -jar RushMiddleLayer.jar &). It should replace the existing jar, not create the new instance.


Answer:

Just to make sure I understand what you want, you want a jar file that runs in the background and it is only able to be launched once and once only?

If this is what you want, there is two ways to achieve this:

  1. Use a port as a semaphore (as you suggested)
  2. Use a file as a semaphore.

For option 1,

The code should be as simple as something like:

try {
    serverSocket = new ServerSocket(port);
} catch (IOException e) {
    System.out.println("Could not listen on port: " + port);
    // ...
}

An IOException will be thrown, if you cannot open server socket on this port. However, this could also occur if some other application is using this port. So be careful what port number you choose.

For option 2, You simply use a FileWriter and create a dummy file and keep this file open until the jar/program is finished (or closed). When a second instance of the jar attempts to open, an exception will be thrown and it won't be able to start due to the fact that it will try to open the file for writing which produces an IOException because only one process can have a write handle to a file at the same time.

Question:

I have created a jar file using

mvn assembly:assembly -DdescriptorId=jar-with-dependencies

and I run it on windows and it works fine and works as expected. Then I run it on Ubuntu and it gives the following exception:

Exception in thread "main" java.lang.NoClassDefFoundError: java/util/function/Predicate
at Maxima_ImageJ.run(Maxima_ImageJ.java:13)
at Maxima_ImageJ.main(Maxima_ImageJ.java:27)
Caused by: java.lang.ClassNotFoundException: java.util.function.Predicate
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 2 more

I have no idea why it works differently in Windows and Ubuntu. If someone do, please help. Is it related to the versions of java?


Answer:

Set class path to Java 1.8 as java.util.function.Predicate is part of JavaSE8 and will not be available in 1.7 some of the set commands to use before executing maven command.

set path=C:\Program Files\Java\jdk1.8.0_05\bin//UPTO Bin
set JRE_HOME=C:\Program Files\Java\jre8//Upto Root folder of JRE
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_05//UPTO Root folder of JDK

Question:

(Update below based on comments and answers)


I've developed some Java on Windows, and I've executed it successfully on that machine. For the first time, I'm attempting to execute it on Ubuntu. I installed OpenJDK-7-jre, and have copied the jars and source code over.

The jars:

(djauth_venv)~/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build$ ls -la dependency_jars/
-rw-rw-r-- 1 jeffy jeffy 185140 Jun 12  2012 commons-io-2.4.jar
-rw-rw-r-- 1 jeffy jeffy  18863 Dec 11 12:53 templatefeather-0.1.1.2.jar
-rw-rw-r-- 1 jeffy jeffy 665303 Dec 11 12:52 xbnjava-0.1.5.jar

When attempting to execute it with

java BuildPartFour -classpath /usr/lib/jvm/java-7-openjdk-i386/jre/lib/rt.jar;/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/commons-io-2.4.jar;/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/templatefeather-0.1.1.2.jar;/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/xbnjava-0.1.5.jar

It results in permission denied for each of the jars:

Exception in thread "main" java.lang.NoClassDefFoundError: com/github/xbn/io/PlainTextFileUtil
        at BuildPartFour.main(BuildPartFour.java:14)
Caused by: java.lang.ClassNotFoundException: com.github.xbn.io.PlainTextFileUtil
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        ... 1 more
-bash: /home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/commons-io-2.4.jar: Permission denied
-bash: /home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/templatefeather-0.1.1.2.jar: Permission denied
-bash: /home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/xbnjava-0.1.5.jar: Permission denied

I've changed the jars to be executable

(djauth_venv)jeffy@originaldjangster:~/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build$ chmod 774 dependency_jars/*.jar
(djauth_venv)jeffy@originaldjangster:~/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build$ ls -la dependency_jars/               total 864
-rwxrwxr-- 1 jeffy jeffy 185140 Jun 12  2012 commons-io-2.4.jar
-rwxrwxr-- 1 jeffy jeffy  18863 Dec 11 12:53 templatefeather-0.1.1.2.jar
-rwxrwxr-- 1 jeffy jeffy 665303 Dec 11 12:52 xbnjava-0.1.5.jar

But now, when attempting to execute it again, I get this crazy output:

Exception in thread "main" java.lang.NoClassDefFoundError: com/github/xbn/io/PlainTextFileUtil
        at BuildPartFour.main(BuildPartFour.java:14)
Caused by: java.lang.ClassNotFoundException: com.github.xbn.io.PlainTextFileUtil
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        ... 1 more
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/commons-io-2.4.jar: line 1: $'PK\003\004': command not found
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/commons-io-2.4.jar: line 2: $'v\222\314@': command not found
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/commons-io-2.4.jar: line 21: syntax error near unexpected token `)'
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/commons-io-2.4.jar: line 21: `▒Ғ▒^w▒ ▒▒W▒!▒▒
N▒
  g▒▒1^▒yKn▒K(▒"▒N▒▒▒
▒F/L*▒vTb6▒▒▒▒l4]▒▒▒hL▒F▒▒▒▒`▒l▒8m▒C▒▒▒▒▒▒▒u▒▒▒A▒*▒O▒▒▒▒6Jys▒▒C%▒▒݅Z▒ب▒&▒@▒▒▒9▒▒▒^▒"▒ID_▒▒▒▒$ +yr.,▒▒趒3▒a▒▒O▒▒▒eq▒▒e▒M▒5|▒Ȓ;▒▒▒=▒<])_▒pڔ▒▒▒D▒▒▒írU$▒E▒+'
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/templatefeather-0.1.1.2.jar: line 1: $'PK\003\004': command not found
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/templatefeather-0.1.1.2.jar: line 2: $'\b\245f\213E': command not found
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/templatefeather-0.1.1.2.jar: line 3▒f▒E2▒f▒ZgMETA-K-*▒▒ϳR0▒3▒▒r▒Cq,HL▒HU▒%-▒Lx▒▒▒RKRSt▒*A▒▒▒
▒͍t▒
M4▒▒sR▒▒: No such file or directory
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/templatefeather-0.1.1.2.jar: line 4: $'\362\213\022K\200\3725y\271x\271PK\003\004': command not found
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/templatefeather-0.1.1.2.jar: line 5:{f▒Ecom/PK: No such file or directory
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/templatefeather-0.1.1.2.jar: line 6: f▒E com/github/PK: No such file or directory
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/templatefeather-0.1.1.2.jar: line 6: $'\b': command not found
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/templatefeather-0.1.1.2.jar: line 7: f▒Ecom/github/aliteralmind/PK: No such file or directory
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/templatefeather-0.1.1.2.jar: line 7: $'\b': command not found
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/templatefeather-0.1.1.2.jar: line 8: syntax error near unexpected token `$'com/github/aliteralmind/templatefeather/PK\003\004''
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/templatefeather-0.1.1.2.jar: line 8: |f▒E(com/github/aliteralmind/templatefeather/PK'
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/xbnjava-0.1.5.jar: line 1: $'PK\003\004': command not found
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/xbnjava-0.1.5.jar: line 2: $'\b\214f\213E': command not found
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/xbnjava-0.1.5.jar: line 3▒f▒E2▒f▒ZgMETA-INF/MANIFEK-*▒▒ϳR0▒3▒▒r▒Cq,HL▒HU▒%-▒Lx▒▒▒RKRSt▒*A▒▒▒
▒͍t▒
M4▒▒sR▒▒: No such file or directory
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/xbnjava-0.1.5.jar: line 4: $'\362\213\022K\200\3725y\271x\271PK\003\004': command not found
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/xbnjava-0.1.5.jar: line 5:tf▒Ecom/PK: No such file or directory
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/xbnjava-0.1.5.jar: line 6:tf▒E com/github/PK: No such file or directory
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/xbnjava-0.1.5.jar: line 7:zf▒Ecom/github/xbn/PK: No such file or directory
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/xbnjava-0.1.5.jar: line 8:tf▒Ecom/github/xbn/analyze/PK: No such file or directory
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/xbnjava-0.1.5.jar: line 9: syntax error near unexpected token `$'ʭ\210\342A''
/home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/xbnjava-0.1.5.jar: line 9:tf▒E▒U▒M_-com/github/xbn/analyze/AbstractAnalyzer.class▒▒yS▒@Ɵ▒j!(ʭ▒▒A'
(djauth_venv)jeffy@originaldjangster:~/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build$ PuTTY

Earlier today, I successfully executed this via SFTP on my Windows machine. It's horribly slow, but it works. What do I need to do to execute this directly in Ubuntu?

Thanks.


Updated based on comments and answer

Thank you, @Alex and @ChrisStratton. After making the jars non-executable again and using colons, I'm no longer getting the gibberish, but it still gives me

Exception in thread "main" java.lang.NoClassDefFoundError: com/github/xbn/io/PlainTextFileUtil
at BuildPartFour.main(BuildPartFour.java:14)
Caused by: java.lang.ClassNotFoundException: com.github.xbn.io.PlainTextFileUtil`. 

This class is indeed in the jar:

$7z l /home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/xbnjava-0.1.5.jar

7-Zip 9.20  Copyright (c) 1999-2010 Igor Pavlov  2010-11-18
p7zip Version 9.20 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,1 CPU)

Listing archive: /home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/xbnjava-0.1.5.jar


--
Path = /home/jeffy/django_files/django_auth_lifecycle/non_django_files/wordpress_posts/build/dependency_jars/xbnjava-0.1.5.jar

Type = zip
Physical Size = 665303

   Date      Time    Attr         Size   Compressed  Name
------------------- ----- ------------ ------------  ------------------------
2014-12-11 12:52:24 D....            0            0  META-INF
2014-12-11 12:52:22 .....          103           90  META-INF/MANIFEST.MF
2014-12-11 12:51:40 D....            0            0  com
2014-12-11 12:51:40 D....            0            0  com/github
2014-12-11 12:51:52 D....            0            0  com/github/xbn

...

2014-12-11 12:51:40 .....         5523         2651  com/github/xbn/io/IOUtil.class
2014-12-11 12:51:40 .....         2483         1098  com/github/xbn/io/MultiTextAppender.class
2014-12-11 12:51:40 .....         2018          865  com/github/xbn/io/NewPrintWriterToFile.class
2014-12-11 12:51:40 .....         2497          927  com/github/xbn/io/NewTextAppenderFor.class
2014-12-11 12:51:40 .....         1687          685  com/github/xbn/io/NewTextAppenterFor.class
2014-12-11 12:51:40 .....         5655         2311  com/github/xbn/io/PathMustBe.class
2014-12-11 12:51:40 .....         2250          906  com/github/xbn/io/PlainTextFileUtil.class
2014-12-11 12:51:40 .....         1656          871  com/github/xbn/io/PrintStreamForString.class
2014-12-11 12:51:40 .....          458          292  com/github/xbn/io/RTAccessDeniedException.class
2014-12-11 12:51:40 .....          450          288  com/github/xbn/io/RTEndOfFileException.class
2014-12-11 12:51:40 .....          458          288  com/github/xbn/io/RTFileNotFoundException.class

...

------------------- ----- ------------ ------------  ------------------------
                               1437122       545645  621 files, 49 folders

What am I still missing?


Answer:

The jars do not need to be executable

On Windows, the semantics are

java -classpath somejar1.jar;somejar2.jar

But on *NIX, the semantics are

java -classpath somejar1.jar:somejar2.jar

*NIX needs colons (:) not semi-colons (;).

UPDATE

It looks like your command is incorrectly structured, you said you're doing this:

java BuildPartFour -classpath (...)

Where I'm assuming BuildPartFour is a .class file in the current working directory. This would result in running your BuildPartFour class passing in -classpath (...) as arguments to your program (these would be visible in the public static void main(String[] args) args array

It should be this:

java -classpath (...) BuildPartFour

The general java command structure is:

java [options] [class] [args]

Question:

I am stuck on the following error. I don't know what type of error it is. What should I do?

C:\Users\shehzad\Desktop\Software>java -jar Untitled.jar Exception in thread "main" java.lang.UnsupportedClassVersionError: FrontEnd/MainWindow : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)

Scenario is: I developed software that works fine in Ubuntu 14.04 Lts. It's JAR also works in Ubuntu, but when I tried this JAR in Windows 7 it shows the above error.

Ubuntu Java version: 1.8.0_101

Windows Java version: 1.7.0_79


Answer:

class version 52.0 means it requires Java 8 to run. You should for security reasons update your Windows Java anyway, so its time to go to Java 8. If you need Java 7 for something you can keep it as a private installation, but make sure the "javapath" as configured by the registry points to Java 8.

You can also start in a command window or via explorer link the right Java.exe without installing it as public version like this:

"c:\Program Files\java\jdk_1.8.0_102\bin\javaw.exe" -jar app.jar

Question:

I have compiled a fat jar using the shadow plugin for gradle.

The same file works perfectly fine on both Mac and Windows, but when I try to run it on Ubuntu it says Error: Could not find or load main class blobsaver.Main. I'm using Java 8 on all platforms.

How do I get more details on this error? Using the -verbose option doesn't tell me anything useful.

$ java -verbose -jar blobsaver-1.2.jar
...
[Loaded java.text.Format$Field from /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar]
[Loaded java.text.MessageFormat$Field from /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar]
Error: Could not find or load main class blobsaver.Main
[Loaded java.lang.Shutdown from /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar]
[Loaded java.lang.Shutdown$Lock from /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar]

Answer:

It seems that OpenJDK does not install JavaFX by default but Oracle JDK does, so I had to install it with sudo apt-get install openjfx.