1 / 9

Development

Development. Using Javac & java command. Compiling with javac. javac [ option ] [ source files]:. Compiling with -d. Launching Apps with Java. Searching for Other Classes. Declaring and Using Classpaths : - classpath /com/foo/acct:/com/foo

xanti
Download Presentation

Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Development

  2. Using Javac & java command

  3. Compiling with javac • javac [option] [source files]:

  4. Compiling with -d

  5. Launching Apps with Java

  6. Searching for Other Classes • Declaring and Using Classpaths: -classpath /com/foo/acct:/com/foo => means specify 2 directories where classes can be found -classpath /com/foo/acct:/com/foo:. • Search 2 directories and search current directory * Use “-cp” to abbreviate “-classpath”

  7. JAR files

  8. Using Static Imports Before static imports: public class TestStatic { public static void main(String[] args) { System.out.println(Integer.MAX_VALUE); System.out.println(Integer.toHexString(42)); } } After static imports: import static java.lang.System.out; // 1 import static java.lang.Integer.*; // 2 public class TestStaticImport { public static void main(String[] args) { out.println(MAX_VALUE); // 3 out.println(toHexString(42)); // 4 } }

  9. FIN

More Related