eclipse - Problems generating ant scripts for java when linking to Rhino -


when try build project using ant, get: "java.lang.noclassdeffounderror: sun/org/mozilla/javascript/internal/scriptable"

this stems usage of rhino (the bundled java-script comes oracle jdk)

  • when build project eclipse, works fine.
  • the ant file using generated eclipse, , works fine except java-script dependencies.
  • these dependencies located in rt.jar comes oracle jdk.
  • i have tried both jdk6_0_u41 , jdk7, , both give same results: success in eclipse, fail ant.
  • i have tried build on both ubuntu 10, , 12

i have seen 2 other suggestions seem unacceptible me:

  • one thread suggested copying rt.jar project lib directory. (rt entire java runtime! )
  • another thread suggested shouldn't use:sun/org/mozilla/javascript/internal. since doing advanced manipulation (calling object methods, registering callbacks, etc) see no alternative using sun.org.mozilla.javascript.internal family of classes.

a comment oracle's site:

users should not write code depends on internal jdk implementation classes. such classes internal implementation details of jdk , subject change without notice.

this not compiler issue. javac behaving correctly, according information provided in ct.sym.

the issue belongs decide should available (and should hidden by) ct.sym

you may suggest include rhino's jar project , repoint on original's rhino classes 'internals' not hidden users


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -