Forums Register Login
How to pass Java value from program

I thought i'd be able to use the System.exit(calcval) to pass a final value of the a Java program and into a kshell variable ie:


java jpgm1

but it looks like the .exit method only passes numeric values up to a certain value, ie under 500 looks like.

Is there another Java method i could use to accomplish this same feat?

I could write it to a file of course, but then i would need to figure a way to get it from the file to the $passvar!

Thanks for any suggestions!
I'm not familiar with the limits of System.exit(), but I do know how to read in a file in UNIX:
passvar=`cat fileName`

(Note that the example has backquotes, not regular quotes)
Thanks alot Jeanne!

Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

This thread has been viewed 506 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jan 20, 2018 10:17:39.