Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jar file doesn´t work

Status
Not open for further replies.

chals1

Technical User
Sep 3, 2003
73
ES
I have created my first jar in bluej specifying the class, that contains main method, namely 'menu'
When i run it, java shouts:
"could not find the main class.Program will exit"
I don't make out what's happening.
menu has another static method besides main's one.
 
i've already fixed above problem but now when i run it appears an hourglass cursor and app doesn't get to start.
This program worked right in class format
 
Make sure you can run it from the command line first.

java -jar filename.jar

It that works, you probably need to set up the correct assosiation for jar files. This depends on what version of windows you are using (assuming you are using windows).

Sean McEligot
 
It runs from the command line.
How do i associate jar for w98 ?
 
In Windows file Explorer, i've chosen View -> Folder Options...
On the "Executable Jar File" i've set up:
C:\j2sdk1.4.2_02\bin\javaw.exe -jar "%1"
where the part before -jar is the path my javaw is located.

still awaiting and nothing!
 
I don't know. That looks right to me. I would try removing the type "Executable Jar File" and starting over.

Sean McEligot
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top