Help with .jar File to Install HamSphere 3

Very new to Linux (3 Days).
I'm trying to install HamSphere 3, from a .jar file. I get a message telling me that,
"The file '/home/john/Desktop/hamsphere_3.1.5.jar' is not marked as executable. If this was downloaded or copied from an untrusted source, it may be dangerous to run."
I've spent a few Days searching for a solution and have tried everything I can find, from marking the File as an executable, to several methods using the Terminal. All to no avail.
I would be very grateful, if anyone could help me with this problem.
I'm using Ubuntu 18.04.4 LTS Mate Desktop.

Try this command:

java -Xmx256m -DEMPATH=/home/john/Desktop -jar HamSphere_3.1.5.jar

You will need java runtime packages. I use OpenJDK packages -
openjdk-8-jre-headless:amd64
-and-
openjdk-8-jre:amd64

djb

@JohnC The issue is that you may have openjdk-11 ...
I started a UM 18.04 VM,
sudo apt install openjdk-8-jdk
java -jar ./hem3.jar started right away.

Thanks for your reply.
I've got the Java Packages. When I typed that into the Terminal, it's returned this:

Exception in thread "main" java.lang.NoClassDefFoundError: org/omg/CORBA/portable/IDLEntity

Here's the Java info:

openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)

As I said, I'm very new to Linux (about 4 Days) and I must admit, I'm struggling a bit.
Do I need the Version 8 Packages, or is it something else causing the problem?

Thanks for your reply.
As I said, I'm very new to Linux, so tbh I'm not too sure about the UM 18.04 VM part.
Can I also install Version 8, or should I do away with the Version that I have already first?
I managed to install Hamsphere 4 (which came as a tar.gz file), I'm a bit concerned that I may do something to this, as it's an updated Version of HamSphere 3, if I need to use an older Version of Java.
Please excuse my ignorance.

I've just installed Java 8 and marked the HamSphere .jar File as executable in Properties. When I right click and open with Java 8, nothing happens. I think I'm missing something about the process.

Let's make sure you have java 8 ... java -version should tell you.

Also, dpkg -l | grep openjdk should list what is installed.

From a terminal, java -jar ham3.jar (adjust for the correct filename) and it starts

ham4 is better than ham3 but it still needs openjdk-8 ... see what @Dave_Barnes wrote.

1 Like

Right. CORBA was removed in newer OpenJDK versions. You will need version 8 for HamSphere.

1 Like

You can have multiple versions of java, you need to tell the system which one to use. It seems you have java 11 (like my system) so first I installed 8 ... sudo apt install openjdk-8-jdk

sudo update-alternatives --config java should list the versions you have (in my case 0 is auto mode, 1 is 11 and 2 is 8. I selected 2, then java -version shows me I'm using java 8. Back to the update-alternatives, select 0, java -version shows 11. Here's my output ...

user@amd:~$ java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
user@amd:~$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
  2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode

Press <enter> to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java to provide /usr/bin/java (java) in manual mode
user@amd:~$ java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)
user@amd:~$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
* 2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode

Press <enter> to keep the current choice[*], or type selection number: 0
update-alternatives: using /usr/lib/jvm/java-11-openjdk-amd64/bin/java to provide /usr/bin/java (java) in auto mode
user@amd:~$ java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)
user@amd:~$ 

As a final step, I selected java 8, marked the jar file as exec, right click, open with jdk-8, it started.
I hope this helps.

2 Likes

Thank you very much Sir. It's working now. :slight_smile:

Thank You, pavlos_kairis and Dave_Barnes. I really appreciate your help.