MaxiHuHe04/iTunes-Backup-Explorer

Java Exception

Closed this issue · 6 comments

Hi, I'm a bit of a noob. I'm trying to run the jar file on Windows and it's coming up with Java Exception error. I'm not sure what to do, my Java is updated and I can't run it through command prompt either. Thanks!

Hey,
Could you copy and paste the whole error message here, or post a screenshot of it?
Have you tried the following command in cmd after locating the directory you downloaded the program file to?

java -jar itunes-backup-explorer-1.3.jar

@MaxiHuHe04, I had this problem when using Oracle's Java 8 (Update 371), which is the latest version Oracle's website recommended for my system. The command line error is the following:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: me/maxih/itunes_backup_explorer/ITunesBackupExplorerLauncher 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)

When I switched to AdoptOpenJDK JRE (17.0.7) I could use the backup explorer without problem, other than the Files Search and Apps tabs have nothing to show.

Hi @mygeek911,
So, the first error is just your Java version which was too old. iTunes Backup Explorer currently needs Java 11 at least.
Regarding the second problem you are facing, could you post a screenshot of the File Search tab? The Apps tab is not finished, it does not have anything in it yet.

@MaxiHuHe04
I wondered about Java being an older version, yet it appears that Oracle is recommending lower Java versions for people. If you want to link to another site in your README.md file instead of Oracle, then https://www.ninite.com/ is the way to go. A person would need to look at the Runtimes header and choose one of the latter two AdoptOpenJDK runtime releases (as shown below). The java -version command is still valid for it. (I've been paying for the Pro version of Ninite since July 2011. I'm just very pleased with what it does!)

AdoptOpenJDK Runtime

Regarding the second issue, here's the screenshot!

File Search Tab

@mygeek911
Okay, that's interesting. For me, the page shows downloads for JDK 20 and JDK 17 (LTS). However, changing the recommendation to Adoptium is probably a good idea anyway.
The File Search tab looks as intended. I will add more information on this to the README. You have to type in something in the Domain and Relative Path fields, then click on Search. You can also use a % sign as a wildcard.

I'm closing this issue now. If the original problem still occurs, please provide more information and re-open it.