This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Jignesh Gohel
Ranch Hand
Posts: 276
  • 0
  • 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: 9059
12
  • 0
  • 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
  • 0
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic