Prevent Java from parsing the command line parameters
Posted
by User1
on Stack Overflow
See other posts from Stack Overflow
or by User1
Published on 2010-03-17T23:05:51Z
Indexed on
2010/03/17
23:11 UTC
Read the original article
Hit count: 169
java
|command-line
Would like to make anapplication in Java that will not automatically parse parameters used on the command-line. Currently, java requires public static void main(string[])
as the entry point signature. I would like just a single string that I parse myself. Can this be done at all?
Here's an example:
java MyProgram.class Hello World
I would want it to give me Hello World
without requiring quotes around that string. I would even settle for java giving me the entire java MyProgram.class Hello World
. I'm thinking this is something beyond Java and has more to do with the shell.
© Stack Overflow or respective owner