| Author |
Pre-compiling a script
|
Vinicius Souza
Ranch Hand
Joined: May 18, 2011
Posts: 45
|
|
Im creating a program where I need to execute the same script continuously so I was wondering if I can pre compile it ? My code below
package com.xcreator;
Thanks in advance!
|
Java is the best (I love C too) heehhh
|
 |
Jelle Klap
Bartender
Joined: Mar 10, 2008
Posts: 1402
|
|
You can compile a script at runtime if the ScriptEngine implements the Compilable interface.
If so, you can cast it to Compilable and invoke either of the compile() methods to obtain a CompiledScript instance, which you can then re-use as often as you like.
|
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
|
 |
 |
|
|
subject: Pre-compiling a script
|
|
|