Xosrov
Xosrov

Reputation: 729

Running Windows-Compatible .jar files on Linux?

Our CE project includes a .jar file which is written for Windows only for some reason. Unfortunately, I do all my coding related projects on Ubuntu and I'm really not willing to install VS on windows and start over on a new environment and lose a lot of efficiency.

The jar file requires some other files to work but the directory formats differ in Linux so I'm getting errors of it not finding the files when I try to open it from Linux. I've already asked for the source code or a more compatible version but the TA's aren't really cooperative in my case.

Is there any way I could circumvent this problem and fix the incompatible directory formats issue(For example by running through wine)?

Edit: I tried decompiling the jar, but it wasn't fully successful and some of the files came out corrupted.

Upvotes: 0

Views: 892

Answers (1)

Makoto
Makoto

Reputation: 106460

Because the original maintainers didn't think that this JAR would be run on other OSes, you're stuck placating their arbitrary requirement. You're going to want to use a VM (Wine isn't an emulator and you're going to run into significant pain using it and Java to run a JAR) to set this up and execute their JAR.

Once you get a hold of the source, you can build a new JAR which asks the OS which file separator to use instead of allowing the code to assume Windows. Or use NIO.

Upvotes: 1

Related Questions