简体   繁体   中英

Why does command prompt open and close immediately when i open netbeans ide?

Why does command prompt open and close immediately when i open netbeans ide ?Although i do not want to use the command prompt, strangely it opens and closes by itself each time i open netbeans ide, and then opens the application itself and works just fine. I am curious to know why this happens. I've tried searching and asking some but could get an answer. Thanks in advance.

On which platform? It sounds like it's started via a shell script launcher (.sh / .cmd file), so the shell ("command prompt") is launched to run the launcher, and then the launcher script starts Netbeans...

Assuming you are using Windows:

NetBeans.exe is a 32bit application, but if you are using a 64bit JDK, the 32bit exe closes itself (because a 32bit executable cannot load a 64bit JVM) and then launches NetBeans64.exe - I think this closing and re-starting is the reason for the command line window to show up briefly.

If you start NetBeans64.exe directly, then this doesn't happen.

I had the same issue with Netbeans 8.0.2 on windows where commands were opening separate cmd windows. Resolved this way:

  1. Right-click on the shortcut for Netbeans or the exe (Launcher).
  2. Click Run as administrator

It worked for me.

You can try to right click on the icon and go to its properties. Copy the value in the Target field. Paste it into a command prompt and run it manually. This time the command prompt should not close and you can see for yourself what the error is.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM