Masking the java program name

R

ruds

hi,
Can i mask the name of my java program so that others executing the
program will not be able to know which is the actual program they are
running?
I.E. can i replace 'java Run' to 'Run'?
 
T

Thomas Kellerer

ruds wrote on 17.09.2006 06:06:
hi,
Can i mask the name of my java program so that others executing the
program will not be able to know which is the actual program they are
running?
I.E. can i replace 'java Run' to 'Run'?

For *nix system you can simply create a shell script called 'Run'.
For Windows, have a look at launch4j (luanch4j.sourceforge.net) it will create a
..exe file that will take care of starting your program

Thomas
 
M

Mike Schilling

Thomas said:
ruds wrote on 17.09.2006 06:06:

For *nix system you can simply create a shell script called 'Run'.
For Windows, have a look at launch4j (luanch4j.sourceforge.net) it
will create a .exe file that will take care of starting your program

Or you can create a batch file on Windows that does what the shell script
does on Unix.
 
T

Thomas Kellerer

Mike Schilling wrote on 17.09.2006 09:49:
Or you can create a batch file on Windows that does what the shell script
does on Unix.

Yes, of course, but most Windows users prefer to start an .exe, and in case of
the .bat file we'd face the unevitable question "How do I avoid the console
window when starting a Java program" ... ;)

Thomas
 
A

AndrewMcDonagh

Thomas said:
Mike Schilling wrote on 17.09.2006 09:49:

Yes, of course, but most Windows users prefer to start an .exe, and in
case of the .bat file we'd face the unevitable question "How do I avoid
the console window when starting a Java program" ... ;)

Thomas

I'd say most windows users don't care what the app is written in - so
long as they have a short-cut on thiner desktop,start menu, quick launch
menu, or any combo there of.
 
R

richnjones

If you are doing it from a batch file then you can use the start
command to remove the console window. e.g.

start /b javaw -jar xxxxx.jar

with xxxxx.jar being the executable jar you are using. The console
appears and then disappears once the application has launched. This is
better than having the console appearing as well as the application.

Richard
 
J

Jeffrey Schwab

If you are doing it from a batch file then you can use the start
command to remove the console window. e.g.

start /b javaw -jar xxxxx.jar

with xxxxx.jar being the executable jar you are using. The console
appears and then disappears once the application has launched. This is
better than having the console appearing as well as the application.

It also helps to have the user run from a shortcut, wherein the console
window is specified to "Run Minimized." As Thomas suggested, though,
one can avoid the console Window entirely by making the right
CreateProcess call to the OS from a stub program in C or C++, avoiding
the console window entirely.
 
K

Karl Uppiano

Jeffrey Schwab said:
It also helps to have the user run from a shortcut, wherein the console
window is specified to "Run Minimized." As Thomas suggested, though, one
can avoid the console Window entirely by making the right CreateProcess
call to the OS from a stub program in C or C++, avoiding the console
window entirely.

On Windows, I generally provide a shortcut, and use the javaw.exe version of
the java command line, which does not start a console window.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top