Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 > Run or server in a specific (or any) web project.

Couldn't find that option...

like image 947
bluefoot Avatar asked Feb 18 '11 13:02

bluefoot


People also ask

How can you configure Eclipse to open a webpage in a browser?

The Internal Web Browser view allows you to surf the internet from within the Eclipse Workbench Window. To activate the Internal Web Browser view click on the Window and select Show View → Other. In the filter text box of the Show View dialog box enter browser . From the tree select Internal Web Browser and click OK.

How can you configure Eclipse to open a webpage in a browser outside of Eclipse?

To try this, lets open an IE browser window through Eclipse with www.google.com as the page that IE opens at start-up. To do this, click on the small arrow next to the 'External Tools' icon in your Eclipse perspective and go down to the 'External Tools...' option. Give this External Tool configuration a name.

Is Eclipse a web application?

Eclipse helps you organize your web applications using a type of project called a Dynamic Web Project. When you create a Dynamic Web Project, you must select a Java EE web application server, which provides libraries needed by the project. Follow these steps to create the project. Select File > New > Other.

How do I make Chrome my default browser in Eclipse?

Go to your eclipse Window -> Preferences -> General -> Web Browser and you can select your default Web Browser here and if you want to add some other web browser then click on New button and put and and then click on OK and then after your can see your newly added browser in "External web browser" section.


3 Answers

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.

like image 148
Jonathan Barber Avatar answered Oct 10 '22 14:10

Jonathan Barber


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.

like image 22
Eduard Avatar answered Oct 10 '22 14:10

Eduard


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

like image 5
fmucar Avatar answered Oct 10 '22 15:10

fmucar