0

I have two JAVA applications:

a) My JAVA Desktop appplication which start my application Server (Wildfly) -> If I execute this program I will get in Windows one process (JAVA TM Platform SE binary)

b) If I start the Wildfly Server also: -> I will get another process in Windows (also JAVA TM Platform SE binary)

Now I would like to have: a) Only one process for both b) Rename the process from "JAVA TM Platform SE binary" to "MyApplication" and inlude also the icon from that. How can I do this?

Many thanks for any help

  • Please take a look on this, It can help you for your requirements: http://stackoverflow.com/questions/1057247/how-can-i-set-the-process-name-for-a-java-program – pbajpai Jun 15 '16 at 17:29

1 Answers1

0

What you're asking doesn't appear to be possible. When you execute a process, it's running under windows, not java - and there doesn't seam to be a way to run it under java. Why do you need to have one specific process?

As for running the java application under its own process name. You're going to have to turn the .jar into an exe. When you run a java program, what you're really doing is starting up an instance of the JVM, and that becomes the process. If you turn the jar into an exe, the exe becomes the process. Launch4j is pretty good at converting jars into exes. Note that the exe still requires a JVM to run.

Luke Melaia
  • 1,470
  • 14
  • 22