问题
I thought that Glass Fish server came with Eclipse when you install the Glass fish tools for Java EE. However, after trying to install the Glass fish tools, it said there was nothing to update. Ok, so when I try to start the server, it asks for the server root. Does the glass fish server come with Eclipse? If so, how would I locate it? Or if I need to install it on my computer, which I did, why does it not recognize the folder where I installed Glass fish server as a valid installation of Glass Fish Server? Thanks in advance for any help, Bruce
回答1:
Download the Glassfish4 and extract it. When adding glassfish server to the Eclipse locate the glassfish folder inside the Glassfish4 folder. And there you go. Eclipse EE doesn't come with any server, only with tools for EE development.
回答2:
After installing 'GlassFish Tools for Luna' from marketplace, get glassfish-4.0.zip, extract it (folder glassfish4 appeared). Select Window - Preferences - Server - Runtime Environment - Add..., select GlassFish4 - Next, specify Server Root as absolute path glassfish subfolder for glassfish4 folder that appeared after extract (like /home/(username)/glassfish4/glassfish - I use Xubuntu). Click Finish. Setup is completed.
来源:https://stackoverflow.com/questions/26723197/how-do-i-use-glass-fish-server-with-eclipse-luna-for-java-ee