Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2006

Tip: Looking for answers? Try searching our database.

Masking the java program name

Thread view: 
ruds - 17 Sep 2006 05:06 GMT
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'?
Thomas Kellerer - 17 Sep 2006 08:20 GMT
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
Mike Schilling - 17 Sep 2006 08:49 GMT
> ruds wrote on 17.09.2006 06:06:
>> hi,
[quoted text clipped - 6 lines]
> 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.
Thomas Kellerer - 17 Sep 2006 08:54 GMT
Mike Schilling wrote on 17.09.2006 09:49:
>> ruds wrote on 17.09.2006 06:06:
>>> Can i mask the name of my java program so that others executing the
[quoted text clipped - 8 lines]
> 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
AndrewMcDonagh - 17 Sep 2006 09:03 GMT
> Mike Schilling wrote on 17.09.2006 09:49:
>>> ruds wrote on 17.09.2006 06:06:
[quoted text clipped - 15 lines]
>
> 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.
ruds - 17 Sep 2006 09:23 GMT
I want to know this specially for unix system
how should i do it?
Thomas Kellerer - 17 Sep 2006 09:29 GMT
ruds wrote on 17.09.2006 10:23:
> I want to know this specially for unix system
> how should i do it?

Read my first post...
richnjones@gmail.com - 17 Sep 2006 10:19 GMT
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

> ruds wrote on 17.09.2006 10:23:
> > I want to know this specially for unix system
> > how should i do it?
> >
> Read my first post...
Jeffrey Schwab - 17 Sep 2006 17:25 GMT
> If you are doing it from a batch file then you can use the start
> command to remove the console window. e.g.
[quoted text clipped - 4 lines]
> 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.
Karl Uppiano - 18 Sep 2006 04:50 GMT
>> If you are doing it from a batch file then you can use the start
>> command to remove the console window. e.g.
[quoted text clipped - 10 lines]
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.