Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Command Line Argument - limitation in Java

807580May 20 2010 — edited May 21 2010
I am trying to call a java class along with a command line argument from a shell script . The line of code in the shell script will be like as follows:


arg_01=`echo $file_list | sed 's/\s/,/g'`
touch /home/ora/crontest.txt
java -classpath $webapp_classpath com.example.it.util.InvokeBatch $arg_01
#End of shell Script


From java documentation I understand that the maximum command line argument length can be up to a maximum of Integer.MAX_VALUE (2147483647).

But does this hold good when i am calling this java class from within a shell script too ? I believe that there is a maximum length applicable to command line arguments in UNIX. In any way does this value restricts the Integer.MAX_VALUE that JAVA allows?

Thanks in Advance for your help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 18 2010
Added on May 20 2010
5 comments
1,732 views