16CommandlineCommentsLarge

16CommandlineCommentsLarge - Lecture Set #16: Command Line...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
1 CMSC 131 Spring 2008 Jan Plane (adapted from Bonnie Dorr) Lecture Set #16: Command Line Running 1. Command-line Java 2. Arguments to Main Method 3. Commenting Review CMSC 131 Spring 2008 Jan Plane (adapted from Bonnie Dorr) 1 Command-Line Java c Source File: c an ASCII text file named appropriately for the class it contains (i.e. ClassDemo.java ) c created by an editor (emacs, vi, edit, notepad…) c Translate to byte code: c javac ClassDemo.java c creates a file named ClassDemo.class c Run (and interpret the Byte Code): c java ClassDemo c runs the java application defined in the the ClassDemo file c Finding Things c For the System to be able to find javac and java c Command Search Path must be set it is named PATH c For the System to be able to find the class named as the argument to the java command c The Class Search Path must be set it is named CLASS PATH c Both of these are set in Windows using the Control Panel/System/Advanced/Environment Variables c In Class Demonstration
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

16CommandlineCommentsLarge - Lecture Set #16: Command Line...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online