lab4_SC.docx - MILITARY COLLEGE OF SIGNALS SOFTWARE...

This preview shows page 1 - 10 out of 18 pages.

MILITARY COLLEGE OF SIGNALSSOFTWARE CONSTRUCTIONLab Submission: 04Name: Zahra QamarCourse: BESE 23C
Create Your own package1 – Add statement “package APC.lab1;” as first line of your code2 – Compile with javac –d. yourProgram.java3 – This will create your yourProgram.class file in the <workingDir>\ APC\lab1
4 – Make a class to call yourProgram from step3
5 –create a jar file by following commandjar cf myapi.jar.C:\home\html\jdk-13.0.2\bin\APC\lab1\HelloPrg.class// bold text is the path where your class file exists; gives that path in above command
6 –Add this jar file in the lib folder of classpath and change the class path(CLASSPATH= C:\Program Files \ Java \ jdk1.5.0 \ lib \ myapi . jar;;)And7 –Your API is added in the classpath and now you are able to make your program callingyour own api from the lib folder.
Java Application1 – Write a simple Application to show a message “Hello world”2 – Write an application using swing package to accept two integers from the user anddisplay a result of addition of input integers.
Background image
Background image
3 – Try a program withoSystem.exit(0);oSystem.exit(1);

Upload your study docs or become a

Course Hero member to access this document

Upload your study docs or become a

Course Hero member to access this document

End of preview. Want to read all 18 pages?

Upload your study docs or become a

Course Hero member to access this document

Term
Fall
Professor
NoProfessor
Tags
Java platform

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture