Yurttas/PL/OOL/Java/F/02/08/G/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 packages - gt, sy
javac G00.java

jar cvf G00.jar G00.class gt sy

java -classpath G00.jar G00

or

jar xvf G00.jar

java G00
      • G00.java | G00.jar
        public class importing from package gt and package sy
        [ jar without user provided manifest file ]
      • G.java
        [ public class in 'package gt' ]
      • G.java
        [ public class in 'package sy' ]
javac G01.java

jar cvf G01.jar G01.class gt sy

java -classpath G01.jar G01

or

jar xvf G01.jar

java G01
      • G01.java | G01.jar
        public class importing from package gt and package sy
        [ jar without user provided manifest file ] named packages [user-defined] - gt, sy 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