Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-13-2008, 09:43 PM
IbrahimAbbas's Avatar
Member
 
Join Date: Apr 2008
Location: Syria
Posts: 10
IbrahimAbbas is on a distinguished road
Send a message via MSN to IbrahimAbbas
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
File Type: zip mypackage.zip (7.7 KB, 1 views)

Last edited by IbrahimAbbas : 04-13-2008 at 11:08 PM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 04-13-2008, 09:45 PM
IbrahimAbbas's Avatar
Member
 
Join Date: Apr 2008
Location: Syria
Posts: 10
IbrahimAbbas is on a distinguished road
Send a message via MSN to IbrahimAbbas
the two thread I wrote:
CalculateBill.java
CalculateBillwithdiscount.java
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 04-13-2008, 09:47 PM
IbrahimAbbas's Avatar
Member
 
Join Date: Apr 2008
Location: Syria
Posts: 10
IbrahimAbbas is on a distinguished road
Send a message via MSN to IbrahimAbbas
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
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 04-13-2008, 09:55 PM
IbrahimAbbas's Avatar
Member
 
Join Date: Apr 2008
Location: Syria
Posts: 10
IbrahimAbbas is on a distinguished road
Send a message via MSN to IbrahimAbbas
policy
policy file
Attached Files
File Type: zip policy.zip (190 Bytes, 0 views)
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 04-13-2008, 10:52 PM
IbrahimAbbas's Avatar
Member
 
Join Date: Apr 2008
Location: Syria
Posts: 10
IbrahimAbbas is on a distinguished road
Send a message via MSN to IbrahimAbbas
sorry I forget you have to delete the mypackage line in all .java files...
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 04-13-2008, 11:10 PM
IbrahimAbbas's Avatar
Member
 
Join Date: Apr 2008
Location: Syria
Posts: 10
IbrahimAbbas is on a distinguished road
Send a message via MSN to IbrahimAbbas
modified attachment mypackage
this one final copy
Attached Files
File Type: zip mypackage.zip (7.6 KB, 0 views)
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 04-14-2008, 12:57 AM
IbrahimAbbas's Avatar
Member
 
Join Date: Apr 2008
Location: Syria
Posts: 10
IbrahimAbbas is on a distinguished road
Send a message via MSN to IbrahimAbbas
maybe I solved it, I wrote implements java.io.Serializable in BillStruct
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 04-14-2008, 03:51 AM
IbrahimAbbas's Avatar
Member
 
Join Date: Apr 2008
Location: Syria
Posts: 10
IbrahimAbbas is on a distinguished road
Send a message via MSN to IbrahimAbbas
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
File Type: zip bin.zip (7.6 KB, 0 views)
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 04-14-2008, 03:20 PM
IbrahimAbbas's Avatar
Member
 
Join Date: Apr 2008
Location: Syria
Posts: 10
IbrahimAbbas is on a distinguished road
Send a message via MSN to IbrahimAbbas
I solved the problem: I used
a boolean finsided in threads to ensure that the value I want use it in String sum
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 04-14-2008, 03:29 PM
Moderator
 
Join Date: Nov 2007
Posts: 1,079
Java Tip will become famous soon enoughJava Tip will become famous soon enough
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.
__________________
Want to make your IDE the best? Vote Now
Bookmark Post in Technorati
Reply With Quote
  #11 (permalink)  
Old 04-14-2008, 10:24 PM
IbrahimAbbas's Avatar
Member
 
Join Date: Apr 2008
Location: Syria
Posts: 10
IbrahimAbbas is on a distinguished road
Send a message via MSN to IbrahimAbbas
Final Version
Thanks...hhh
it's my way in life...
you can see the last version: new attachment file
Attached Files
File Type: zip bin.zip (7.7 KB, 0 views)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Animation Delay - Thread problem wererabit Advanced Java 1 04-17-2008 09:41 AM
HELP! Thread Problem nvidia NetBeans 1 02-07-2008 01:58 AM
If JNI thread call the java object in another thread, it will crash. skaterxu Advanced Java 0 01-28-2008 08:02 AM
Creating a Thread (extending Java Thread Class) JavaForums Java Blogs 0 12-19-2007 10:31 AM
Homework PREREQUISITE Problem ChrisC New To Java 7 11-27-2007 06:36 AM


All times are GMT +3. The time now is 04:23 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org