ADC Home > Reference Library > Technical Q&As > Legacy Documents > Java >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

Using stdin on the Macintosh


Q: How do I use stdin to get user input on the Macintosh?

A: To use standard in on the Mac you will need to use JBindery (part of the MRJ SDK) to make a double-clickable Macintosh application out of your class. Make sure you are using version 2.1 EA3 (or later) of the SDK. This will only work with an application (no applets), so your code will need a static public void main(String args[]) method defined as the entry point. Once you create your class as an application, you drag-and-drop the .class file on the JBindery application in the MRJ SDK. It will present you with a multitude of options. The ones we care about for this case are in the "Command" section (the one that comes up by default). Use the "Redirect stdin:" popup to change it to "Message Window". Then click on the "Save Settings..." button and save your settings as an application using the standard save dialog presented. Once this is done, you can run your application by double-clicking on the newly saved app, and use the messages window for stdin and stdout. For more detailed information about this or about using JBindery in general, please refer to the JBindery documentation in the MRJ SDK.

[Dec 07 1998]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.