Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Jignesh Gohel
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, can u help me out by giving the answer that how to call .jar file by clicking the JButton....?
 
Marilyn de Queiroz
Sheriff
Posts: 9065
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Raj Maheshwari
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic