Home Ask Login Register

Developers Planet

Your answer is one click away!

Agustin Scalisi February 2016

codename one error java.lang.NoSuchMethodError: javafx.scene.web.WebEngine.setUserDataDirectory(Ljava/io/File;)V

I receive this error when I run my CN1 project

java.lang.NoSuchMethodError: javafx.scene.web.WebEngine.setUserDataDirectory(Ljava/io/File;)V

I use a sidebar menu, but the error is on the main screen This is my SateMachine.java

protected void beforePortada(Form f) {
  WebBrowser browser=new WebBrowser();
    f.setLayout(new BorderLayout());
    f.addComponent(BorderLayout.CENTER, browser);

    String URL= "someurl.php";

    String ssurhtml = "somehtml";

    ConnectionRequest req = new ConnectionRequest();
    byte[] data = req.getResponseData();
    if (data == null) {
        //throw new IOException("Network Error, try again later.");
    //JSONParser parser = new JSONParser();
    // Map response = parser.parseJSON(new InputStreamReader(new ByteArrayInputStream(data), "UTF-8"));

    XMLParser xmlParser=new XMLParser();
    Element element= null;
    try {
        element = xmlParser.parse(new InputStreamReader(new ByteArrayInputStream(data), "ISO8859-1"));
    } catch (UnsupportedEncodingException e) {
    Element element1=element.getElementById("somediv");
    String test= String.valueOf(element1);

    char c= '\'';
    char r= ' ';


I receive the error message, and the simulator show a black screen


Shai Almog February 2016

There is a regression in the current simulator that requires Java 8. Try upgrading to Java 8 to workaround it.

Post Status

Asked in February 2016
Viewed 3,858 times
Voted 7
Answered 1 times


Leave an answer

Quote of the day: live life