I m writing an rmi application. Everything works perfectly fine when i put the all classes in one directory. However, when i try to split the server part and the client part, it raises java.lang.ClassNotFoundException.myclasses It seems to be the Registry can t find that class on its CLASSPATH. I m wondering how to I solve this problem?
例外
原标题:java rmi exceptions
最佳回答
您是否在向客户和服务器提出论点时注明了班次目录?
领土:
服务器
关于太阳能操作系统:
java -classpath classDir -Djava.rmi.server.codebase=file:classDir/ example.hello.服务器 &
在Windows平台上:
start java -classpath classDir -Djava.rmi.server.codebase=file:classDir/ example.hello.服务器
一旦服务器就绪,客户可操作如下:
java -classpath classDir example.hello.Client where classDir is the root directory of the class file tree
http://java.sun.com/javase/6/docs/technotes/guides/rmi/hello/hello-world.html#5
问题回答
登记处将客户界面与服务器安装班连接起来。 在客户方面,你需要将接口类别定义列入班次。
此外,客户根本不应提及执行类别——所有事项都应列入接口/安装类别。
如果这不成问题,你就更具体,至少提供一些东西。
相关问题
热门标签
- winforms
- combobox
- fogbugz
- java
- date
- internationalization
- asp.net
- iis
- url-rewriting
- urlrewriter
- c#
- enums
- ocaml
- haxe
- algorithm
- string
- viewstate
- .net
- c++
- c
- symbol-table
- mysql
- database
- postgresql
- licensing
- migration
- vb.net
- vb6
- declaration
- vb6-migration
- python
- psycopg2
- backup
- vmware
- virtualization
- gnu-screen
- authentication
- desktop
- excel
- xll
- cultureinfo
- regioninfo
- oracle
- client
- session
- download
- html
- virtual
- constructor
- scenarios
- perl
- full-text-search
- javascript
- ajax
- testing
- oop
- inheritance
- vim
- encapsulation
- information-hiding