next up previous contents
Next: Installing Java Up: A. How to use Previous: Instructions   Contents

Subsections

MSDOS tips

Directories

Directories, also known as folders, are organised in a tree-like structure. To move around directories:
cd .. moves up to the parent directory;
dir lists the files and sub-folders in the current folder;
cd stuff moves down into the folder called ``stuff'', if it exists.

Screen size

You can change the font size of the MSDOS window and the number of lines it displays. Click on properties on the MSDOS toolbar, then once you have changed the settings, exit the MSDOS window and start it again for them to take effect. NB The font size must be small enough to accomodate the number of lines you wish to display on the screen.

You can switch between full screen mode and back by pressing <Alt>+<Return>.

Editing on the command-line

With the Windows XP MSDOS window, you can use the up/down arrows to recall from the previous lines you entered, and left and right arrows to move around a line and edit it.

Cut and paste

To copy text from the MSDOS window, click on the top-left icon of the window to get a menu $ \rightarrow$Edit $ \rightarrow$Mark. Now use the mouse to mark out an area of the text in the window to copy, then press Return to copy it. You can paste this into other applications, such as MS Word.

To copy the whole MSDOS window as a picture, press <Alt>+<Print Screen>. You can paste this into other applications, such as MS Word. This works for any window, not just MSDOS.

Redirecting program output to a file

If you program produces a lot of output, it may be convenient to send it to a file instead of the screen. With MSDOS you can do this by typing a greater than symbol followed by the filename after any command. For example:

java Hello > output.txt

You can then open the resulting file output.txt with any text editor (Jext, Notepad, Word) to edit, print or copy the text.

Because the program output is redirected to the file, you don't see it on the screen at all. If you program expects some input, you won't see any prompts you made for that either, but your program will still be waiting for you to type something. There is no easy solution to this; you just have remember what is required and enter it blindly.


next up previous contents
Next: Installing Java Up: A. How to use Previous: Instructions   Contents
RHUL Dept. of Physics