What mean java -cp in bash and how to rewrite it in batch
285 观看
1回复
109 作者的声誉
Hello I need to write Batch script to deploy webapp to Weblogic server domain via WLST in Jenkins. In this article Bash script to deploy webapp to Weblogic server domain via WLST written code in bash. I don't understand what mean "/usr/bin/java -cp ***.jar ... " and how to rewrite it in bath script.
#!/bin/bash
HOST_NAME=${1-localhost}
HOST_USER=${2-weblogic}
HOST_PASS=${3-welcome1}
HOST_PORT=${4-7001}
SCRIPT_HOME="$(dirname $(readlink -f $0))"
WL_JAR="${SCRIPT_HOME}/middleware/wlserver_10.3/server/lib/weblogic.jar"
JAM_JAR="myapp.war"
function agentDeployer()
{
/usr/bin/java -cp ${WL_JAR} weblogic.Deployer -adminurl t3://${HOST_NAME}:${HOST_PORT} -user ${HOST_USER} -password ${HOST_PASS} -targets ${SERVER_LIST} -deploy -upload ${JAM_JAR}
}
agentDeployer
作者: Vadim
的来源
发布者: 2017 年 12 月 27 日
回应 1
1像
410 作者的声誉
-cp stands for Class Path,you specify the locations of the class needed by the application
java- cp ==>java will search to find the class files as they are needed by the program.
You don't need to rewrite in batch script, i mean the command java -cp, because it's the same.
Good Luck !!
作者: Hatim 发布者: 2017 年 12 月 27 日来自类别的问题 :
- bash 如何解析shell脚本中的符号链接
- bash 删除bash中除最新X文件以外的所有文件
- bash Parallelize Bash script with maximum number of processes
- bash 如何在bash中编写for循环
- batch-file 如何将参数传递给批处理文件?
- batch-file 如何在Windows中的变量中获取命令的结果?
- batch-file 如何在批处理文件中回显换行符?
- batch-file 通过批处理或cmd文件停止并启动服务?
- jenkins 让詹金斯(哈德森)的工作取决于另一份工作
- jenkins 如何清除Jenkins / Hudson构建历史记录?
- jenkins 使用nltk.data.load加载english.pickle失败
- jenkins 仅当特定文件集发生更改时,如何触发构建
- weblogic Tomcat与Weblogic JNDI查找
- weblogic 在Weblogic中获取Hibernate EntityManagerFactory时出现问题(EJB3应用程序)
- weblogic 在weblogic中使用外部属性文件
- weblogic 如何检查应用程序是否部署在特定的受管服务器上?
- wlst 无法在python中导入getpass
- wlst WLST - 强制停止应用
- wlst 使用WLST创建SOA EDG域