It's not a secret anymore!*
The moose likes Linux / UNIX and the fly likes Java port of getopt() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Java port of getopt()" Watch "Java port of getopt()" New topic
Author

Java port of getopt()

Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
I am looking for a Java port of getopt(). After a quick search at Source Forge, I found a whole list of possibilities. Does anyone have any experience with these (or any other) getopt() port? In particular, I am interested in their relative compliance to POSIX standards.

Layne


Java API Documentation
The Java Tutorial
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

I've never needed one, but I've kept CLI from the Jakarta Commons in the back of my mind should the need arise. It apparently has parser for POSIX compliant argument strings.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
Thanks. I originally decided to go with a Source Forge project called JArgs. However, I just downloaded Jakarta Commons CLI and will see how it compairs.

Layne
Mark Wuest
Ranch Hand

Joined: Jun 07, 2003
Posts: 88
I've used the gnu port successfully.

There's a link on this page:

http://www.gnu.org/software/java/packages.html

Mark
Dave Salter
Ranch Hand

Joined: Jul 20, 2005
Posts: 292

Originally posted by Joe Ess:
I've never needed one, but I've kept CLI from the Jakarta Commons in the back of my mind should the need arise. It apparently has parser for POSIX compliant argument strings.


I've used this one in the past. It works well, although I'm not sure about POSIX compatibility.
 
wood burning stoves
 
subject: Java port of getopt()
 
Similar Threads
using getopt() in Java
command line arguments
Parsing main args OO style
Java port of getopt()
need to parse command line parameters in my code