Author Topic: Invalid or corrupt jarfile...  (Read 5532 times)

Offline Reggie777

  • Villein
  • ***
  • Posts: 39
  • Merit: 4
  • I haven't updated my profile yet!
    • View Profile
Invalid or corrupt jarfile...
« on: December 29, 2015, 07:07:38 PM »
I've recently had to reinstall the game on my newly repaired system. It's now running Windows 10, 64 bit. Previously, it was working fine on a Windows 10, 32 bit machine. Now, I keep getting the "invalid or corrupt jarfile" error, when I try to run the jar file. Oddly, when I try to run an older version of JCloisterzone from a thumbdrive, it works just fine. Any suggestions would be greatly appreciated. Thanks.



Linkback: https://www.carcassonnecentral.com/community/index.php?topic=2284.0

Offline Paul

  • Marquis Chevalier
  • ***
  • Posts: 2491
  • Merit: 86
    • View Profile
    • sydby.com
Re: Invalid or corrupt jarfile...
« Reply #1 on: December 30, 2015, 01:45:00 AM »
I've recently had to reinstall the game on my newly repaired system. It's now running Windows 10, 64 bit. Previously, it was working fine on a Windows 10, 32 bit machine. Now, I keep getting the "invalid or corrupt jarfile" error, when I try to run the jar file. Oddly, when I try to run an older version of JCloisterzone from a thumbdrive, it works just fine. Any suggestions would be greatly appreciated. Thanks.

Which version of the JCloisterZone are you using? If unsure, you could always download it from the official website again here: http://jcloisterzone.com/en/

With Windows 10 you get several options on how to open it (the first time at least). Mine for example, as a default it wanted to open it with WinRar. I had to right-click on the .jar file and choose Java Platform SE Binary. And while at it I made it as a default. It works without any errors.

I am also using Windows 10 64x.

Have you tried the usual suspects?
• Update your Java
• Made sure you are using the latest version of JCZ

Hope this helps!
World record holder for a single game of Carcassonne using 10 007 tiles!

Offline Reggie777

  • Villein
  • ***
  • Posts: 39
  • Merit: 4
  • I haven't updated my profile yet!
    • View Profile
Re: Invalid or corrupt jarfile...
« Reply #2 on: December 30, 2015, 05:32:34 AM »
Hi Paul. Thanks for the suggestions. I am using the latest version from the official website. And I did update the java to the latest, 64 bit platform. I also right clicked on the jar file, and opted to run it with the Java platform. And it gives me the error.

I'm using Unpacker to unpack the downloaded file from the official site. But I had used unpacker before without any issues. And to complicate matters, when I run an old version of the jar file from a thumb drive, it opens that old version just fine. I must be doing something wrong. Just can't figure out what it might be.

Maybe I'll try WinRar as the unzipper, and see if that works.  Thanks for the help.

Offline Reggie777

  • Villein
  • ***
  • Posts: 39
  • Merit: 4
  • I haven't updated my profile yet!
    • View Profile
Re: Invalid or corrupt jarfile...
« Reply #3 on: December 30, 2015, 06:29:07 AM »
The Java I had was not the latest. So I uninstalled same, and got the latest. Changed my unpacker to Opener Pro. This time, I got the splash screen of JCloisterZone to show up. But it soon vanished, and nothing happened. I did get an error file.

Exception in thread "main" java.lang.NullPointerException
   at com.jcloisterzone.ui.Bootstrap.loadPlugins(Bootstrap.java:102)
   at com.jcloisterzone.ui.Bootstrap.run(Bootstrap.java:177)
   at com.jcloisterzone.ui.Bootstrap.main(Bootstrap.java:207)

So, I think the problem is with java.

Offline Paul

  • Marquis Chevalier
  • ***
  • Posts: 2491
  • Merit: 86
    • View Profile
    • sydby.com
Re: Invalid or corrupt jarfile...
« Reply #4 on: December 30, 2015, 06:46:28 AM »
Could be yes. Issue with java itself. Uninstall and reinstall might do the trick.
  Also, if it suggest during install, choose yes to remove old files as they can be a security risk.

Offline MrNumbers

  • Duke Chevalier
  • *
  • Posts: 1830
  • Merit: 91
    • View Profile
    • Carcassonne Latvia
Re: Invalid or corrupt jarfile...
« Reply #5 on: December 31, 2015, 06:07:29 AM »
Try to use 32-bit Java instead. This will solve your issue.
Despite you have 64-bit OS, most applications still are 32-bit, and they need 32-bit Java.
"I never lose. Either I win or I learn." (Nelson Mandela)

