{"id":13787784,"url":"https://github.com/javaee/j1-hol","last_synced_at":"2025-05-12T02:30:27.489Z","repository":{"id":93529642,"uuid":"102342156","full_name":"javaee/j1-hol","owner":"javaee","description":"Java EE 8 Hands On Lab","archived":true,"fork":false,"pushed_at":"2018-10-15T01:30:16.000Z","size":2360,"stargazers_count":24,"open_issues_count":1,"forks_count":8,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-11-18T01:39:14.367Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/javaee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-09-04T09:13:08.000Z","updated_at":"2023-01-28T19:09:19.000Z","dependencies_parsed_at":"2023-04-12T05:34:22.706Z","dependency_job_id":null,"html_url":"https://github.com/javaee/j1-hol","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javaee%2Fj1-hol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javaee%2Fj1-hol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javaee%2Fj1-hol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javaee%2Fj1-hol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javaee","download_url":"https://codeload.github.com/javaee/j1-hol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253662519,"owners_count":21944090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T21:00:30.921Z","updated_at":"2025-05-12T02:30:26.950Z","avatar_url":"https://github.com/javaee.png","language":"Java","funding_links":[],"categories":["Java EE 8 learning resources"],"sub_categories":[],"readme":"# Java EE 8 Hands On Lab\n\n## Table of contents\n\n* [Initial setup](#initial-setup)\n* [Exercise 1 : JSON-B 1.0 and Bean Validation 2.0](ex-jsonb-beanval.md)\n* [Exercise 2 : Jakarta EE Security API](ex-security.md) \n* [Exercise 3 : Servlet 4 and HTTP/2 Support](ex-servlet.md)\n* [Exercise 4 : JAX-RS 2.1 and CDI 2.0]()\n* [Credits](#Credits)\n\n\n## Initial setup\n\nDuring this \"Bring Your Own Laptop\" Lab, you will use NetBeans 8.2 and GlassFish 5, the open source Java EE reference implementation to test some of the new Java EE 8 APIs. \n\nGlassFish 5 is today the only Java EE 8 compatible application server. Over time,  this will change as implementors will add support to Java EE 8 to their application servers. This lab will then also work on those application servers.\n\n### Install Java SE 8 JDK\n\n:bulb: Java EE 8 requires Java SE 8 or above. For JavaOne, we will use the latest JDK 8 release.\n\n:warning: Java EE requires the JDK not just a JRE!\n\n:warning: GlassFish 5.0 is today only supported on Java SE 8; do not use Java SE 9! GlassFish 5.0.1 will add support Java SE 9.\n\nIf you don't have a recent JDK 8 installed on your laptop, download and install [Java SE 8 Development Kit 8u144](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html).\n\n\n### Install GlassFish\n\nDownload the [final version of GlassFish 5.0](http://download.oracle.com/glassfish/5.0/release/glassfish-5.0.zip). To install it, just unzip the archive into a target directory. Take a moment to note the directory where GlassFish 5 is installed as this path will be required in the next step.\n\nYou can now start GlassFish 5...\n```\ncd glassfish5\nbin/asadmin start-domain domain1\n```\n\nAfter a few seconds, you should see the following...\n```\nWaiting for domain1 to start ......\nSuccessfully started the domain : domain1\ndomain  Location: /Users/davidd/work/glassfish5/glassfish/domains/domain1\nLog File: /Users/davidd/work/glassfish5/glassfish/domains/domain1/logs/server.log\nAdmin Port: 4848\nCommand start-domain executed successfully.\n```\n\nYou can now connect to the GlassFish Admin Console on [http://localhost:4848](http://localhost:4848).\n\n### Install and configure NetBeans\n\nIf you have NetBeans 8.2 with Java EE support already installed on your machine, you can go directly to the NetBeans configuration step.\n\n### Install NetBeans\n\nDownload [NetBeans 8.2](https://netbeans.org/downloads/), make sure to download the *\"Java EE\"* bundle (*\"All\"* will also work). You can now install and launch NetBeans.\n\n![\"Download NetBeans\"](pic/pic0-nb.jpg)\n\n### Configure NetBeans\n\nNetBeans 8.2 comes with GlassFish 4.x (Java EE 7), we will now reconfigure NetBeans to use GlassFish 5 (Java EE 8) instead.\n\nIn NetBeans, select *\"Services\"* tab, *\"Servers\"* and right click to select *\"Add Server...\"*; this will open an *\"Add Server Instance\"* window. Name your instance, ex. *\"GlassFish 5\"* and click *Next*. Now in the install location, enter the directory where you have installed GlassFish 5 (see previous step). If everything goes well, NetBeans will confirm that a GlassFish 5.0 installation was found, you can now click *\"Next\"* and *\"Finish\"* to accept the default values.\n\n![\"Download NetBeans\"](pic/pic0-nbgf.jpg)\n\nYou should now see your *\"GlassFish 5\"* instance under *\"Servers\"*. Right click on it, you can now *\"Start\"* it if it is not started yet. After a few seconds you should see that GF5 is started in the NetBeans Output window at the bottom. \n\nYou can also connect to the GF Admin console ([http://localhost:4848](http://localhost:4848)] to confirm that GF is up and running.\n\n:bulb: If the *\"Start\"* option is greyed, just wait a few seconds or select \n*\"Refresh\"* first.\n\n![\"Start GF\"](pic/pic0-1.jpg)\n\n:bulb: When running a project, NetBeans will ask you which server you want to deploy this project on; make sure to always select *\"GlassFish 5\"* or set it as the default server.\n\n:bulb: GlassFish comes with a bundled database (Java DB aka Derby). Given that we are not using it, you can disable it to save a few cycles. Just right click on your GlassFish 5 instance, select *\"Properties\"* and make sure to disable the *\"Start Registered Derby Server\"* option. For our tests, it is also preferable to disable the *\"Preserve Sessions Across Redeployment\"* feature.\n\n![\"Configure GF\"](pic/pic0-nbgfConfig.jpg)\n\n\n### Clone the Lab GitHub repository\n\nThe only thing you have to do is to clone the Lab GitHub repository on your machine.\n\nIn NetBeans, choose *\"Team\", \"Git\", \"Clone...\"*\n\n![\"Team\", \"Git\", \"Clone...\"](pic/pic0-2.jpg)\n\n... and enter the URL (https://github.com/javaee/j1-hol.git) of the Lab GitHub repository to clone as below, keep the other default values.\n\n![\"Team\", \"Git\", \"Clone...\"](pic/pic0-3.jpg)\n\nSelect *\"Open Sources in Favourites\"* and *\"Finish\"*. You can check the clone operation in the \"Output\" windows, the cloned repository should also appear under the *\"Favourites\"* tab.\n\n![\"Open Sources in Favourites\"](pic/pic0-4.jpg)\n\n:bulb: Sometime when you will add code, NetBeans will complain (e.g. some \"imports\" are missing). Simply click on the yellow bulb on the left side of the code and NetBeans will, most of the time, provides you with suggestions on how to fix the issue.\n\n![\"NetBeans trick\"](pic/pic0-5.jpg)\n\nYou are now all set to do the [first exercise](ex-jsonb-beanval.md)!\n\n\n## Credits\n\nThis Java EE 8 Hands-on-Lab has been developed by [David Delabassee](https://twitter.com/delabassee) (Java EE Evangelist, Oracle), [David Heffelfinger](https://twitter.com/ensode) (Principal Consultant, Ensode Technology, LLC) and [Michael Nascimento Santos](https://twitter.com/mr__m) (CEO, Improving) for JavaOne 2017.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavaee%2Fj1-hol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavaee%2Fj1-hol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavaee%2Fj1-hol/lists"}