# How can I write file in my pc

Roy (s965613@mailserv.cuhk.edu.hk)
Sun, 27 Jul 1997 21:12:53 +0800

- Messages sorted by: [ date ][ thread ][ subject ][ author ]
- Next message: Rowland Smith: "Can't find algorithms"
- Previous message: Valentin Perepelitsa: "Digital signature"
- Next in thread: Marianne Mueller: "Re: How can I write file in my pc"

    Date: Sun, 27 Jul 1997 21:12:53 +0800

    From: Roy <s965613@mailserv.cuhk.edu.hk>

    To: java-security@web2.javasoft.com

    Subject: How can I write file in my pc

This is a multi-part message in MIME format.

--------------1605744E2389
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Dear Sir,
I have used JDK1.1 beta 2 to write my Java Applet and use Netscape
3.0 to run it.My JDK is installed in my c:\JDK1.1.2 and the
navigatoer.exe files is in the c:\Netscape\navigator\program .I have
read document of secuity FAQ ,I know that I should create the directory
/.hotjava and add acl.write=/.../file_name.But after I try it ,I still
can not do that ,so I want to ask some questions:
1)Can I read or write file by applet in my PC(not in Unix server)
2)Where should I create /.hotjava directory in my PC(may be c:/JDK1.1.2
, C:\Netscape\navigator\program or somewhere else)?
3)After I create the /.hotjava ,does the file properties will be found
(not need I copy or create myself)
4)If I want to write file in c:\tmp\file_name,can I add
acl.write=\tmp\file_name only ?
Thank you for your attention.
Bye.
Roy
27-7-97
There have some information about my PC:
1)OS:Window95 with MS Plus(Chinese)
2)navigator.exe file is in the c:\Netscape\navigator\program
3)JDK1.1 beta 2:Installed in c:\JDK1.1.2
4)gb4.java:My source file I use to write file

--------------1605744E2389
Content-Type: text/plain; charset=us-ascii; name="gb4.java"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="gb4.java"

import java.io.*;

class rdfile
{ rdfile()
{

try{

FileOutputStream bookURL =new FileOutputStream("gb.html");
String line_str,o;
DataOutputStream book_is;
book_is=new DataOutputStream(bookURL);

System.out.println("Tnput:"+"Hello");
book_is.writeBytes("Fun");
book_is.writeChar('H');
book_is.writeChar('\n');
book_is.writeChar('H');
}
catch(IOException ioe){}
}
}

public class gb4 extends java.applet.Applet
{
rdfile win=new rdfile();
public void init(){}
}

--------------1605744E2389--

- Next message: Rowland Smith: "Can't find algorithms"
- Previous message: Valentin Perepelitsa: "Digital signature"
- Next in thread: Marianne Mueller: "Re: How can I write file in my pc"