tags:

views:

543

answers:

5

I've noticed that when I start Netbeans it shows up in the task manager as netbeans.exe as all my own Java applications show up as java.exe or javaw.exe.

How can I change that so my process names shows up as myapp.exe?

+4  A: 

Netbeans and Eclipse both ship with an .exe file that in turns launches a JVM. The exe itaself probably does nothing after launching the VM. You see the NetBeans javaw.exe in the Task Manager also, I suspect.

So you'll need to write a native exe (using some windows tool) that does a similar thing.

skaffman
I believe javaw.exe is also the launcher Eclipse.
Thomas Owens
+6  A: 

The process name is the name of the JVM. So if you rename the jvm you have an other process name. There are some tools which can do that for you. For example Launch4J

Luzifer42
+4  A: 

Not easily. The easiest way (but not nice!) would be to simply copy the java.exe (only 68k on my system, so perhaps practical!)

If you're worried about identifying which java process is which (e.g. is one consuming memory/CPU etc.), use the standard tool jps to identify the Java processes

Brian Agnew
I have done this with the java.exe I use to run eclipse with - then I can easily spot whether eclipse is chewing up resources, or my program.
RodeoClown
+3  A: 

IMO the best option is to choose one of the many open source launchers. They all provide a nicer deployment container than java.exe and a batch file.

I've compiled a list of them after a brief search on google (in no particular order and may not be exhaustive):

(full disclosure: i work on winrun4j)

Peter Smith
+1  A: 

Just answered this a second ago here: http://stackoverflow.com/questions/1152507/get-jvm-to-grow-memory-demand-as-needed-up-to-size-of-vm-limit/1157337#1157337

It's actually a lot easier than folks are saying (but you do have to have a c/c++ compiler handy).

Kevin Day