This week's book giveaway is in the Cloud forum.
We're giving away four copies of The Business Blockchain and have William Mougayar on-line!
See this thread for details.
Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about dynamic downloading.....please

 
Ken Kirin
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I almost finished the assignment but I want to make sure I understand some of the assignment requirement correctly. My question is about the dynamic downloading. The assignment stated that

You must provide all classes pre-installed so that no dynamic downloading occurs

I decided to start RMI registry programmactically.A remote implementation class is trying to create the RMI registry, if it already existed, just get it


My RemoteDataAccessFactory class at the client-side will try to get this remote object from


So
  • I didn't start RMI registry using rmiregistry <port_number> command line.
  • I compiled my source code without using the codebase property ( -Djava.rmi.server.codebase <URL> ) , since this is the case that the dynamic loading might be allowed.


  • I run the test, everything is fine . In my sample client package I need to pack the remote stub into the client package, the remote implementation class could be eliminated. This protects the dynamic loading feature from the client-side. Am I understanding this correctly and still following the requirement?

    Thank you inadvance

    Ken Kirin
    SCJP
    SWCD
    SCJD(B&S 2.2.1 In progress)
     
    Ken Kirin
    Greenhorn
    Posts: 26
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi all,

    It's me agian. Please forget what I talked about compiling the sourcecode actually I would mean running the server without the codebase property
    so I just run my server
    java suncerity.gui.ApplicationLoader server
    or should I better run it with this option
    java -Djava.rmi.server.codebase <URL> ................ server

    Thank you
    Ken Kirin.
     
    Bridget Kennedy
    Ranch Hand
    Posts: 86
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Just passed the SCJD and decided to answer at least one post.

    I believe you would be in violation of the instructions if you use the -D command line option. My instructions (and everyone else's based on what I've seen on this forum) say:
    "When you submit your assignment, each part (client and server) must be executable using a command of this exact form:

    java -jar <path_and_filename> [<mode>]"

    Further, your invocation line will not contain your main class name as noted in your example. Again, from the instructions:

    "The executable JAR containing the programs. This must be called runme.jar"
     
    Ken Kirin
    Greenhorn
    Posts: 26
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Bridget,

    Now I got it. Thank you very much

    Regards,
    Ken Kirin
    SCJP
    SWCD
    SCJD(B&S 2.2.1 In progress)
     
    David Abramowicz
    Ranch Hand
    Posts: 56
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi!

    You were also wise not to force the user to start the RMI Registry manually.

    Word of warning to you all, a colleague of mine failed the assignment due to not starting the RMI registry progamatically.


    /Dave
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic