This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes Issue with loading image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Issue with loading image" Watch "Issue with loading image" New topic

Issue with loading image

Geethu Mg

Joined: Aug 21, 2013
Posts: 1

I am trying to retrieve all images in the specific folder,For that I created a vector and move that images to that vector, the code I used is

try {
FileConnection fc = (FileConnection)"file:///e:/Images", Connector.READ_WRITE);
Enumeration filelist = fc.list("*.jpg", true);
String filename;
while(filelist.hasMoreElements()) {
filename = (String) filelist.nextElement();
catch (IOException ioe)
System.out.println("IOException: "+ioe.getMessage());
catch (SecurityException se) {
System.out.println("SecurityException: "+se.getMessage());


return imageNameVector;
now I want to retrieve the elements from the vector and convert it to image,

imageName = (String) imageNameVector.elementAt(1);
image = Image.createImage(imageName);
}catch(Exception e){
Alert alert = new Alert("Sngjfkgnlkjf") ;
It shows an exception Abc,jpg cannot be read, Somebody please help me to sort it out....
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Issue with loading image
It's not a secret anymore!