jar tool slight problems

hi folks.

installed Java jdk 1.5.0

C:\Java\Jdk1.5.0\bin

q1)

on cmd command prompt, if i type jar, i get following error:

"Can't determine application home".

q2) I used JBuilder foundation to create a simple application with 5 classes.

Packge is called: sqlInsertion.

within the sqlInsertion i have the following directories:

bak, classes, src, doc.

I am struggling to use jar tool so thats my first concern. 2ndly I need to create an executable jar file, I have read sun's tutorial but i get following errors:

"Failed to load Main-Class Manifest attribute from " path ".jar". where path is the path to this .jar file I created.

Please, please help.

[732 byte] By [dsfdsfdsfdsfdsa] at [2007-10-2 14:27:19]
# 1

> q1) on cmd command prompt, if i type jar, i get following

> error: "Can't determine application home".

>

On the command line, did you key in the word 'jar', or do you mean you keyed in the name of your jarfile?

> q2) I used JBuilder foundation to create a simple

> application with 5 classes.

>

> Packge is called: sqlInsertion. within the sqlInsertion i have the following

> directories: bak, classes, src, doc.

>

Do you mean that your package sqlInsertion is in the directory named sqlInsertion and the other directories: bak, classes, src, doc are sub-directories of sqlInsertion?

> I am struggling to use jar tool so thats my first

> concern. 2ndly I need to create an executable jar

> file, I have read sun's tutorial but i get following

> errors:

>

> "Failed to load Main-Class Manifest attribute from "

> path ".jar". where path is the path to this .jar file

> I created.

>

> Please, please help.

Well before you create the jar you must make sure that the application works right. Does it run fine from the command prompt when you key in:

>java -cp my;class;path sqlInsertion.WhatEverTheClassNameIs

?

Next, in order to use the jar tool, at the command prompt simply key in:

>jar

... you should get a help menu. If you don't, what do you get? It may be that your system PATH needs to be set. I'll leave off here for the time being.

abillconsla at 2007-7-13 12:47:45 > top of Java-index,Java Essentials,New To Java...
# 2

thanks abil.

System PATH (My Computer, properties, Advanced, Environment Vars.) is set to:

C:\Sun\AppServer\bin;C:\Java\Jdk1.5.0\bin;C:\Java\Jre1.5.0\bin

1) On command prompt, this is the output (in response to the q: what command i type in)

C:\>jar

Can't determine application home

2) The directories lie here:

C:\Documents and Settings\user\jbproject\SQLInsertion\

the src, classes etc are in the parent directory SQLInsertion (above path) i.e subdirectories.

dsfdsfdsfdsfdsa at 2007-7-13 12:47:45 > top of Java-index,Java Essentials,New To Java...
# 3
Go to each of those 'bin' folders/directories one at a time and enter 'jar' and hit enter and see what you get.
abillconsla at 2007-7-13 12:47:45 > top of Java-index,Java Essentials,New To Java...