Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm a Java newbie and I just found out that I had two installations of JRE on my system, one through the JDK and a separate JRE installation. I decided to uninstall the latter since it was redundant and after it was uninstalled I added the "...\jdk\jre\" path in the PATH environment variable. In spite of that, a Java application I've been using prompted a message that it requires JRE etc. So I changed its shortcut's target from "C:\foo\bar.exe" to "cmd /k java -jar C:\foo\bar.exe" and it runs fine with the exception that now the windows that are opened every time I run the above application are two. One for cmd and a separate one for the application (through the JRE). How can I avoid that? The only option available in the shortcut's properties is for it to be ran minimized.

share|improve this question
up vote 2 down vote accepted

use "javaw.exe" instead of "java.exe"

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.