How to stop Netbeans opening my index on run?

邮差的信 提交于 2020-01-04 05:31:10

问题


When I run my project in Netbeans 6.8, it loves to open the index page automatically. It's annoying because I always keep a tab with the page I'm working on when I work, so I don't need this index page. It also makes my current page lose focus.

I have tried not specifying an index or my project URL, but then I can't run or save my project.

How can I prevent it from doing so?


回答1:


In NetBeans 7.4:

  • Right-click your project, select 'Properties'
  • In left hand pane of popup, select 'Run Configuration'
  • In the right pane of the popup, in the bottom right corner of the list of fields, click 'Advanced...'
  • Select radio button 'Do Not Open Web Browser'



回答2:


I ran into that issue as well. The solution is quite simple - go to the menu bar:

Run/Run File.

That's it. It will just run the current php script without going to the index.php.




回答3:


Basically, you want to reopen the same page (refresh it ?) in the browser ? You can set settings in the project properties > run configuration, then chaange the index file or project url. But apart from that I am afraid that you can't do anything to prevent opening a new window on run. When you click 'run', netbeans says to your OS : "Hey, let's open that page (your_project_URL/index_file) now". The OS thinks and execute a command like "default_browser url", where the argument "url" is here your_project_URL/index_file. Then the browser thinks it's a new page to open, and BAM, opens a new page.




回答4:


Just use shift+F6 which will open the current page with focus.



来源:https://stackoverflow.com/questions/5064506/how-to-stop-netbeans-opening-my-index-on-run

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!