Offline Reggie777

  • Villein
  • ***
  • Posts: 39
  • Merit: 4
  • I haven't updated my profile yet!
    • View Profile
Re: Invalid or corrupt jarfile...
« Reply #6 on: January 01, 2016, 11:53:35 AM »
Tried using the 32 bit version of Java. But unfortunately still getting the error. The splash screen for the game does appear for about 10 seconds, then vanishes. And a few moments later, the error file appears in the folder.

Exception in thread "main" java.lang.NullPointerException
   at com.jcloisterzone.ui.Bootstrap.loadPlugins(Bootstrap.java:102)
   at com.jcloisterzone.ui.Bootstrap.run(Bootstrap.java:177)
   at com.jcloisterzone.ui.Bootstrap.main(Bootstrap.java:207)

Arrggghhh!!!!  >:( Computers, ya gotta love them.

Offline Paul

  • Marquis Chevalier
  • ***
  • Posts: 2491
  • Merit: 86
    • View Profile
    • sydby.com
Re: Invalid or corrupt jarfile...
« Reply #7 on: January 01, 2016, 01:18:05 PM »
Tried using the 32 bit version of Java. But unfortunately still getting the error. The splash screen for the game does appear for about 10 seconds, then vanishes. And a few moments later, the error file appears in the folder.

Exception in thread "main" java.lang.NullPointerException
   at com.jcloisterzone.ui.Bootstrap.loadPlugins(Bootstrap.java:102)
   at com.jcloisterzone.ui.Bootstrap.run(Bootstrap.java:177)
   at com.jcloisterzone.ui.Bootstrap.main(Bootstrap.java:207)

Arrggghhh!!!!  >:( Computers, ya gotta love them.

Somewhere the code uses a variable that is defined in a certain way, and then use it in another way that it cannot handle.

How about the management right in Windows. Are you logged in and allowing Java to be run as administrator mode? This could prevent the  game to store variables and thus cause the error.

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: Invalid or corrupt jarfile...
« Reply #8 on: January 01, 2016, 03:13:49 PM »
Its a silly question but have you exracted the zip file. Windows has a tendency to open things in situ, which prevents the other resouces, like images, from being accesible when the JVM is executed.

I doubt he 32/64 bit jvm makes any difference. From what ive seen of jcz, it doesnt use anything thats goong to affect memory allocation in this way. The bytecode will execute on 32/64 bit in a similar manor for most things.

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: Invalid or corrupt jarfile...
« Reply #9 on: January 01, 2016, 03:20:35 PM »
Heres like 102 of the Bootstrap class, which u can see in guthub:

Path pluginDir = Paths.get(getClass().getClassLoader().getResource("plugins").toURI());

I suspect getResouce('plugins')  has returned 'null' because it hasnt been able to find it.

I suspect youre missing the directory.  Or that the directory cant be loaded because its executing from the zip file as i said before.

A screenshot of your folder where you execute java would be helpful!

Offline Reggie777

  • Villein
  • ***
  • Posts: 39
  • Merit: 4
  • I haven't updated my profile yet!
    • View Profile
Re: Invalid or corrupt jarfile...
« Reply #10 on: January 03, 2016, 03:06:20 AM »
Success!!! Thanks for all the suggestions. Based on the information that it might be a problem with the path, and the directory, I examined the older version that worked from a thumb drive. Noticing the structure of the folders, I then recreated that pattern in the newer version. Basically, the unpacker had put the jar and yami file in the wrong place. So I moved them to the folder they were supposed to be in, and ... voila.... success.

Thanks to all who helped. Once again, I have access to the best Carcassonne game.   :(y)

Offline Decar

  • Owner
  • Chatelain Grand Officier
  • *
  • *
  • Posts: 6719
  • Merit: 317
  • Shut up and take my money!
    • View Profile
    • tehill.net
Re: Invalid or corrupt jarfile...
« Reply #11 on: January 03, 2016, 07:23:48 AM »
Glad you managed to get it sorted.  It's odd that you had the problem, usually unzipping all of the JCZ archive contents into a new directory is enough; but sounds like we managed to get to the bottom of it.

Enjoy!

PS: Keep an eye out for the next wave of competitions, we regularly use JCZ!


Share via delicious Share via digg Share via facebook Share via furl Share via linkedin Share via myspace Share via reddit Share via stumble Share via technorati Share via twitter