windows - Batch/cmd: stop glassfish, copy file, start glassfish -
my objective simple. have glassfish server. made change jar need put domains/lib folder. have stop-domain, copy file over, start domain. thought using batch file efficient way that; however, seem struggling.
here i've got
rem ##### set paths ##### set glassfish_home=c:\glassfish-4.1\bin set target_folder=c:\dummypath\target set domain_lib=c:\glassfish-4.1\glassfish\domains\domain1\lib set jar=dummyfile.jar pause rem ##### stop glassfish server ##### cd %glassfish_home% asadmin stop-domain rem ##### copy dataaccess jar ##### cd %target_folder% copy %jar% %domain_lib%\ rem ##### start glassfish server ##### cd %glassfish_home% asadmin start-domain
however, happening right seems stop domain, not proceed else. doesn't start again.
i've attempted comment out stop-domain , manually stopped it. ran batch file , copied file, started domain, did not close , remained on cmd screen "command start-domain executed successfully." message.
any insight why batch file doesn't run smoothly, appreciated!
asadmin
batch-file, invoking directly makes replace executed batch file (yours).
use call asadmin stop-domain
, call asadmin start-domain
instead.
Comments
Post a Comment