To Create jar file of any java program use under given steps
NOTE: It is necessary that your program run in java then and then that
program is ready to create a jar file
1.Go To Run open cmd
2.Go To Directory where your .java file reside
3.Compile .java file and create .class file
4.Use the under given syntax to create the jar file(use this in command prompt)
Syntax-1:
jar cf tejas.jar *.class
5.Now Extract the .jar file which is generated by the above syntax in your current
directory
6.Open the extrected folder
7.Open the META-INF folder
8.Copy the MANIFEST.MF from META-INF
9.Paste that file in the folder where .jar file is generated
10.Edit MANIFEST.MF with Note Pad and write the under given syntax to that file
syntax-2:
Main-Class: test (.java name but without .java ex: test(test.java))
now save that file and exit from edit
11.Go To command prompt and write under given syntax
syntax:
jar cmf MANIFEST.MF tejas.jar *.class
NOTE-1: Here in syntax-1 the tejas.jar is given by manually so you can give any
name to your jar file ex: exam.jar,abc.jar
NOTE-2: Here in syntax-2 you give the .jar file name same as given in the syntax-1
So your jar file is Generated and ready to execute.....
Dec 6, 2010
Sep 10, 2010
features of java
There are main nine(9) features of java that are listed as under
1.compiled & interpreted
2.plateform independent
3.object oriented
4.robust and secure
5.distributed
6.simple, small and familiar
7.multithreaded and interactive
8.high performance
9.dynamic and extensible
1.compiled & interpreted
2.plateform independent
3.object oriented
4.robust and secure
5.distributed
6.simple, small and familiar
7.multithreaded and interactive
8.high performance
9.dynamic and extensible
Aug 10, 2010
interesting facts about java
This is Right that the java supports any operating system .It is called
plateform independence of java language.
you can save the programme by extension .java and compile it by java compiler(write javac in command prompt). and the compiler implicitly create the class file of your program and you can run this file in any operating system thats why the java have most preferable features called plateform independent.
plateform independence of java language.
you can save the programme by extension .java and compile it by java compiler(write javac in command prompt). and the compiler implicitly create the class file of your program and you can run this file in any operating system thats why the java have most preferable features called plateform independent.
Subscribe to:
Posts (Atom)