See the thread GlassFish Tools does not provide a Server Runtime for Java Build Path in the Oracle forum.
Summary: They no longer provide a "Server Runtime" for plain Java projects. Instead, the project needs to be a faceted project and have a target runtime.
To configure this, do the following:
- Go to the project properties > Project Facets
- If necessary, click on Convert to faceted form...
- In the Runtimes tab, select GlassFish 3.1
In case you need to export the GlassFish libraries to dependent projects, also do the following:
- In Project Facets properties, select Utility Module and click Apply
- In Java Build Path > Order and Export, select GlassFish System Libraries
见:http://stackoverflow.com/questions/17204096/glassfish-server-library-not-available-in-eclipse-kepler