Connecting Tech Pros Worldwide Forums | Help | Site Map

Save in Java

Robert Bralic
Guest
 
Posts: n/a
#1: Jul 18 '05
Hello,

I writed small graphical editor for
probabilystic networks in JAVA, but
there was problem with making save
file inJAVA.
I thinked about it and I concluded
that Save in JAVA is great error.
If is possibile to mke save in JAVA
then is posible tha make save in any
JAVA applet (on the client side),so
I think if this is possibile then Netscape
or Internet Explorer can write a heap
op viruses from Internet to your commpputer
connected on Internet.
If anybody knows how to implement
save file in JAVA please e-mail me.
I succesed to implement a linked list
in JAVA from example in one Book
that worked wey well but I don't
understand how this works.
If anybody knows this please e-mail me.


Robert Bralic
robert.bralic@si.htnet.hr



Philip A. Chapman
Guest
 
Posts: n/a
#2: Jul 18 '05

re: Save in Java


On Fri, 03 Sep 2004 01:08:44 +0200, Robert Bralic wrote:
[color=blue]
> Hello,
>
> I thinked about it and I concluded
> that Save in JAVA is great error.
> If is possibile to mke save in JAVA
> then is posible tha make save in any
> JAVA applet (on the client side),so
> I think if this is possibile then Netscape
> or Internet Explorer can write a heap
> op viruses from Internet to your commpputer
> connected on Internet.[/color]

Robert,

You are correct. For security reasons, Applets are not normally allowed
access to your local machine's resources; including the filesystem.
However, you can get more access by signing the applet so that the user
knows where the applet came from and can decide to allow your applet more
access. You can read more about it here:

http://java.sun.com/developer/techni...urity/applets/

Hope This Helps,
--
Philip A. Chapman
Application Development:
Java, Visual Basic (MCP), PostgreSQL, MySQL, MSSQL
Linux, Windows 9x, Windows NT, Windows 2000, Windows XP


Luca Paganelli
Guest
 
Posts: n/a
#3: Jul 18 '05

re: Save in Java


> I writed small graphical editor for[color=blue]
> probabilystic networks in JAVA, but
> there was problem with making save
> file inJAVA.[/color]

I can't understand which problems you faced...
Obviously there's not some simple method that
let you save any user defined object but you
can use serialization or simply the "stream"
operations to write anything you want to the
file system.
The way you save information to the FS is not
important as far as you can write to the FS.
Don't you agree...?

[color=blue]
> If is possibile to mke save in JAVA
> then is posible tha make save in any
> JAVA applet (on the client side),so
> I think if this is possibile then Netscape
> or Internet Explorer can write a heap
> op viruses from Internet to your commpputer
> connected on Internet.[/color]

The fact you can access file system in JAVA doesn't
compromise Internet security because applets
run in a different environment - called sand box -
in which you are not able to do many operations
and file access are operations that are not allowed.

So, JAVA let you access file system through a
stand alone program but denies it when you're
running an applet...
Try reading the javadocs about "FileOutputStream"
for example. You'll see that
"SecurityManager.checkWrite()" is called
to check if you're allowed to write a file.
The SecurityManager will return if you're running
a stand alone app or a signed applet but it will
throw an exception if you're running a simple
applet!

Luca Paganelli


Luigi Donatello Asero
Guest
 
Posts: n/a
#4: Jul 18 '05

re: Save in Java



"Philip A. Chapman" <pchapman@pcsw.us> skrev i meddelandet
news:pan.2004.09.03.03.25.35.356443@pcsw.us...[color=blue]
> On Fri, 03 Sep 2004 01:08:44 +0200, Robert Bralic wrote:
>[color=green]
> > Hello,
> >
> > I thinked about it and I concluded
> > that Save in JAVA is great error.
> > If is possibile to mke save in JAVA
> > then is posible tha make save in any
> > JAVA applet (on the client side),so
> > I think if this is possibile then Netscape
> > or Internet Explorer can write a heap
> > op viruses from Internet to your commpputer
> > connected on Internet.[/color]
>
> Robert,
>
> You are correct. For security reasons, Applets are not normally allowed
> access to your local machine's resources; including the filesystem.
> However, you can get more access by signing the applet so that the user
> knows where the applet came from and can decide to allow your applet more
> access. You can read more about it here:
>
> http://java.sun.com/developer/techni...urity/applets/
>
> Hope This Helps,
> --
> Philip A. Chapman
> Application Development:
> Java, Visual Basic (MCP), PostgreSQL, MySQL, MSSQL
> Linux, Windows 9x, Windows NT, Windows 2000, Windows XP[/color]

I probably misunderstand what is stated above but
I tried to save a test file in Java using Windows 98 and I only got a text
file.
Could I not save it in java then?
Or should I download
https://jsecom16b.sun.com/ECom/EComA...B609D756D3F984
first?
Is this download freeware?

--
Luigi ( un italiano che vive in Svezia)
http://www.italymap.dk
http://www.scaiecat-spa-gigi.com/sv/...r-italien.html




Closed Thread