wood burning stoves 2.0*
The moose likes Distributed Java and the fly likes Client Class Not Found By Server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Client Class Not Found By Server" Watch "Client Class Not Found By Server" New topic
Author

Client Class Not Found By Server

Aniruddha Mukherjee
Greenhorn

Joined: Aug 01, 2011
Posts: 3
Hello Everyone,

I am creating a client-server java rmi application, which copies a particular file from Server to Client.
Server is running on windows 7 and client on Linux.
I have sorted most of the things by myself and I am able to connect to the server through the client but there is a class files in my client machine which the server needs to load.
Now when I am starting the client with -Djava.rmi.server.codebase=file:/home/gogol/MyProjects/FileClient/ (which is where one of my client class file is loacted) the server(Which is in Windows) seems to look for that class in C:/home/gogol/MyProjects/FileClient/ (mixing up the windows directory structure with linux) and obviously the class is not found.

This is how I start My Client
sudo java -cp /home/gogol/MyProjects/FileClient/compute.jar:/home/gogol/MyProjects/FileClient/clientengine.java -Djava.rmi.server.codebase=file:/home/gogol/MyProjects/FileClient/ -Djava.security.policy=Gatekeeper.policy client.Client 192.168.1.3 C:\Users\GOGOL\Desktop\gogoljava\Objects.txt /home/gogol/MyProjects/output.txt

where client.Client is the Client Program.

By looking at the debug information of the Server, the Server execution stops at
(java.util.PropertyPermission java.vm.name read)
(java.util.PropertyPermission os.name read)
(java.util.PropertyPermission java.vm.vendor read)
(java.util.PropertyPermission path.separator read)
(java.util.PropertyPermission java.specification.name read)
(java.util.PropertyPermission os.version read)
(java.util.PropertyPermission os.arch read)
(java.util.PropertyPermission java.class.version read)
(java.util.PropertyPermission java.version read)
(java.util.PropertyPermission file.separator read)
(java.util.PropertyPermission java.vendor read)
(java.util.PropertyPermission java.vm.specification.name read)
(java.util.PropertyPermission java.specification.version read)
(java.util.PropertyPermission java.specification.vendor read)
)


access: access allowed (java.io.FilePermission C:\home\gogol\MyProjects\FileClie
nt\client\GetFile.class read)


Please see the last line clearly it is searching my GetFile class in a wrong location with wrong format.

Please suggest me a way to overcome this problem using codebase as "file:" string only.

Many Many thanks for your time and help.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Client Class Not Found By Server
 
Similar Threads
Command line synthax
acces denied
Problem loading policy file programmatically
Problem with Sun's Bootstraping Example
acces denied java.io.FilePermission