eclipse联调步骤
- 下载项目jar包
运行jnlp文件并登录PD,保证C:.FTPC\项目\ProductionCentre下的client和jars文件夹下的jar包都下载完成 - 下载项目源码到Eclipse
- 添加jar包
a. 右键项目选择Buid Path->Configure Buid Path,选中Libries
b. 选择Add External JARS
c. 分别添加C:.FTPC\YC_UAT\ProductionCentre\client和jars\ProcessDesigner下所有jar包
d. 添加JRE
4. 配置Java Application
配置内容如下:
//固定顺序,不能调整
remote://ip:8080 http://ip
http://ip DEBUGACTIVITY 账号 密码
-Xmx1024M
-Djboss-ejb-client.reconnectOnAuthenticationFailures=false
-Dsun.locale.formatasdefault=true
-Djava.net.preferIPv4Stack=true
-Dcom.datasweep.plantops.j2eevendor=JBoss
-Dorg.apache.activemq.SERIALIZABLE_PACKAGES=*
-DuiDefaultButtonFollowFocus=false
-Drockwell_client_dir="C:/.FTPC/项目名"
-Djava.library.path="C:\.FTPC\项目名\ProductionCentre\client\RNNativeLibsWin32.jar"
eclipse联调时jar包不会下载到.FTPC下,会下载到C:\Users\liuhongbin\AppData\Roaming\Rockwell Automation\FactoryTalk ProductionCentre\jars\ProcessDesigner目录下,切换环境会删除此目录下原环境的jar,下载新环境的jar;
配置-Drockwell_client_dir=“C:/.FTPC/YC_UAT” 可以指定jar包位置,可以避免这种情况。
Java Web Start 11.60.2.27
使用 JRE 版本 1.8.0_60-b27 Java HotSpot(TM) Client VM
用户主目录 = C:\Users\liuhongbin
----------------------------------------------------
c: 清除控制台窗口
f: 终结在结束队列上的对象
g: 垃圾收集
h: 显示此帮助消息
m: 打印内存使用情况
o: 触发日志记录
p: 重新加载代理配置
q: 隐藏控制台
r: 重新加载策略配置
s: 转储系统和部署属性
t: 转储线程列表
v: 转储线程堆栈
0-5: 设置跟踪级别为<n>
----------------------------------------------------
C:/.FTPC\YC_UAT\new_webstart.properties downloaded size 9014
C:/.FTPC\YC_UAT\new_custom.properties downloaded size 85
FactoryTalk ProductionCentre WebStart: Product Version: 10.4.106955
FactoryTalk ProductionCentre WebStart: J2EE Vendor(leon): JBoss
FactoryTalk ProductionCentre WebStart: CodeBaseURL: http://10.4.20.165:8080/PlantOperations/
FactoryTalk ProductionCentre WebStart: HTTP Address: http://10.4.20.165:8080
FactoryTalk ProductionCentre WebStart: appName: pd
launchApp appName pd
FactoryTalk ProductionCentre WebStart: LaunchView.processTask runs in javawsApplicationMain
FactoryTalk ProductionCentre WebStart: Launching Process Designer: "C:/.FTPC/YC_UAT/ProductionCentre/jre/bin/java.exe" -cp "C:/.FTPC/YC_UAT/ProductionCentre/client/Client.jar" -Xmx1024M -Djboss-ejb-client.reconnectOnAuthenticationFailures=false -Dsun.locale.formatasdefault=true -Djava.net.preferIPv4Stack=true -Dcom.datasweep.plantops.j2eevendor=JBoss -Dorg.apache.activemq.SERIALIZABLE_PACKAGES=* -DuiDefaultButtonFollowFocus=false -Drockwell_client_dir="C:/.FTPC/YC_UAT" -Djava.ext.dirs="C:/.FTPC/YC_UAT/ProductionCentre/jre/lib/ext";"C:/.FTPC/YC_UAT/ProductionCentre/client";"C:/.FTPC/YC_UAT/ProductionCentre/client/RNNativeLibsWin32.jar";"C:/.FTPC/YC_UAT/ProductionCentre/custom" com.datasweep.compatibility.buildtime.Buildtime remote://10.4.20.165:8080 http://10.4.20.165:8080 http://10.4.20.167:8082/PlantOpsDownloads
appName: ProcessDesigner
javaCommand: "C:/.FTPC/YC_UAT/ProductionCentre/jre/bin/java.exe" -cp "C:/.FTPC/YC_UAT/ProductionCentre/client/Client.jar" -Xmx1024M -Djboss-ejb-client.reconnectOnAuthenticationFailures=false -Dsun.locale.formatasdefault=true -Djava.net.preferIPv4Stack=true -Dcom.datasweep.plantops.j2eevendor=JBoss -Dorg.apache.activemq.SERIALIZABLE_PACKAGES=* -DuiDefaultButtonFollowFocus=false -Drockwell_client_dir="C:/.FTPC/YC_UAT" -Djava.ext.dirs="C:/.FTPC/YC_UAT/ProductionCentre/jre/lib/ext";"C:/.FTPC/YC_UAT/ProductionCentre/client";"C:/.FTPC/YC_UAT/ProductionCentre/client/RNNativeLibsWin32.jar";"C:/.FTPC/YC_UAT/ProductionCentre/custom" com.datasweep.compatibility.buildtime.Buildtime remote://10.4.20.165:8080 http://10.4.20.165:8080 http://10.4.20.167:8082/PlantOpsDownloads
StreamRedirector ERROR_ProcessDesigner started.
StreamRedirector OUT_ProcessDesigner started.
loadLibrary jdic in BuildTime ...Thread-0
eclipse联调报错
报错1
eclispe启动PD时报错:
Can’t load IA 32-bit .dll on a AMD 64-bit platform
详细如下:
Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: C:\.FTPC\YCLJMES_DEV\ProductionCentre\client\RNNativeLibsWin32.jar\jdic.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1938)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1854)
at java.lang.Runtime.loadLibrary0(Runtime.java:870)
at java.lang.System.loadLibrary(System.java:1122)
at com.datasweep.compatibility.buildtime.Buildtime$90.run(Unknown Source)
这是因为使用了64位的jdk,需要更换为32位的jdk
报错2
eclispe启动PD时报错:Premature end of file.
详情如下:
严重: ActivityList.loadClientActivities error:Parsing Error : Premature end of file.
Line : -1
Column : -1
通常有两种情况会导致这种错误:
第一种:被解析的内容为空字符串
第二种:被解析的内容只有一行如:<?xml version=”1.0″ encoding=”UTF-8″?>
检查"C:\Users\xxx\AppData\Roaming\Rockwell Automation\FactoryTalk ProductionCentre\jars\ProcessDesigner\AddOnInfo.xml" 是否正常,
如果为空,复制文件"C:.FTPC\ProductionCentre\jars\ProcessDesigner\AddOnInfo.xml"
覆盖原先的文件。