Bashj programming guide
Understanding the architectire of bashj
This is a complement to the general bashj presentation page.
The key idea behind bashj is the eexcution of a bashj server. It is JVM perfromin essentially two tasks
translating bashj code into bash code
execute any java method call for any running bashj client
The benefit of this is the extreme efficiency of this minimal architecture.
But the developper of a bashs script should be aware of the fact that any global component of the JVM (static variables, Threads,...) will be shared with all other bashj clients launched.
For instance if a client
Using bashj as a pure java 'interpreter'
It is possible to create a bashj page without nay bash line. In this case, the interpreter will automatically call and execute the method static void main(String... a) , as in this example:
#@java
static void main(String... a)
{u.p("Hello world, welcome to bashj");}
This minimal but complete code will excute normally.