I'm new to JavaEE and GlassFish and all, but I was put on a team (at school) to update a glassfish based server we use to host programming competitions. I was given the eclipse project that worked last year, but many of the dependencies are missing (they had absolute paths set to the previous host's local drive) and I am out of contact with the person who hosted the server last year. I have most of the errors fixed and dependencies re-added but I am unable to launch due to one last error,
"Target runtime GlassFish 4.0 is not defined."
A number of google searches has gotten me almost nowhere and I cannot find anything about re-associating a glassfish project with the runtime.
Here are images of my current configuration (comment if you want to see more)

So, the big question, how do I fix this and re-associate this project with the runtime?
I had the same problem, and the same configuration. In the Project facets: 
Try to just enable Glassfish4.0 in the runtimes tab and apply it. Leave the rest as it was. It should look like this:

It looks like eclipse is using that by default, when it should use the other.
I hope it works for you too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With