+ 4
How to make a exexutale file (JAVA)
How can we make an executable jar or exe file in java compiling source.java file ? I am using 'Eclipse Java Oxygen IDE' and how compilation of direct executable file on double clicking can be made ?
2 Réponses
+ 5
in eclipse it is very intuitive: right click on project. export. jar. select name and directory. next. seal the packages and select the main class. if you use windows you need a batch file in the same directory like:
@echo off
java -jar name.jar <parameters>
in linux a bash script
+ 1
I think you cannot make .exe files in java - instead it makes a .class.
If you want to make a .exe file write a program in c# and run this script in your windows cmd prompt.
csc YOUR_CS_APPNAME
That will compile the c# code and make a .exe file