I have 6 js files and I need to include them all into final script to pass ScriptEngine's eval method.How can I do it? ScriptEngine haven't add() method.I can read them with FileReader and than concatenate those strings but I think there will be a better way.
You can use the overload eval(Reader)
to avoid having to load scripts into a String
yourself.
You could use one script to call the other 6 scripts.
Example:
function callOtherFunctions() {
functionOne();
functionTwo();
.
.
.
functionSix();
}
Not 100% sure how good that solution will work but it will call all other 6 functions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With