| Author |
exe of a jar file + passing parameter from cmd prompt to exe
|
Jigar Naik
Ranch Hand
Joined: Dec 12, 2006
Posts: 744
|
|
Hi,
can we create an EXE of a jar file. the extension should be exe for Eg : testJar.exe
and can we pass parameter to the exe from comand prompt
for Eg :
C:\tesJar.exe 9969413222 Jigar
the functionality of the testJar.exe is to get the parameter and log it into the file system.
can it be possible ?
Thanks & Regards.
Jigar Naik
|
Jigar Naik
|
 |
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35252
|
posted

0
|
You can create a batch file (a.k.a. shell script) that runs the jar file and passes in whatever parameters it received.
Or is the objective to create native code?
|
Android apps – ImageJ plugins – Java web charts
|
 |
Jigar Naik
Ranch Hand
Joined: Dec 12, 2006
Posts: 744
|
|
well we have another application which was written in C++ which has opetion in GUI for executing .exe files.
so batch wont work. plus we have to pass arguement to exe. at run time.
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
You can call java.exe or javaw.exe:
If it is a windowed application use javaw.exe, otherwise use java.exe
If you need the full path to java.exe, you can use %WINDIR%\system32 as the path, which usually translates to C:\WINDOWS\system32
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Jigar Naik
Ranch Hand
Joined: Dec 12, 2006
Posts: 744
|
|
Hey Rob,
Thanks a lot, I think that should work fine.
Regards,
Jigar Naik
|
 |
 |
|
|
subject: exe of a jar file + passing parameter from cmd prompt to exe
|
|
|