Below is the text of the Read Me for JOS Command Line Utilities 1.0.3, from the CommandLineGroup.
Some of the terms cause Wiki to add a question mark. I made changes where I could.
Kevin Raulerson | Ciudad de México |
Development & Consulting | kevinr@spin.com.mx |
Please visit my
Job Search
Description
This distribution contains several GNU/Linux command line utilities, ported to Java.
- cal, cat, cd, date, du, echo, ls, mkdir, mv, pwd, rm, rmdir, touch, wc, and whoami; libraries like fnmatch and getopt; and wrappers for javac and jar
- Localized for several languages
- Documented with HTML manual pages
- Distributed as runnable jar files
- Available for download on their home page.
- Coming Soon: Available as fully commented source code at the JOS open source repository. And source is now included in the downoad.
You can demo these utilities using Demo Shell.
- An ultra-minimal mockup of a shell, intended as a quickly downloadable demo environment
- Sample code for shell authors who want to configure their shells to run jar files
- Available as part of the command line utilities download, on their home page
- Coming Soon: Available in fully commented source code at the JOS open source repository
Installing and Running with Demo Shell
Demo Shell runs (Java) programs found in the PATH, like any other shell. Please do not confuse PATH with CLASSPATH which does not enter the picture.
- JDK 1.2 or greater is required. Make certain at least JDK 1.2 is installed, by entering:
- java -version
- Put the jar files found in the jar directory of the Command Line Utilties distribution into your path, by doing one of:
- Move the jar files into a directory that is listed in your PATH environment variable, or
- Edit the value of your PATH environment variable to include this distribution's jar directory
- Run Demo Shell, by A) changing to the directory containing demoShell.jar and B) entering one of the following:
Or alternately, you could prefix
- Windows/DOS
java -Djava.ext.dirs=PATH -jar demoShell.jar
- Unix/Bourne
java -Djava.ext.dirs=$PATH -jar demoShell.jar
demoShell.jar
with a path leading from your current directory to the demoShell.jar file.
- Use Demo Shell, by entering at the Demo Shell prompt a program name (minus the
.jar
extension) along with any arguments. For the specifics of usage see the manual pages linked below.You could try out these examples:
¢ ls
Lists the files in the current directory
¢ ls -FlrSI*.html [directory]
Lists the files indirectory
, marking directories, displaying long format, sorting in reverse according to file size, and omitting files that end with.html
¢ touch --help
Displays usage help for thetouch
command
¢ pwd
Displays the full path to the current directory
¢ cal 1 2001
Displays a calendar for January 2001
¢ cat [textfile]
Displays the contents oftextfile
¢ rm [trashfile]
Permanently deletestrashfile
-- for real
- To exit Demo Shell, enter
exit
or typecontrol-c
.
Documentation
The links work in the download copy of the Read Me, not in the copy on the web.
Manual Pages in HTML Upper Package Documentation API Documentation Makefile (for jmk, Make in Java) Source Code
Source Properties Java EN DE ES FR NL PL PT SL SV
- cal
*
- cat
* * * * * *
- cd
*
- date
* * * * * *
- du
* * * * * * * * *
- echo
* * * * * *
- ls
* * * * * * * * *
- mkdir
* * * * * * * * *
- mv
* * * * * * * * *
- pwd
* * * * * *
- rm
* * * * * * * * *
- rmdir
* * * * * * * * *
- touch
* * * * * * * * *
- wc
* * * * * *
- whoami
* * * * * *
- AbstractCommand
* * * * * * * * *
- ArgMatch
* * * * * * * * *
- BackupFile
- FNMatch
- GNUError
- GetOpt
*
- GetOptConstants
- AbstractWrapper
*
- jar
- javac
- javadoc
- javap
- DemoShell
*
- ExitSecurityManager
Limitations, Bugs amd Bug Reports
Please send bug reports to:Bugs
- No known bugs.
Limitations
- In the Blackdown Linux JDK1.2preview1 (and perhaps others), when the path is long, launching is slow because of a delay inside ResourceBundle the first time a resource is accessed. This is the only delay that a long path causes.
I hope Sun will fix this. Meanwhile, users can minimize the delay by limiting the path used to launch Demo Shell to directories that actually contain programs to be run within Demo Shell.
- Java 2 accesses extensions in the [jdk]/jre/lib/ext directory. However, setting the System property java.ext.dirs wipes out Java's record of [jdk]/jre/lib/ext which is then not searched. We recommend that you not place extensions into [jdk]/jre/lib/ext, because you will just have to move them all (or change links/shortcuts) each time you install a new JDK. Instead, place all your Java extensions in some other directory (for example a directory in your PATH) and set java.ext.dirs to refer to it.
- The make file needs two changes to run on another system. There are two absolute paths commented at the top of the file that you need to change.
- Launching native binaries has some limitations.
- Synchronous only, no backgrounding.
- The cd utilitiy only changes the directory for Java apps. It can't change the native current directory.
- Native apps can't read command line user input in Demo Shell.
- The Java documentation say that scripts and gui-based apps may not run correctly. I have not seen this.
- Built-in commands, such as dir and copy in DOS, will not run.
- A few source files are included which have not been jarred. These files are not yet complete.
- You can't run a jar file just with an absolute pathname. The jar must be in one of the directories that java.ext.dirs was set to at startup.
- The pid/status message that prints out when a native app runs is from Java, not from Demo Shell. It seems to be native -- it does not seem to pass through either System.out or System.err, so I can't see any way to turn it off.
Licenses
The code in this distribution is licensed as free software.
- All utilities and libraries
GPL online
- DemoShell
LGPL online
Job Search
I'm looking for full-telecommute Java contract programming work.Please visit my Job Search page, or email me, especially if you:
- Are hiring Java contractors (me, for example ;)
- Might have leads on Java telecommuting work
- Want info on Java telecommuting
Thanks
Thanks for having a look at these command line utilities.Kevin Raulerson
kevinr@spin.com.mx