This content has been marked as final. Show 4 replies
The Registry can't find the class named in the exception.1 person found this helpful
I've copied the ellusive class's .java file into C:\Nobody cares about the .java file. The codebase is a list of places to find +.class+ files.
And if the application is distributed, does the codebase "file://C:/" have the same meaning to all parties? Normally a codebase is the HTTP URL of a JAR file, or indeed a space-separated list of such.
And the server doesn't need a security manager unless it is going to upload classes from the client's codebase.
Yes, after posting I guessed it might want the .class file instead, so I directed it their instead - still no joy, unfortunately!
I'm carrying out all testing on one computer, so (+if+ I could get it to work) a local codebase address would not be a problem.
Noted about the server-side security manager. I might want to use callbacks, but the server still won't need to download class files from the client, so I'll still try and set the codebase, but will try without loading a security manager on the server-side.
For the time being I've put the class in the shared library but have defined it within the same package as the server code. By doing this I've been able to set the class's accessibility back to default, but the client can still access it as Object (from the shared library).
This solution is good enough, but I still wonder why the client refuses to accept the class file from the C:\ codebase.
I don't know what this business is about the class's accessibility, or why you had to change the package to do so. You need to make a .jar file consisting of all the shared downloadable code and you need to describe its location via a codebase URL that means the same thing to the server, the Registry, and the client. Sounds like you have just done most if not all of that.1 person found this helpful
I only changed the package so that the class methods could be accessed from the server side (with package accessibility), but not from the client side.
I'll try putting the .class file in a .jar and feeding that to the codebase and if that doesn't work, I'll stick with my work around.
Thanks for your help EJP!