This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 30th, when you will be able to use this site as normal.

    Forum Stats

  • 3,889,831 Users
  • 2,269,775 Discussions
  • 7,916,823 Comments

Discussions

FileConnection Exception in Midlet

Ashok449
Ashok449 Member Posts: 21
edited Jan 19, 2016 4:17AM in Java ME Embedded

Hi,

I'm trying file operation such as create and read/write files from my midlet. I have added API permissions javax.microedition.io.Connector.file.read and javax.microedition.io.Connector.file.write

when I tried to run below Code I see below error:

fconn = (FileConnection) Connector.open("/home/pi/javame8/charge.txt", Connector.READ_WRITE);

TRACE: <at java.lang.IllegalArgumentException>, startApp threw an Exception

java.lang.IllegalArgumentException

- javax/microedition/io/Connector.getProtocolInstance(), bci=28

- javax/microedition/io/Connector.open(), bci=19

- javax/microedition/io/Connector.open(), bci=6

- javax/microedition/io/Connector.open(), bci=3

Do I need to add more permissions here !?

Thanks,

Ashok

Answers

This discussion has been closed.