= JakartaEE = Successor of JavaEE/JEE that moved to Eclipse. The packages names moved from '''javax''' to '''jakarta.'''. * https://start.jakarta.ee/ == Jakarta EE 10 - run in docker == Go to https://start.jakarta.ee/ and generate a starter zip with: * '''Jakarta EE version''' Jakarta EE 10 * '''Jakarta EE version''' Jakarta EE profile Platform * '''Java SE version''' Java SE 17 * '''Runtime''' WildFly * '''Docker''' support yes * Click on '''Generate''' to create jakartaee-hello-world.zip {{{#!highlight sh cd ~/Downloads/ mv jakartaee-hello-world.zip /tmp/ cd /tmp/ unzip jakartaee-hello-world.zip cd jakartaee-hello-world/ mvn -version # Apache Maven 3.6.3 sudo apt install openjdk-17-jdk java -version # openjdk version "17.0.6" 2023-01-17 mvn clean install docker build -t jee-image . docker run -d --rm -p 8080:8080 -p 9990:9990 --name app jee-image docker exec -it app bash cd /opt/jboss/wildfly/bin sh add-user.sh admin admin # Updated user 'admin' to file '/opt/jboss/wildfly/standalone/configuration/mgmt-users.properties' # Updated user 'admin' to file '/opt/jboss/wildfly/domain/configuration/mgmt-users.properties' Open http://localhost:9990/console/index.html exit curl http://localhost:8080/jakartaee-hello-world/rest/hello?name=userx # {"hello":"userx"} curl http://localhost:8080/jakartaee-hello-world/ docker exec -it app bash java -version # openjdk version "17.0.7" 2023-04-18 pwd /opt/jboss/wildfly find . -name *war #./standalone/tmp/jakartaee-hello-world.war #./standalone/deployments/jakartaee-hello-world.war exit # http://localhost:9990/console/index.html#standalone-server # Product Name WildFly Full # Product Version 28.0.1.Final }}} === Change code === In '''src/main/java/org/eclipse/jakarta/hello/HelloWorldResource.java''' change '''@Path("hello")''' to '''@Path("helloworld")''' . In '''src/main/webapp/index.html''' change '''rest/hello''' to '''rest/helloworld''' . {{{#!highlight sh mvn clean install docker cp target/jakartaee-hello-world.war app:/opt/jboss/wildfly/standalone/deployments/jakartaee-hello-world.war # http://localhost:8080/jakartaee-hello-world/rest/helloworld # http://localhost:8080/jakartaee-hello-world/rest/helloworld?name=aaa }}}