This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 83739 - change security permission without change in the file java.policy
Summary: change security permission without change in the file java.policy
Status: NEW
Alias: None
Product: javame
Classification: Unclassified
Component: CDC pack (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Petr Suchomel
URL: http://www.ojn.se
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-30 07:11 UTC by ovjo
Modified: 2008-05-05 16:10 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ovjo 2006-08-30 07:11:56 UTC
Hi,

I bought a SavaJe phone “Jasper S20”(http://www.savaje.com/show_device.html ) 
at JavaOne.

It is a Java ME /CDC 1.1 phone.

Have anyone used db4o on this device?

I downloaded db4o 5.5 for Java

I started with the included tutorial and created these three classes:
- FirstStepsExample.java
- Util.java
- Pilot.java


I also created a CDC application with my IDE, Netbeans 5.5 beta 2 Mobility 
Pack for CDC
- Main.java
In the startXlet() method I added this line:
FirstStepsExample firstStepsExample = new FirstStepsExample();
I also add constructor and put the code from the main method there.

It works!
 
But I have to add this line in file: C:\CDCTK10\lib\security\java.policy:
   permission java.io.FilePermission "<<ALL FILES>>" ,"read,write,delete";
Is it possible to do in other way (in the code)?

But on the SavaJe phone I am not able to change this file?
I need a other way to change this.

Regards,

Ove
Comment 1 ovjo 2006-09-01 07:35:21 UTC
I read at the SavaJe Forum (http://java.savaje.com/bb/showthread.php?t=59):
The issue you are having in the CDC Emulator is that the
path ("/cf0/file.txt") does not exist in the CDC Emulator environment

I also got a answer at the at the SavaJe Forum 
(http://java.savaje.com/bb/showthread.php?p=585#post585) about the SavaJe 
phone, it works like this:
On a SavaJe handset, a MIDlet or Xlet has limited direct access to the
file system. You can read/write/delete files on /ramfs/tmp, which
is an in-memory file system, and /cf0, which is the mini-SD card.
You do not need to make any additions to the bundle.policy file
to access these directories and files.

See the wiki entry about this at:
http://java.savaje.com/wiki/index.php/What_directories_and_files_can_I_access_f
rom_MIDlets_and_Xlets%3F