RenegadeLucien / project-tenacity

Project Tenacity, the final evolution of the "Level 3 to X" guides
47 stars 6 forks source link

JNI error when trying to run .jar file #57

Closed Kvoo closed 4 years ago

Kvoo commented 4 years ago

I get an Error when trying to run the program. Got the newest Java version installed.

Error: A JNI Error has occured, please check your installation and try again

Kvoo commented 4 years ago

Note that it DOES work with v1.0.6, seems to be an error with your newest update

RenegadeLucien commented 4 years ago

Which OS are you using?

As per https://stackoverflow.com/questions/22381202/a-jni-error-has-occurred-please-check-your-installation-and-try-again-in-eclips, try running as a Java Application

Kvoo commented 4 years ago

Using Windows 10

I'm not sure how to do that, I'm not familiar with java.. What do they mean by the class that contains the main method? Not sure what I have to do here, I just downloaded the file, clicked it and that error came up.

RenegadeLucien commented 4 years ago

Ah woops, I thought it meant just right click the file and say "run as Java application", didn't realize it was talking about within Eclipse.

What version of Java are you running?

GaryLeutheuser commented 4 years ago

Not OP, but same issue, and my Java version is 1.8.0_241. I use Windows 10 (version 1903).

The previous build (1.0.6) runs fine for me as well.

Copy-paste of version output in case there's detail there that is helpful: java version "1.8.0_241" Java(TM) SE Runtime Environment (build 1.8.0_241-b07) Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)

RenegadeLucien commented 4 years ago

Hmmm...So there might be another Java 8/11 conflict here, but I'm not sure, cause I can't reproduce the issue locally and there's a billion different potential causes for this.

Can you try running through the command prompt? There might be a more detailed error message that would be helpful to me.

Rederdex commented 4 years ago

Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedClassVersionError: ui/Launcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 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 sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

This is the error that shows up in CMD

RenegadeLucien commented 4 years ago

Yep, this is a Java 8 / 11 conflict. Specifically, the version bundled with my IntelliJ environment when I installed it on my new computer was Java 11. So it was compiling for Java 11, and thus wouldn't function on Java 8. I was able to reproduce this issue on my computer by downloading Java 8 and trying to run with it, and it didn't work.

I rebuilt all the v1.0.7 releases with Java 8, and it works on my computer now under Java 8. Try re-downloading, and let me know if it works.

Rederdex commented 4 years ago

Yes, it works now.

One problem that I had though, even in the older version, was that for whatever reason the API couldn't fetch my XP and completed quests. Can you help me in this ticket, or should I open one by myself.

I also noticed some armour pieces are not in the database, or are spelled in another way, mainly the max cape, cinderbans and DTB.

RenegadeLucien commented 4 years ago

Is your Adventurer's Log public? Is your file name the same as your RSN?

For the missing armour pieces, just open another issue with all the ones you find and I'll add them in for the next version.

Rederdex commented 4 years ago

Yes, I am quite sure that my name is written perfectly, and my account should be public, as literally any other app can see it.

Is there a list with all of the items that are in the app already, so I could check if I might have used a lower case letter instead of big case or something, that happened a lot for other items

RenegadeLucien commented 4 years ago

Items Armour Weapons

For the not loading your XP/quests, do you get any sort of warning pop up? Do you get an error message if you run in the command line?

Rederdex commented 4 years ago

Ok, so when trying to see if I get any error, it worked this time around 🤷‍♂

Maybe the API was down ynight or something, but thanks anyway

RenegadeLucien commented 4 years ago

Haha, sure thing. Gonna close this, if you encounter this again feel free to create a new issue