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

Upgraded my windows 7 from 32 bit to 64 bit. Installed Java 6 (64 bit) and 7 (64 bit) version.

Whenever i execute "java" in a command prompt, it opens a new command prompt and execute it. Even if i give "java -version" within a command prompt it opens new command prompt and runs it.

Later noticed that most of the exe files opens a empty command prompt and runs. The command prompt remains open until I close the exe file.

The same installation works in other windows 7 PCs without opening new command prompt.

Anyone got any idea how to prevent opening new command window automatically?

share|improve this question

migrated from Sep 30 '13 at 16:19

This question came from our site for system and network administrators.

It sounds like it is opening the Java 6 (32-bit version) instead of the Java 7 (64-bit). What happens if you put in the full path with the command, pointing to the install location for the 64-bit Java 7? When it does display the version, what version does it show?

share|improve this answer
I executed with full path "D:\apps\java\jdk1.7.0_40\bin\java -version". Still it launches in separate window. Both java 6 and 7 are 64 bit version. – user1734143 Oct 1 '13 at 7:06
I think that this has to be an issue with the Java console opening. I assume when you mention "command" that you are running cmd.exe and then typing in the Java command. When you use Control Panel > Java, is the Java console set to open or hide? – Debra Oct 1 '13 at 7:26

You could try to use a command prompt with admin rights. Open the cmd.exe with "run as administrator" from the context menu that you get with right click on cmd.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.