« Project bashj : a bash mutant with java support » : différence entre les versions
(Page créée avec « == What ? == The '''bashJ & java Shell Bridge''' project is hosted on [https://sourceforge.net/projects/jsbridge/ sourceForge]. '''bashJ'''&nbs... ») |
Aucun résumé des modifications |
||
Ligne 1 : | Ligne 1 : | ||
== What |
== What ? == |
||
The '''bashJ & java Shell Bridge''' project is hosted on [https://sourceforge.net/projects/jsbridge/ sourceForge]. |
The '''bashJ & java Shell Bridge''' project is hosted on [https://sourceforge.net/projects/jsbridge/ sourceForge]. |
||
Ligne 8 : | Ligne 8 : | ||
'''Java Shell Bridge''' is the underlying technology used by bashJ. It is mainly a server excuting java code for the benefit of a bash session (interactive or scripted). |
'''Java Shell Bridge''' is the underlying technology used by bashJ. It is mainly a server excuting java code for the benefit of a bash session (interactive or scripted). |
||
== Why |
== Why ? == |
||
Java and bash are often partners in software projects. |
Java and bash are often partners in software projects. |
||
Ligne 16 : | Ligne 16 : | ||
With this project, any script is given the capacity to quicly and directly call java methods ''without creating new OS processes''. |
With this project, any script is given the capacity to quicly and directly call java methods ''without creating new OS processes''. |
||
Limitations |
== Limitations == |
||
. bash only<br/> . Linux only <br/> . public static methods only<br/> . methods with primitive types (including String) as parameters and return value<br/> . no varargs <br/> . requires java 9+ |
|||
Files |
|||
== Installation == |
|||
Follow carefully these steps: |
|||
#create a directory <span style="font-family:courier new,courier,monospace;">'''/var/lib/jsbridge/'''</span> |
|||
#download from [https://sourceforge.net/projects/jsbridge/ sourceForge] the jsbInstall.jar installation file and put it in this directory |
|||
#go to the installation directory : <span style="font-family:courier new,courier,monospace;">cd</span> <span style="font-family:courier new,courier,monospace;">/var/lib/jsbridge/</span> |
|||
#run in bash :<span style="font-family:courier new,courier,monospace;">jar xvf jsbInstall.jar</span> |
|||
#run in bash : <span style="font-family:courier new,courier,monospace;">sudo ./jsbInstall</span> |
|||
== Check and try == |
|||
Examples |
|||
== Annex : installed Files == |
|||
The files are installed under <span style="font-family:courier new,courier,monospace;">'''/var/lib/jsbridge/'''</span>, and include: |
|||
*<span style="font-family:courier new,courier,monospace;">'''JSBServer'''.jar</span> (a jar containing a compiled java class) |
|||
*'''<span style="font-family:courier new,courier,monospace;">jsbInit</span>''' (a set of bash functions) |
|||
*'''<span style="font-family:courier new,courier,monospace;">bashJ</span>''' (a script, the command interpreter) |
|||
*'''<span style="font-family:courier new,courier,monospace;">README</span>''' a readme file (a short version of this page) |
|||
*'''<span style="font-family:comic sans ms,cursive;">pipe/</span>'''as subdirectory used for named pipes |
|||
*'''<span style="font-family:courier new,courier,monospace;">classes/</span>''' a subdirectory with transient compiled java classes |
|||
*<span style="font-family:courier new,courier,monospace;">'''jarlib/'''</span> a subdirectory with the jars choosen by the user to make the involved classes available |
|||
|
|||
|
|
Version du 10 juin 2018 à 17:23
What ?
The bashJ & java Shell Bridge project is hosted on sourceForge.
bashJ is an extended bash allowing to use java libraries and java code in scripts.
Java Shell Bridge is the underlying technology used by bashJ. It is mainly a server excuting java code for the benefit of a bash session (interactive or scripted).
Why ?
Java and bash are often partners in software projects.
Their possible interactions are numerous but limited in terms of integration.
With this project, any script is given the capacity to quicly and directly call java methods without creating new OS processes.
Limitations
. bash only
. Linux only
. public static methods only
. methods with primitive types (including String) as parameters and return value
. no varargs
. requires java 9+
Installation
Follow carefully these steps:
- create a directory /var/lib/jsbridge/
- download from sourceForge the jsbInstall.jar installation file and put it in this directory
- go to the installation directory : cd /var/lib/jsbridge/
- run in bash :jar xvf jsbInstall.jar
- run in bash : sudo ./jsbInstall
Check and try
Examples
Annex : installed Files
The files are installed under /var/lib/jsbridge/, and include:
- JSBServer.jar (a jar containing a compiled java class)
- jsbInit (a set of bash functions)
- bashJ (a script, the command interpreter)
- README a readme file (a short version of this page)
- pipe/as subdirectory used for named pipes
- classes/ a subdirectory with transient compiled java classes
- jarlib/ a subdirectory with the jars choosen by the user to make the involved classes available