|
I am working on a servlet (runs on tomcat) which receives requests that contains Java Script code, and using the java scripting API framework evaluates/run the code and returns the answer to the user.
Since we are dealing with user generated code, the...
Started by special0ne on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Use Rhino instead of Java 6's built-in JS scripting engine as it gives you more options to restrict the ....
Something that might work otherwise is to run the script in a strict sandbox, and terminate it after to defend yourself.
|
|
What is your preferred scripting language in java world (scripting language on JVM) and way? When do you prefer your scripting language over java (in what situations for example for prototyping)? Do you use it for large projects or for personal projects...
Started by Darius Kucinskas on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
Just send them the script the one with Java 6 have nice features like generators....
My favorite is Jython, and I use it by embedding a Jython interpreter in my Java application to the customers' needs without having to compile anything.
|
|
I am writing a graphics application in Java. Eventually I would like to build in a scripting language so things are programmable. Which language library do you recommend?
Likely suspects are:
Rhino (JavaScript) JRuby (Ruby) Jython (Python) Less likely...
Started by eed3si9n on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
If you wanted to go all out....
It is not complete (lacking coroutine support among.
At the danger getting a "down-vote" python is easier as BASIC :-)
Lua is appreciated, among at least a pure Java implementation of Lua: Kahlua .
In java".
|
Ask your Facebook Friends
|
How to add days to current DateTime using Java Script. Does Java Script have a built in function like .Net AddDay?
Started by Ashesh on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
However, setting ....
When setting "tomorrow", it only works because it's current value matches the year and month for "today" .
Var today = new Date(); var tomorrow = new Date(); tomorrow.setDate(today.getDate()+1);
Be careful, because this can be tricky .
|
|
Since Java 1.6 there is this nice Script Engine Manager which let's i.e. execute JavaScript scripts in run time. Is there something similar in functionality in Java 1.5?
Started by michael lucas on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
It should be possible to run JSR223 on Java 5, at least according to this article ..
Here's a list of supported languages.
Run different scripting languages within the Java framework (prior to Java 6).
|
|
How to inline (here-document) few java code lines into a Ant script ? Please an example ?
Started by TaintedLove on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
The most Java-like of these....
I don't believe you can sensibly do it for actual Java code, but I've had a lot of success doing() } </groovy>
(You can write Groovy in a much more Java-like fashion if you want to.)
You, JRuby etc.
|
|
I have a Mac application bundle which is executing a shell script. The shell script calls java program 1 to do some stuff and then launches the main java application. This process leaves one icon in the Dock for the shell script which shows the name from...
Started by G_A on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Addendum as follows:
$ export ....
Maybe you can run the Java program in the background and then exit the shell script? Something likeYes, assuming the first Java program can run headless :
java -Djava.awt.headless=true ...
|
|
I want jquery or php code tell the visitor if the java script is disabiles
Started by moustafa on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
script type='text/javascript'> $("body").addClass("js"); </script> CSS: #no-javascript.
|
|
Is it necessary to learn java script before jQuery?
Answer Snippets (Read the full thread at stackoverflow):
It will do a lot for you, and you can fumble through it with only knowing a little bit of the... .
It's like programming with any other framework.
It's a good idea to know the basics of JavaScript, but you don't need in depth knowledge of it to use JQuery .
|
|
Is there a way to stop a java program running using a shell script by knowing the name alone.I am using ksh shell
Started by Harish on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Add a unique property....
With this id you can kill the process normally.
You can use pkill:
pkill your_java_program_name
This would work if you run only one instance of the started java-program (jps is a process-manager for java-programs).
|