1 2 Previous Next 16 Replies Latest reply: Aug 16, 2010 11:51 PM by 843793 Go to original post RSS
      • 15. Re: RMI application deployment issues
        EJP
        I have 2 jar files as that makes the most sense for my program
        No. Three jars makes most sense, for any RMI program.
        ... a client.jar containing all of the client and base class files including all of the interfaces. There is the server.jar including all of the implementations and stubs for the server and its components.
        So the server jar depends on the client jar for its remote interfaces? Or has another copy of them? From what follows it is clearly the latter.
        I have released the server on address [http://cbarton.mine.nu/WordMoleServer.jar] and updated its codebase when I run it as
        java -jar -Djava.security.policy=security.policy -Djava.rmi.server.codebase=http://cbarton.mine.nu/WordMoleServer.jar WordMoleServer.jar
        for the server.
        Pointless. The server already has its own classpath. The codebase feature is for classes you want to download to the client that aren't already at the client. If server.jar just contains the server .class files, putting it on the Internet is the last thing you want to do. All you are acheiving here is (a) security breach of your server implementation .class files and (b) a potential class-loading problem because you have the remote interfaces in two places, the client jar file and the server jar file, contrary to what I've said several times about having three jar files. With the structure you have, you clearly don't need the codebase feature at all: turn it off.
        The security.policy is in direct los of the home dir, so the policies should be found, yet I receive that same debugging error...
        The security policy that is in effect is printed in the security debug output. If it isn't what you expect, debug that.
        • 16. Re: RMI application deployment issues
          843793
          Ejp,

          Thank you for all of your support but I have decided to postpone my development of the multiplayer part of my application and focus efforts on its website.

          I will come back when I revisit the RMI.

          cbarton.a
          1 2 Previous Next