Results 1 to 11 of 11
  1. #1
    Join Date
    Apr 2008
    Location
    Syria
    Posts
    10
    Rep Power
    0

    Unhappy Problem using thread +rmi in my homework

    Hi...
    I compile my homework only 10marks

    using as you know:
    javac *.java
    rmic MarketImpl
    rmiregistry

    in new cmd

    I wrote:
    java -Djava.security.policy=policy MarketServer localhost

    in new cmd

    I wrote:
    java -Djava.security.policy=policy CustomersClient localhost

    my problem is in using threads....

    can any one read code and help me discovering the problem please!

    download attachment from 6post down
    Attached Files Attached Files
    Last edited by IbrahimAbbas; 04-13-2008 at 11:08 PM.

  2. #2
    Join Date
    Apr 2008
    Location
    Syria
    Posts
    10
    Rep Power
    0

    Default

    the two thread I wrote:
    CalculateBill.java
    CalculateBillwithdiscount.java

  3. #3
    Join Date
    Apr 2008
    Location
    Syria
    Posts
    10
    Rep Power
    0

    Default

    I wrote too:
    BillStruct.java
    to save the items in market loading data from xml file
    then when the customers buy
    somthing I use this BillStruct to save their buying info

  4. #4
    Join Date
    Apr 2008
    Location
    Syria
    Posts
    10
    Rep Power
    0

    Default policy

    policy file
    Attached Files Attached Files

  5. #5
    Join Date
    Apr 2008
    Location
    Syria
    Posts
    10
    Rep Power
    0

    Default

    sorry I forget you have to delete the mypackage line in all .java files...

  6. #6
    Join Date
    Apr 2008
    Location
    Syria
    Posts
    10
    Rep Power
    0

    Default modified attachment mypackage

    this one final copy
    Attached Files Attached Files

  7. #7
    Join Date
    Apr 2008
    Location
    Syria
    Posts
    10
    Rep Power
    0

    Default

    maybe I solved it, I wrote implements java.io.Serializable in BillStruct

  8. #8
    Join Date
    Apr 2008
    Location
    Syria
    Posts
    10
    Rep Power
    0

    Default

    Now, the code I wrote working
    but I have this problem:
    the result of bills printed in MarketServer not in CustomersClient?
    what do I do to solve this probleme, please, no one here in java-forums!
    see attachment last version.
    Attached Files Attached Files

  9. #9
    Join Date
    Apr 2008
    Location
    Syria
    Posts
    10
    Rep Power
    0

    Default

    I solved the problem: I used
    a boolean finsided in threads to ensure that the value I want use it in String sum

  10. #10
    Java Tip's Avatar
    Java Tip is offline Moderator
    Join Date
    Nov 2007
    Posts
    1,694
    Blog Entries
    430
    Rep Power
    10

    Default

    Wow, Ibrahim.

    Congratulations, you have a very long conversation with yourself here.

    Just kidding.. :P It is good for others to know your problem and solution.

    By the way, welcome to the forum.

  11. #11
    Join Date
    Apr 2008
    Location
    Syria
    Posts
    10
    Rep Power
    0

    Wink Final Version

    Thanks...hhh
    it's my way in life...
    you can see the last version: new attachment file
    Attached Files Attached Files

Similar Threads

  1. Animation Delay - Thread problem
    By wererabit in forum Advanced Java
    Replies: 3
    Last Post: 04-10-2009, 11:35 PM
  2. [SOLVED] HELP! Thread Problem
    By nvidia in forum NetBeans
    Replies: 2
    Last Post: 05-24-2008, 05:56 AM
  3. Replies: 0
    Last Post: 01-28-2008, 08:02 AM
  4. Homework PREREQUISITE Problem
    By ChrisC in forum New To Java
    Replies: 7
    Last Post: 11-27-2007, 06:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •