kanishka chandra
kanishka chandra

Reputation: 11

Converting a jar file to exe file

Setup

description

I have a Java program which calls and passes an argument to a python program and then receives its output using system commands and cmd.

Question

How do I convert it into a single exe file that is the user can run it without installing java(jdk or jre) and python.

Both are a part of my system variable

Thank you

Upvotes: 1

Views: 4641

Answers (2)

Prateek Maheshwari
Prateek Maheshwari

Reputation: 22

You can use launch4j application which can convert your jar to an .exe file.

Refer to this: https://www.programcreek.com/2009/05/convert-java-jar-file-to-exe/

Upvotes: 1

user8279878
user8279878

Reputation:

  1. Use pyinstaller to package the python file in a exe.
  2. Then in the java program replace xyz.py with xyz.exe
  3. Use JarToExe to convert the jar into a Windows .exe file.

This way you would have two exe files but the user would not need to install java or python

Upvotes: 0

Related Questions