Running Client part of Java Enterprise Application using a batch file

Below is a simple way of running the client part of a J2EE application, by creating a batch file. Some assumtions made are :

1. JDK is installed on the Computer

2. Glassfish is installed and the EJB module deployed

To create a batch file, open notepad.exe, type your need commands and save your file as filename.bat

Below is the content of the batch file

Rem the portion below starts the Glassfish server if it has been shutdown

cd C:\Sun\SDK\lib
call “C:\Sun\SDK\config\asenv.bat”
call “%AS_INSTALL%\bin\asadmin.bat” start-domain domain1

goto e

Rem the portion below call the jar file, by going to its directory and

Rem calling the full class name (including package name of the start up file

cd c:\
cd C:\sabon\eduSSS
appclient -client EducationSSSClient.jar -mainclass com.sabonay.educationSss.ui.LoginForm
goto end


Below is a picture after running the script