This week's book giveaway is in the Testing forum.
We're giving away four copies of Data Structures the Fun Way: An Amusing Adventure with Coffee-Filled Examples and have Jeremy Kubica on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Client Class Not Found By Server

Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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/ -Djava.rmi.server.codebase=file:/home/gogol/MyProjects/FileClient/ client.Client 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 read)
(java.util.PropertyPermission read)
(java.util.PropertyPermission java.vm.vendor read)
(java.util.PropertyPermission path.separator read)
(java.util.PropertyPermission 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 read)
(java.util.PropertyPermission java.specification.version read)
(java.util.PropertyPermission java.specification.vendor read)

access: access allowed ( 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.
Tell me how it all turns out. Here is a tiny ad:
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic