Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

142
Views
How to set up the JavaEE First Cup tutorial in eclipse?

I'm going through the tutorial (https://docs.oracle.com/javaee/7/firstcup/creating-example002.htm). I have Eclipse for EE developers (4.6.3) with Glassfish (4.x) properly configured in it.

I see the project folder under glassfish4\docs\firstcup but I don't know how to import it since the instructions are for Netbeans. If I try to "Open projects from file system" or a general import I get just the folder structure in the workspace and not with the right "flavor":

enter image description here

Then Glassfish doesn't recognize this as a resource that can be added. How do I do this in Eclipse?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I was stuck with the same problem.

Here are the steps I took to make it work.

  1. Skip the step where you have to open the firstcup project and build.
  2. When you have to create the dukes-age project and the firstcup-war project, go to File > New > Maven Project.
  3. Make sure the "Create a simple project (skip archetype selection)" option is unchecked. Click Next.
  4. On the next page, you have to select an archetype. Choose "All Catalogs" and type glassfish in Filter and you will see the 2 archetypes you need for the tutorial. select an archetype
  5. On the next page, you need to enter Group Id and Artifact Id. For the dukes-age project, type firstcup.dukesage.resource in Group Id and dukes-age for Artifact Id. Click Finish.
  6. You will notice that there's an error in your pom.xml file. Open it and edit by removing -SNAPSHOT from the line <version>8.0-SNAPSHOT</version>. Save.
  7. Right click the project in Project Explorer (the left pane). Go to Maven > Update Project.
  8. Skip the step to set the default URL for dukes-age. Instead, when you want to test your completed web service, go to http://localhost:8080/dukes-age/webapi/dukesAge/.

Note for the firstcup-war project. Before adding the project to the server, make sure you start Derby by running ./asadmin start-database inside glassfish5/bin. Otherwise, you have to remove the project from the server and add it back.

That's all. Other than that, everything is quite similar to the steps in the tutorial. Feel free to ask.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!