DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

The software you build is only as secure as the code that powers it. Learn how malicious code creeps into your software supply chain.

Apache Cassandra combines the benefits of major NoSQL databases to support data management needs not covered by traditional RDBMS vendors.

Generative AI has transformed nearly every industry. How can you leverage GenAI to improve your productivity and efficiency?

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Related

  • From J2EE to Jakarta EE
  • Getting Started With Jakarta EE and Eclipse MicroProfile
  • Introducing Graph Concepts in Java With Eclipse JNoSQL, Part 2: Understanding Neo4j
  • Introducing Graph Concepts in Java With Eclipse JNoSQL

Trending

  • Using Python Libraries in Java
  • SaaS in an Enterprise - An Implementation Roadmap
  • Next Evolution in Integration: Architecting With Intent Using Model Context Protocol
  • Building Reliable LLM-Powered Microservices With Kubernetes on AWS
  1. DZone
  2. Coding
  3. Java
  4. Getting Started With Java EE 8, Payara 5 and Eclipse Oxygen

Getting Started With Java EE 8, Payara 5 and Eclipse Oxygen

Do you want to get a Java EE dev environment up quickly and painlessly? Let's look at getting it done with Payara and Eclipse IDE.

By 
Víctor Orozco user avatar
Víctor Orozco
·
Updated Jun. 07, 18 · Tutorial
Likes (6)
Comment
Save
Tweet
Share
30.5K Views

Join the DZone community and get the full member experience.

Join For Free

Some days ago, I had the opportunity/obligation to set up a brand new Linux (Gentoo) development box, hence to make it "enjoyable," I prepared a back to basics tutorial on how to set up a working environment.

Requirements

In order to set up a complete Java EE development box, you need at least a:

  1. Working JDK installation and environment

  2. IDE/text editor

  3. Standalone application server if your focus is "monolithic"

Due to personal preferences, I choose:

  1. OpenJDK on Gentoo Linux (Icedtea bin build)

  2. Eclipse for Java EE developers

  3. Payara 5

Installing OpenJDK

Since this is a distribution dependent step, you could follow tutorials on Ubuntu, CentOS, Debian and many more distributions if you need to. At this time, most application servers have Java 8 as their target due to the new Java-LTS version scheme, as in the case of Payara.

For Gentoo Linux, you could get a new OpenJDK setup by installing dev-java/icedtea for the source code version and dev-java/icedtea-bin for the precompiled version.

emerge dev-java/icedtea-bin


Is OpenJDK a Good Choice for My Needs?

Currently, Oracle has plans to free up all enterprise-commercial JDK features. In the near future, the differences between OracleJDK and OpenJDK should be zero.

In this line, Red Hat and other big players have been offering OpenJDK as the standard JDK in Linux distributions, working flawlessly for many enterprise-grade applications.

Eclipse for Java EE Developers

After a complete revamp of the website's GUI, you can go directly to eclipse.org and download Eclipse IDE.

Eclipse offers collections of plugins called Packages — each package is a collection of common plugins aimed for a particular development need. Hence to simplify the process, you could download Eclipse IDE for Java EE Developers.

On Linux, you will download a .tar.gz file, hence you should uncompress it in your preferred directory.

tar xzvf eclipse-jee-oxygen-3a-linux-gtk-x86_64.tar.gz


Finally, you could execute the IDE by entering the bin directory and launching the eclipse binary.

cd eclipse/bin
./eclipse


The result should be a brand new Eclipse IDE.

Payara

You can grab a fresh copy of Payara by visiting the payara.fish website.

From Payara, you will receive a ZIP file that again you should uncompress in your preferred directory.

unzip payara-5.181.zip


Finally, you could add Payara's bin directory to the PATH variable in order to use the asadmin command from any CLI. You could achieve this by using a ~/.bashrc file. For example, if you installed Payara at ~/opt/, the complete instruction is:

echo "PATH=$PATH:~/opt/payara5/bin" >> ~/.bashrc


Integration between Eclipse and Payara

After unzipping Payara, you are ready to integrate the app server in your Eclipse IDE.

Recently and due to the Java/Jakarta EE transition, the Payara Team has prepared a new integration plugin compatible with Payara 5. In the past, you would also use Glassfish Developer Tools with Payara, but this is not possible anymore.

To install it, simply grab the following button on your Eclipse Window, and follow wizard steps.

Drag to your running Eclipse* workspace. *Requires Eclipse Marketplace Client


In the final step, you will be required to restart Eclipse, after that you still need to add the application server. Go to the Servers tab and click create a new server:

Select the Payara application server:

Find Payara's install location and JDK location (corresponding to ~/opt/payara5 and /opt/icedtea-bin on my system):

Configure Payara's domain, user, and password.

In the end, you will have Payara server available for deployment:

Test the Femo Environment

It's time to give it a try. We could start a new application with a Java EE 8 archetype, one of my favorites is Adam Bien's javaee8-essentials-archetype, which provides you an opinionated essentials setup.

First, create a new project and select a new Maven Project:

In Maven's window, you could search, by name, any archetype in Maven Central, but you should wait a little bit for synchronization between Eclipse and Maven.

If waiting is not your thing, you could also add the archetype directly:

This archetype also creates a new JAX-RS application and endpoint. After some minor modifications, just deploy it to Payara 5 and see the results:


Java EE Eclipse Java (programming language)

Published at DZone with permission of Víctor Orozco. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • From J2EE to Jakarta EE
  • Getting Started With Jakarta EE and Eclipse MicroProfile
  • Introducing Graph Concepts in Java With Eclipse JNoSQL, Part 2: Understanding Neo4j
  • Introducing Graph Concepts in Java With Eclipse JNoSQL

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!