how can i associate jar files with java.exe not javaw.exe in window 7,since if jar file is associated to javaw.exe,then console is not displayed.

Control Panel > Default Programs > Set Associations

i apreciate ur response
i tried this and associate it to java.exe not javaw.exe,but it is not working.
i don't know why?it is opening for 1 second geving me message program exit and closing rapidly.

Yes, it does thyat if there is a problem starting the program. It's very silly. Open a command window in the same dir and type the command. That way you can see the error message.

thanx for reply,
when i associate jar with javaw.exe,it is opening normally,but when i associate it with java.exe,it is opening only 1 second,and i am not seeing what is the message exactly then closing rapidly.i don't know what is the problem

Read my previous post again.

you can read my previous post again,i don't have problem when starting the program,
this occurs only when associating with java.exe,it works and opens normally when associated with javaw.exe

Did you type
java -jar (etc)
at a command prompt at the same working directory?

i have typed at command prompt the following:
jar cvfm p.jar class.*

and what happened? And why are you telling me?

That's nothing like what I suggested. You need to type
java -jar myjar.jar
where myjar.jar should be the name of your jar file
This is the same as associating .jars with java, but the window stays open for you to see the messages.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.