1

I have a very simple JAVA app that is distributed as a single Windows executable file and I would like to run it on a Linux computer. I could extract the content of the exe file with 7-zip, but I don't know what to do next.

There are multiple levels of subfolders with .class files and image files for the software's user interface (no source files).

The root folder doesn't contain any class files, but it contains many subfolders, including a META-INF subfolder. This META-INF folder contains one MANIFEST.MF file, in which there is a line like this: Main-Class: subfolder1.subfolder2.Software

How can I make it run? Is there a way to run it on a Linux computer's JVM?

2 Answers 2

3

I extracted the content of the Windows executable file with 7-ZIP, created a JAR file and executed it with these commands:

cd MyAppName
jar cfm MyAppName.jar .\META-INF\MANIFEST.MF .
java -jar MyAppName.jar
Sign up to request clarification or add additional context in comments.

Comments

-2

You likely cannot do what you are looking to do using the .exe as that is a program that was compiled specifically for Windows. To get it to run on Linux, you would either have to recompile it to a runnable file on Linux, or make it a jar file.

Making it a .jar file would allow it to run on any machine that has a Java Virtual Machine installed on it and would allow your program to be platform independent.

1 Comment

Assuming the exe is just a Jar, which the description makes it sound like is the case (.class files and WEB-INF) you just need to convert the format. So this is not really true.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.