Create a new domain in Glassfish or Payara

Commands:

 

C:\Java\Servers\payara-4.1.2.181\payara41\bin>asadmin.bat create-domain --portbase 4900 domain2

C:\Java\Servers\payara-4.1.2.181\payara41\bin>asadmin.bat start-domain domain2

C:\Java\Servers\payara-4.1.2.181\payara41\bin> copy \path\to\existing\*.war ..\glassfish\domains\domain2\autodeploy

C:\Java\Servers\payara-4.1.2.181\payara41\bin> copy \path\to\existing\*.ear ..\glassfish\domains\domain2\autodeploy

 

URL:

WAR: http://localhost:4980/JavaEEHelloWorld_war/

EAR Web: http://localhost:4980/JavaEEHelloWorldWeb/

 

Notes:

If any error about JDK/JRE, it is needed to add a setting under glassfish\config\asenv.bat

set AS_JAVA=C:\Program Files\Java\jdk1.8.0_161

 

 

Screenshots:

1.      Create the domain

 

2.      Start the domain

 

3.      Access to the admin site

 

4.      Deploy the war/ear files

 

5.      Check the deployed apps.

 

 

Comments

Popular posts from this blog

Glassfish 4.1.2 Java EE functionalities - JMS

Install multiple Java on macOS