473,385 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Save in Java

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
ro***********@si.htnet.hr
Jul 17 '05 #1
3 5978
On Fri, 03 Sep 2004 01:08:44 +0200, Robert Bralic wrote:
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.


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
Jul 17 '05 #2
> I writed small graphical editor for
probabilystic networks in JAVA, but
there was problem with making save
file inJAVA.
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...?

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.


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
Jul 17 '05 #3

"Philip A. Chapman" <pc******@pcsw.us> skrev i meddelandet
news:pa****************************@pcsw.us...
On Fri, 03 Sep 2004 01:08:44 +0200, Robert Bralic wrote:
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.


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


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


Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: maya2000 | last post by:
Hello, Below code has a problem to read a data. It seems the non-primitive data are the reason. How can I save this Map into a file, and read it later? Thanks in advance. ...
12
by: f29 | last post by:
I don't believe that noone has yet spotted that python is becoming java. Each new version is fully equipped with more garbage than before. Classes are great, but once there are 1000 of them,...
5
by: Barry | last post by:
Hello, I've recently noticed that someone can simply type in the URL to my javaScript, from my HTML source code, to the explorer location bar and an auto-save dialog pops up to let them save it...
7
by: WStoreyII | last post by:
how can i save xml. if i have an xml file on a server, lets say a dvd collection. and i have a form that gets information for a new dvd and i append this dvd to the dom. This i can do no problem...
2
by: Will Rickards | last post by:
In my web application there is an interactive report. Then there need to be a printable version a pdf. So I found this java tool csstoxslfo and the java fop tool from apache that will take my...
2
by: gusa992000 | last post by:
Hello I am trying the following problem: A web app in jsp and java has to open a microsoft word document directly in the browser. This part is easy and i have done it. The user then can...
4
by: anilareddy | last post by:
Hi all, I have a problem in my project. I have developed a small page like this. Now after the save button is clicked, the data which is entered should be stored in the database. I'm attaching the...
1
by: Robert Bralic | last post by:
If I make a applet from Java program is it possible that this applet writes something on disk from browser... I have a application with graphics and I want to make, she as applet but I don't know...
2
by: sriniwas | last post by:
Hi Frnd's, m using prefuse visulation,it's have one display class and this class have one saveImage(outPutStream, String jpg,double size);. now graph is converting ia jpg image properly.now my...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.