wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes how to call .jar file by clicking the JButton..? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how to call .jar file by clicking the JButton..?" Watch "how to call .jar file by clicking the JButton..?" New topic
Author

how to call .jar file by clicking the JButton..?

Jignesh Gohel
Ranch Hand

Joined: Dec 28, 2004
Posts: 276
hi, can u help me out by giving the answer that how to call .jar file by clicking the JButton....?


Regards,
Jignesh

The Art Of Life Is To Know When To Be Useless And When To Be Useful - CHUANG TZU
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9048
    
  10
Why not just call the method in the class in the jar that you want to execute directly rather than using the Runtime.getRuntime().exec() method?
[ February 03, 2005: Message edited by: Marilyn de Queiroz ]

JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Raj Maheshwari
Ranch Hand

Joined: Jul 02, 2004
Posts: 34
Jignesh

You might want to find out what class/method you wish to access in the jar file and call that method. just make sure that the jar file is in your classpath so your program has access to it.

hth
Raj
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to call .jar file by clicking the JButton..?