开发者

Is there a way to prevent Eclipse from opening the browser when starting a Web application?

Ahoy!

I was wondering if there's a way to configure eclipse not to open the browser (internal or external, doesn't matter) when the user selects Run As开发者_C百科 > Run or server in a specific (or any) web project.

Couldn't find that option...


On Eclipse Juno through Oxygen, change the preferences (Window->Preferences->General->Web Browser) to add a new external web browser and set it's location as "/bin/true" (under UNIX), "/usr/bin/true" (under Mac OS Yosemite through Mojave), or "C:\Windows\System32\cmd.exe" with parameter "/c" (under Windows). Then set this as the default browser.

After this, whenever you "Run on server", Eclipse will spawn this command (which immediately succeeds) instead of touching your browser.

This isn't a per-project setting though.


No there is not. The way to do this is not click on the apllication and run as, but to click on your server and launch it(and deploy your application). Then you will get rid of browser opening.


If you run the server from the server view it won't open the browser.


I was wondering the same question

Instead of clicking the run button

Is there a way to prevent Eclipse from opening the browser when starting a Web application?

try press Relaunch

Is there a way to prevent Eclipse from opening the browser when starting a Web application?

(I'm on STS)


You should try this:

In MyEclipse, change the preferences (Window->Preferences->General->Web Browser) check radio button (use external web browser) and click on new to add a new external web browser and set it's location of your browser and enter name (as your choice), then click on ok.


Just fixed this issue for me. You should do the following: Create a file null.bat that contains something like "@echo off". It doesn't really matter where you put it.

Go to Eclipse=>Preferences=>General=>Web Browser, check "Use external web browser". Create a new external Web broswer. Name it something and point the Location to where you stored your null.bat

That way Eclipse runs your null.bat and does nothing :)


In latest version of Eclipse 2022-03 or later Simply Click on Window--->Web Browser--->Internal Web Browser. You can select other browser too as per your wish.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