stub文件是要和class文件放在一起的。
解决方案 »
- mysql MYISAM表 多线程 单线程插入 性能
- Java解析HTML问题 急。。。。。。
- tomcat6.0配置manager用户名密码问题
- 如何生成war包
- 网站数据全站静态化。数据库是压力轻了。但是产生了大量.html
- EJB3.0+jboss4.2.4GA部署在不同机器上运行出现找不到指定服务器?请大家不吝赐教,不胜感激!
- 同时支持jsp,servlet,struts,ejb的运行 需要配置什么环境呢?
- 小弟要学习j2ee;大家推荐关注什么应用服务器最好!jboss,weblogic,websphere,sunapp,。。。100分相送!
- 关于css在jsp中应用发布平台是weblogic
- 如何对adode Reader6.0进行二次开发?
- 如何设计购物车
- 高手帮忙:高手门帮我看看我用servlet调用JSP的虚拟目录下的web.xml文件是否配置正确?
1.
problem: You get a "class not found" error when running rmic
solution: Add the current directory to your classpath.2.
problem: You get the following error when running the clientException occured: java.rmi.UnmarshalException: Return value class not found; nested exception is:
java.lang.ClassNotFoundException: myRMIImpl_Stubsolution: The file myRMIImpl_Stub.class must be deployed with your client application (that is, you must place it somewhere in the classpath of the client machine; If you were using an applet as a client, you would place it in the directory specified in the CODEBASE parameter to achieve the same effect).3.
problem: You get the following error when running the clientC:\test3>java myRMIClient 127.0.0.1
Exception occured: java.security.AccessControlException: access denied (java.net
.SocketPermission 127.0.0.1:1099 connect,resolve)or the following when running the server
C:\test3>java myRMIServer
Exception occurred: java.security.AccessControlException: access denied (java.ne
t.SocketPermission 127.0.0.1:1099 connect,resolve)solution: I experienced this problem under Java2 with the default security policy in place. You'll need to modify your security policy to allow these activities to take place. A full writeup on this is available at The Sun RMI tutorial page.
In summary, you'll need to do the following:
(1)Create a new security policy file. See your JDK docs or the links referenced from the Sun RMI tutorial for more information on this.
(2)When you run the client or the server, pass the location of your new security policy file in as an argument. This allows you to run under a new policy without having to modify your system policy files. Here is a .policy file that grants all permissions to everybody. DO NOT install this policy file in a production system. However, you can use it in trivial testing. You can then run the server with the command line
java -Djava.security.policy=c:\test3\wideopen.policy myRMIServer
or the client with
java -Djava.security.policy=c:\test3\wideopen.policy myRMIClient 127.0.0.1
Of course, you'd replace c:\test3\wideopen.policy with the full path to your own properties file.
Here is another policy file that includes only the permissions necessary to run this app.