473,769 Members | 4,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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***********@s i.htnet.hr
Jul 17 '05 #1
3 6013
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 "FileOutputStre am"
for example. You'll see that
"SecurityManage r.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
2853
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. //------------------------------------------------------------------------- import java.io.*; import java.util.*;
12
1671
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, inheriting from each other, I cannot avoid comparing this unpleasant situation to java. Python power is in it's syntax, not addons. Let's not copy perl's experience and one java is already far too much for earth. f29
5
3421
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 ! My clients want to keep their paid-for code proprietary. How do I prevent this from occuring ? The javaScripts are embedded in my HTML in the following manner:
7
2169
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 so far using javascript the only thing that i can not do is save the changes this is easy in vb.net and c# but seeing as i have to work with the server its a whole new world. I dont want to have to use asp or anything that requiers expensive...
2
2160
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 xhtml and css and convert it to pdf. Problem 1) I designed the aspx page to produce the xhtml as output. So how do I save that rendered page to a file on the server? I think it involves overriding the Render method. I wrote some code which...
2
15359
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 modify the word document. If the user 'save' the document (using the Save button of the MS tool bar in the browser) the application has to 'save as' the document on the server, not over writing the openned file but creating a new one.
4
7668
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 code here please if someone find the solution send me as soon as possible. <%@ page contentType="text/html;charset=windows-1252"%> <%@ page import="java.sql.*" %> <%@ page import="javax.sql.*" %> <%@ page import="java.lang.*" %> <%@ page...
1
2674
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 how to save data...?? Thanks in advance, Robert..!! robert.bralic@si.t-com.hr
2
4137
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 problem is tht,If graph is to large if it going out of screen thn ,i m getting jpg image on screen disply graph,m not getting the image of tht graph which going out of screen. this is my code This is my code
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9416
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10199
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8861
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7393
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6661
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3948
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3551
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2810
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.