Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Highlighted
New Developer
Posts: 7
Registered: ‎08-24-2010
My Device: Bold 9700
My Carrier: Cable & Wireless
Accepted Solution

How to configure Eclipse environment for SD Card configuration

Hi,

 

Each time I start the simulator (9700 - v5.0) in Eclipse (running on W7) , I have to manually select/change the SD Card directory used by the application under development.

 

How and where can I change the standard start-up directory for the SD Card functionality in the simulator? 

 

Thanks in advance..

New Contributor
Posts: 6
Registered: ‎02-13-2011
My Device: Not Specified

Re: How to configure Eclipse environment for SD Card configuration

you can choose this from run configuration of your project(right click on the project name and select (ran as) then select run configuration)  then select simulator tap and create your sccard and click apply

New Developer
Posts: 7
Registered: ‎08-24-2010
My Device: Bold 9700
My Carrier: Cable & Wireless

Re: How to configure Eclipse environment for SD Card configuration

Thanks, kudos to hmd_amin

 

Run configurations -> Simulator -> Memory -> Use PC File system for SD Card (scroll down..)

 

 

 

New Contributor
Posts: 6
Registered: ‎03-31-2014
My Device: 9900
My Carrier: Blackberry

Re: How to configure Eclipse environment for SD Card configuration

Hi Friends,

 

       I have tried many ways but I am facing same exception : "Invalid path name. Path does not contains a proper root list. See FileSystemRegistry class for details."

 

here is my code. I don't know what i am missing. please help me.

 

// uri = URI.create("file:///SDCard/Databases/sample/sample4.db");
// uri = URI.create("file:///SDCard/databases/database1.db");
// uri = URI.create("file:///E:/project/blackberry/database1.db");  // path of my PC
uri = URI.create("file:///SDCard/databases/blackberry/database1.db");  // path of my PC
sqliteDB = DatabaseFactory.create(uri);

Statement st =
sqliteDB.createStatement("CREATE TABLE user(name)");
st.prepare();
st.execute();
st.close();

Statement st1 = sqliteDB
.createStatement("INSERT INTO user VALUES ('ashish')");
st1.prepare();
st1.execute();
st1.close();
sqliteDB.close();

add(new
RichTextField("Status: Database was created and inserted the values successfully"));
} catch (Exception e) {
System.out.println(e.getMessage());
e.printStackTrace();
add(new RichTextField("Exception : " + e.getMessage()));
}