use a jar file,though it has so many steps......create a manifest file with.mf extension,the manifest file must contain the class file that has the main method,then isssue the following command in your command prompt window
jar-cmf jarfilename.jar manifestfilename classsesname
jar-cmf jarfilename.jar manifestfilename *.class
if u use the last one then ur manifest file and ur class files must be in the same directory
do not, I repeat NOT go and create an .exe file unless you have no other option.
if your employer demands an .exe file, and threatens to fire you, now this might be a reason I can understand (although you could also look at him with an "you kiddin' me?" expression on your face).
another reason I could understand, is that you have to develop a piece of code that you have to run under Windows in a certain (spooky?) way which only accept an .exe file.
but unless you're in such a situation, don't go there. a .jar file already is an executable, which can run by command line, or by being 'clicked', just like an exe file.
the main difference is, if you "settle" for a .jar file, you don't limit the users of your code to a particular (Windows) operating system. and this is not mentioning that a lot of 'create exe' apps out there create those exe's based on (who would have guessed?) a .jar file. so, since you'll already have the .jar file, you might as well stick with it :)
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...
I am writing a java program that needs to execute shell commands, so I wrote a function that would take the command to execute as a string (ie: "mkdir ~/Folder1") and execute that command with the shell. Here is the function:
Runtime run = Runtime.getRuntime();
Process pr = ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.