₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,024 members, 8,419,982 topics. Date: Thursday, 04 June 2026 at 08:44 AM

Toggle theme

Jarminal - Java Interactive Shell - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingJarminal - Java Interactive Shell (2364 Views)

1 Reply

Jarminal - Java Interactive Shell by javarules(op): 5:46pm On Feb 02, 2009
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\"wink;"
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"wink;
Hello World
jarminal>> public class One {
public void writeSomething(String something) {
System.out.println(something);
}
}
jarminal>> new One().writeSomething("jarminal is sooooooo
cool"wink;
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"wink;
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/jarminal
you can get the rpm too there.
Re: Jarminal - Java Interactive Shell by jacob05(m): 12:49am On Feb 05, 2009
Very interesting.where can i get jarminal.
@javarule
now you know some of python's advantages over java. Good way to start.
Re: Jarminal - Java Interactive Shell by javarules(op): 8:26am On Feb 05, 2009
yeah python has some power, so is every language if u ask me.

the rpm is here

http://www.filefactory.com/file/afg1g7e/n/jarminal-0_1-1_i386_rpm

if u use debian, just install alien and use alien to convert it to a deb file
1 Reply

Bash/shell Scripting In A Unix/linux EnvironmentBash Shell Vulnerability Affects Linux, Unix And Mac OS XCreating Interactive Cd Using Flash234

Cbn Online\mobile Payment LicenseA Critical Look At Nairaland's Anti-spam Bot Or Whatever...Php File Handling Help Needed