Results 1 to 2 of 2
  1. #1
    zzzjav is offline Member
    Join Date
    Jun 2013
    Posts
    2
    Rep Power
    0

    Default an error about java scripting

    in the Javascript file,there are two java objects,country and city
    Java Code:
    println(city.getName());
    println(country["addCity"]);
    country.addCity(city);
    the result is :
    shangHai
    function addCity() {/*
    void addCity(com.luoer.time.entity.City)
    */}

    javax.script.ScriptException: sun.org.mozilla.javascript.internal.WrappedExcepti on: Wrapped java.lang.NullPointerException (<Unknown source>#24) in <Unknown source> at line number 24
    at com.sun.script.javascript.RhinoScriptEngine.eval(R hinoScriptEngine.java:110)
    at javax.script.AbstractScriptEngine.eval(AbstractScr iptEngine.java:232)
    at com.luoer.time.entry.main(entry.java:48)
    i wonder that's the problem??


  2. #2
    zzzjav is offline Member
    Join Date
    Jun 2013
    Posts
    2
    Rep Power
    0

    Default Re: an error about java scripting

    oh,it is because the field "cityList" in country have not initialized.
    my lady gaga

Similar Threads

  1. need help with scripting in a Java application
    By theChameleon in forum New To Java
    Replies: 1
    Last Post: 01-12-2013, 04:51 PM
  2. Groovy Scripting and Java
    By aianta in forum New To Java
    Replies: 2
    Last Post: 08-24-2012, 04:25 PM
  3. JAVA scripting
    By conker5295 in forum New To Java
    Replies: 9
    Last Post: 02-22-2012, 08:49 AM
  4. Java & shell scripting
    By kswapnadevi in forum Advanced Java
    Replies: 12
    Last Post: 11-21-2010, 07:41 AM
  5. P~ 0.9 : Java-friendly scripting with powerful regex
    By p7eregex in forum Java Software
    Replies: 0
    Last Post: 12-17-2007, 09:10 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •