This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hi, I m working on this RMI project, where the client sends this object(it is a string) to the server and the server is suppose to save it into a text file. my interface and all the client and server programs compile and run. I can send the object from the client side to the server side, and the server receives it successfully as well, but when it comes to saving it to the text file i get an error saying Java.permission: access denied to the text file. I have never used rmi to save an object to a text file, and i dont know why this might be happening. Can anyone help? Thanks Sraboni
It depends to some degree how the write is being performed. If you are receiving on object from the client, then you may not have the correct policy to allow this write operation. Try adding this to the policy file on the server side:
Please take a moment to read our policy on login names. We ask that you provide first and last name when registering on the site. We feel this gives JavaRanch a more professional appearance, and helps to promote its use. Thanks! [ January 05, 2002: Message edited by: Michael Ernest ]
Make visible what, without you, might perhaps never have been seen. - Robert Bresson
Sraboni
Greenhorn
Joined: Jan 04, 2002
Posts: 4
posted
0
Thank you Micheal Can I simply just add that bit of code into the java.policy file or do i have to put it after a certain line of code within the policy file? I tried using that but i still get the same error. I m sending an object, there possibly couldnt be any error when i m using Objectinputstream and ObjectOutputstream..could there be any error? i wouldnt think so cause the server does receive the object, it when it comes to saving. Anything else you might suggest? Please can you also let me know how i would be able to change my displayed name, as i tried, but i dont think i will be able to..would i? Thanks, Sultana Idris