How To: Deploying applications on WebLogic using command line

This article is a quick reference on how to deploy applications to WebLogic server using command line interface.

Set classpath as follows:
set CLASSPATH=C:\Weblogic\Middleware\wlserver_10.3\server\lib\weblogic.jar

To deploy from your local desktop (remote):

To deploy a WAR file:
java weblogic.Deployer -adminurl <<admin server host:port>> -user weblogic -password ulorcl123$ -deploy C:\JDeveloper\mywork\myApp\deploy\myApp.war -remote -upload
To redeploy a WAR file:
java weblogic.Deployer -adminurl <<admin server host:port>> -user weblogic -password ulorcl123$ -redeploy -source C:\JDeveloper\mywork\myApp\deploy\myApp.war -remote -upload -name myApp.war

Common Errors:

'ModuleArchive' cannot be null
Make sure the source parameter is specified in the redeploy command

Please share your feedback below. Hope you find this helpful!