Yurttas/PL/OOL/Java/F/02/08/E/00/index page

From ZCubes Wiki
Jump to navigation Jump to search
Dr. Salih Yurttas - yurttas@zcubes.com
programming languages - design principles, implementation constructs
java

  1. class, package, jar, bean
    1. jar [default manifest] - named package - e
javac E00.java

jar cvf E00.jar E00.class e

java -classpath E00.jar E00

or

jar xvf E00.jar

java E00
      • E00.java | E00.jar
        [ multiple classes all in their own file in a 'named package' ]
        [ jar without user provided manifest file ]
      • E.java
        [ public class in 'package e' ]
      • EE.java
        [ public class in 'package e' ]
      • EEE.java
        [ public class in 'package e' ]
javac E01.java

jar cvf E01.jar E01.class e

java -classpath E01.jar E01

or

jar xvf E01.jar

java E01
      • E01.java | E01.jar
        [ multiple classes all in their own file in a 'named package' ]
        [ jar without user provided manifest file ] named package [user-defined] - e this is a proper way of packaging for reusable components with libraries and component-based software development

java as a pure oo language << 2 >> exceptions | 4 | 5 | 6 | 7 | 8 | 9