I found the solution, and this question was in fact a duplicate, but of a completely different question. If you have a similar problem, check out - ant, jar files, and Class-Path oh my
First:
I have read other posts with the same title (i think all of them). I do know that i need to include mysql-connector-java in classpath, and i am sure i have done this.
Also, i am not asking about suggestions for other tools.
Now, I have the following within the code:
System.out.println(System.getenv("CLASSPATH"));
Class.forName("com.mysql.jdbc.Driver").newInstance();
The output is:
/home/volodya/OtherPeople/00insert/java/lib/mysql-connector-java-5.1.36-bin.jar
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
I can do:
$ ls -l $CLASSPATH
-rw-r--r-- 1 volodya volodya 972009 Jun 19 22:26 /home/volodya/OtherPeople/00insert/java/lib/mysql-connector-java-5.1.36-bin.jar
I can do:
$ java -cp lib/mysql-connector-java-5.1.36-bin.jar -jar dist/memorial.jar
To answer the question about the location of the console:
$ ls -l lib/
total 952
-rw-r--r-- 1 volodya volodya 972009 Jun 19 22:26 mysql-connector-java-5.1.36-bin.jar
But it produces exactly the same output. I am very close to unzipping the jar and just putting all the .class files within my own.