Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,866 members, 7,813,953 topics. Date: Tuesday, 30 April 2024 at 10:35 PM

Jarminal - Java Interactive Shell - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Jarminal - Java Interactive Shell (2271 Views)

Bash/shell Scripting In A Unix/linux Environment / Bash Shell Vulnerability Affects Linux, Unix And Mac OS X / Creating Interactive Cd Using Flash (2) (3) (4)

(1) (Reply)

Jarminal - Java Interactive Shell by javarules(m): 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(m): 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)

How Taxi Booking Apps Are Enhancing The Profitability Of Taxi Businesses / (SOLVED) How To Delete *this* In Debian Linux (pic Included) / How I Made $200 Every Week With Google Developement Account

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 15
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.