当前位置: 技术问答>java相关
使用jbuilder7中的RMI例子,报错!到底是什么原因?
来源: 互联网 发布时间:2017-04-06
本文导语: RMI例子:C:Program FilesJBuilder7samplesRMI 提示信息: C:Program FilesJBuilder7jdk1.3.1binjavaw -classpath "C:Program FilesJBuilder7samplesRMIclasses;C:Program FilesJBuilder7jdk1.3.1demojfcJava2DJava2Demo.jar;C:Program FilesJBuilder7jdk1.3.1jrelibi18n.jar;C:Program Fil...
RMI例子:C:Program FilesJBuilder7samplesRMI
提示信息:
C:Program FilesJBuilder7jdk1.3.1binjavaw -classpath "C:Program FilesJBuilder7samplesRMIclasses;C:Program FilesJBuilder7jdk1.3.1demojfcJava2DJava2Demo.jar;C:Program FilesJBuilder7jdk1.3.1jrelibi18n.jar;C:Program FilesJBuilder7jdk1.3.1jrelibjaws.jar;C:Program FilesJBuilder7jdk1.3.1jrelibrt.jar;C:Program FilesJBuilder7jdk1.3.1jrelibsunrsasign.jar;C:Program FilesJBuilder7jdk1.3.1libdt.jar;C:Program FilesJBuilder7jdk1.3.1libhtmlconverter.jar;C:Program FilesJBuilder7jdk1.3.1libtools.jar" -Djava.rmi.server.codebase=file:/opt/JBuilder7/samples/RMI/classes/ -Djava.security.policy=file:/opt/JBuilder7/samples/RMI/SimpleRMI.policy com.borland.samples.rmi.SimpleRMIServer
Exception occurred: java.rmi.RemoteException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
提示信息:
C:Program FilesJBuilder7jdk1.3.1binjavaw -classpath "C:Program FilesJBuilder7samplesRMIclasses;C:Program FilesJBuilder7jdk1.3.1demojfcJava2DJava2Demo.jar;C:Program FilesJBuilder7jdk1.3.1jrelibi18n.jar;C:Program FilesJBuilder7jdk1.3.1jrelibjaws.jar;C:Program FilesJBuilder7jdk1.3.1jrelibrt.jar;C:Program FilesJBuilder7jdk1.3.1jrelibsunrsasign.jar;C:Program FilesJBuilder7jdk1.3.1libdt.jar;C:Program FilesJBuilder7jdk1.3.1libhtmlconverter.jar;C:Program FilesJBuilder7jdk1.3.1libtools.jar" -Djava.rmi.server.codebase=file:/opt/JBuilder7/samples/RMI/classes/ -Djava.security.policy=file:/opt/JBuilder7/samples/RMI/SimpleRMI.policy com.borland.samples.rmi.SimpleRMIServer
Exception occurred: java.rmi.RemoteException: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
|
你没设置好classpath.
|
JBuilder-->tools-->RMIRegistry-->启动例子;
再不行,修改.java.policy属性文件。
再不行,修改.java.policy属性文件。
|
JBuilder-->工程栏-->***IMpl.java文件-->properties-->build-->RMI-->RMI compiler setting-->Option:-v1.1-->ok-->编译***IMpl