Код: Выделить всё
var test = (function () {
var that = {};
that.addNumbers = function (a, b) {
return a+b;
};
return that;
}());
Код: Выделить всё
public class run {
public static void main(String[] args) throws Exception {
Context cx = Context.enter();
try {
Scriptable scope = cx.initStandardObjects();
// HOW TO CALL THE METHOD, Test.addNumbers(1,2)? Please help me!
} finally {
Context.exit();
}
}
}
Мне нужно вызвать метод из скомпилированного "теста". .class".
Подробнее здесь: https://stackoverflow.com/questions/505 ... ava-progra
Мобильная версия