Jarminal is to Java what the python shell is to Python
Now jarminal is a linux tool. I will only just post the man page here. Any linux person should be able to read the man page and understand what it does.
jarminal(1) Jarminal jarminal(1)
NAME
jarminal - a java interactive shell
SYNOPSIS
jarminal [option] [command]
LICENSE
GNU General Public License
DESCRIPTION
jarminal is a java interactive shell.
Jarminal emulates the python shell and provides a means of executing
java commands interactively.
The normal procedure to executing the smallest java code is
· create the java file
· compile the java file
· execute the java class created from step 2 above
This might not be effective if all you want to do is test if a small
code snippet will work or not.
This shortcoming has been the strenght of languages like python where
you can test some code snippets
before you finally include them in your project.
Jarminal makes this interactive shell functionality available to java
programmers too.
OPTIONS
-e | --execute escapedstring You can use this option to execute a java
code without starting the interactive terminal
SAMPLE jarminal -i "System.out.println(\"Hello World\"
;"
NOTE that the Hello World is escaped, and the final semi-colon
is inside the string
-i | --interactive This command will start the interactive terminal.
In this mode, you dont have to escape strings
Classes can be defined and they are available throughout the
interactive session
class declaration can span multiple lines
You can import java packages and they are available throughout
the session
Except for the above, previous commands dont have any effect on
the new command
To execute a block of code (normally across multiple lines) use
a open and close brace { }
Control Structures can span multiple lines
SAMPLE
jarminal>> System.out.println("Hello World"
;
Hello World
jarminal>> public class One {
public void writeSomething(String something) {
System.out.println(something);
}
}
jarminal>> new One().writeSomething("jarminal is sooooooo
cool"
;
jarminal is sooooooo cool
jarminal>> for(int i=0; i<5; i++) {
new One().writeSomething(String.valueOf(i));
}
1
2
3
4
5
jarminal>> import javax.swing.*;
jarminal>> JOptionPane.showMessageDialog(null, "jarminal on
steroids"
;
jarminal>>exit
-h | --help [fqcn]
Displays a minimal description of how to use jarminal if fqcn is
not supplied
fqcn - Fully Qualified Class Name.
If a fully qualified class name is provided e.g
java.util.Hashtable jarminal displays a javadoc help page.
But for this to work, you have to configure the java doc path in
the config file /etc/jarminal.conf
The javadoc help functionality can also be invoked from the
interactive shell.
SAMPLE jarminal>> help java.awt.Dimension
FILES
/etc/jarminal.conf
0.1 02 February 2008 jarminal(1)
The source code is available on github.
www.github.com/segun/jarminalyou can get the rpm too there.