Eclipse - No server found in Run Configurations

2019-05-09 11:45发布

问题:

I'm having a trouble: I've got a GlassFish Server configured in Eclipse. Now, I need to add a project to its classpath: I go to Run Configurations -> Glassfish -> "Glassfish 3.1.2. at localhost" (the current server). Now, as you can see from the image attached, I cannot select any server as it seems there's no server in the dropdown menu.

I'd like to select the server and then go to "Classpath" and add the project... Anyone can help me?

What sounds strange to me is that when I run my web app, it runs on that server... So why can't I see it from Run Configuration?

Thanks to anyone can help, AN

回答1:

You likely a target runtime configured for GlassFish, but not a server instance. The launch configurations dialog isn't the right place for managing your servers. You need to do this via Servers view. In the Servers view, you can create a new server instance, assign projects to it, start/stop server, publish, etc.

If the Servers view is not visible for you currently, find it via Window -> Show View.