Tuesday, December 21, 2004

simpest way to create jar files

This ia the simpest way to create jar files....

How to create a jar file - by Tanul Karkare:

create a file MANIFEST.MF having 2 lines:
Manifest-Version: 1.0
Main-Class: path of ur main class file..

create a folder META-INF in ur application dir.
put this MANIFEST.MF into that.

execute the command:
jar cvfm xyz.jar META-INF/MANIFEST.MF *.class

to create an executable jar file.

just that's it.


-----------


Take an example:
create a folder test(any name will do)
create a file TestJar.java in that:

import javax.swing.*;

class TestJar extends JFrame
{
public static void main(String[] args)
{
TestJar tj = new TestJar();
tj.setSize(200, 200);
tj.setVisible(true);
tj.show();
}
}

compile this file , test with java command.
it should show a window.

create a manifest file as above inside meta-inf folder (which is inside test folder) with content:-

Manifest-Version: 1.0
Created-By: Tanul
Main-Class: TestJar


execute the command inside test folder:(test.jar can be any name)
jar cvfm test.jar META-INF/MANIFEST.MF *.class

ur executable jar is ready.
double click on it and it will show u a window.

u can give this to anybody without letting him have ur source files.

Professional League

I think this is one news that may help Indian Hockey achieve its earlier status.... I hope it does that !!!

The Indian Hockey Federation (IHF) will launch a professional domestic league in January involving foreign players to help the country regain its past glory in the game.
India have not won a major title since claiming the last of their eight men's Olympic gold medals at Moscow in 1980. The team finished seventh at the Athens Games in August.
Each of the five top tier teams - the league will be played in two levels - will include five foreign players each with both domestic and foreign players signing up financial contracts, IHF president KPS Gill told reporters on Wednesday.
"The premier hockey league is the beginning of a landmark journey of re-capturing the glory of hockey and rebuilding India's supremacy in the game internationally," Gill said.
"The rebuilding has to start at ground level by giving a platform to our players to hone their talent by playing in an active league," he said.
The league, offering a total prize money of around Rs seven million ($155,380), will be played over five weeks from January 13 in the southern city of Hyderabad.
Many top Asian players now figure in European leagues and the IHF will schedule the league during winter to attract the best talent from Europe as well as major continental sides like South Korea and Pakistan.
Global sports channel ESPN have said they will broadcast the games live for 10 years to help bring in sponsorship which is almost entirely focussed on cricket in India.
The games would be played NBA-style, over four quarters in an effort to package the league better. Hockey matches are normally played over 70 minutes in two sessions.