HotSUploader icon indicating copy to clipboard operation
HotSUploader copied to clipboard

Using jar fails

Open davidcortesortuno opened this issue 9 years ago • 8 comments

Hi, I'm trying to execute the jar file on Linux but it fails:

$ java -jar HotS.Replay.Uploader-2.0.1.jar 
Error: Could not find or load main class ninja.eivind.hotsreplayuploader.Client

davidcortesortuno avatar Dec 23 '15 21:12 davidcortesortuno

Which java version are you using? You need atleast JRE 8 to run the jar, 1.8.0_60 is recommended.
I've seen this error on programs compiled for Java 7, when JRE 6 was installed. I'm guessing you're using an outdated version.

zhedar avatar Dec 23 '15 21:12 zhedar

Mm as long as I can tell, I'm using version 8 (I'm using Arch)

$ archlinux-java status
Available Java environments:
  java-8-openjdk (default)
$ java -jar HotS.Replay.Uploader-2.0.1.jar 
Error: Could not find or load main class ninja.eivind.hotsreplayuploader.Client

$ java -version
openjdk version "1.8.0_66"
OpenJDK Runtime Environment (build 1.8.0_66-b17)
OpenJDK 64-Bit Server VM (build 25.66-b17, mixed mode)

Is there another way to execute the program? Wine fails for the exe file. I saw someone that unzipped the deb file I think

davidcortesortuno avatar Dec 23 '15 21:12 davidcortesortuno

What does java -version say?
Looks like neither rpm nor deb are supported by pacman and extracting the natives won't get you any benefits over the jar (atleast I guess that).

zhedar avatar Dec 23 '15 21:12 zhedar

Well, I extracted the deb and extracted the tar inside which has an executable and it works perfectly :)

$ ar xv hots-replay-uploader-2.0.1.deb
$ tar -xvf data.tar.xz
$ cd opt/HotSReplayUploader/
$ ./HotSReplayUploader

It even detected the folder with my account =o

davidcortesortuno avatar Dec 23 '15 21:12 davidcortesortuno

Great to see you up and running, now we only need to find out, why the jar doesn't work for you. Will get back to this after the holidays, maybe we can spot the problem then.

zhedar avatar Dec 23 '15 22:12 zhedar

@davidcortesortuno Does Arch have other JRE/JDK besides openjdk? Does it have oracle JDK?

minlexx avatar Dec 24 '15 03:12 minlexx

I'm going to assume the jar fails because we require some internal API to roll with the conditional boot loader. I think we have to fix this for JDK9.

eivindveg avatar May 17 '16 09:05 eivindveg

I am able to run the jar directly after building from source in linux (ubuntu derivative elementaryOS), with no error about the main class, everything works as expected:

java -jar "target/HotS Replay Uploader-2.1-SNAPSHOT-jar-with-dependencies.jar"

rogusdev avatar Jul 20 '16 22:07 rogusdev