aspose file tools*
The moose likes Java Micro Edition and the fly likes Unhandled Exception : close application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Unhandled Exception : close application " Watch "Unhandled Exception : close application " New topic
Author

Unhandled Exception : close application

chandrap prakash
Greenhorn

Joined: Sep 19, 2008
Posts: 28
Hi,

In my application,using browse functionality i am trying to select a file from native directory of a device.I tested this functionality on sony and LG mobile,functionality works fine.

When i test the same application on Nokia E60 mobile on selection of a file,it throws "Unhandled Exception" .

I tried to put the code in try and catch block, to print the message then i got null.

following is the j2me code:

try
{
pictureURI.setString("");
pictureURI.setString(url);
display.setCurrent(detailsForm);
}

catch (Exception e)
{
System.out.println(e);
showAlert("Exception ===="+e.getMessage());
}

What is the issue i am not understanding.

Thanks & Regards,

Chandra Prakash
Gopinath Karyadath
Ranch Hand

Joined: Oct 14, 2009
Posts: 87
Hai

I tested with Nokia E61 there is no error found !

code : -


import javax.microedition.lcdui.Display;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.TextField;
import javax.microedition.midlet.*;

/**
* @author gopi
*/
public class Midlet extends MIDlet {
public void startApp() {
TextField pictureURI ;
pictureURI = new TextField("URL :", "", 60, TextField.ANY) ;
Form detailsForm = new Form("URL") ;
Display display ;
display = Display.getDisplay(this);
String url ="" ;
try
{
pictureURI.setString("");
pictureURI.setString(url);
display.setCurrent(detailsForm);
}

catch (Exception e)
{
System.out.println(e);
System.out.println("Exception ===="+e.getMessage()) ;

}



}

public void pauseApp() {
}

public void destroyApp(boolean unconditional) {
}
}


if you want to test with other nokia handset please go to http://apu.ndhub.net/devices


Regards
Gopinath





 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unhandled Exception : close application