Results 1 to 3 of 3
  1. #1
    tommundackal is offline Member
    Join Date
    Jan 2014
    Rep Power

    Default Need help for jar file exec

    Hey all
    I need to execute a java jar file that is stored in a location using the java code in netbeans. i found many sample codes in many forums and google ...but most of them show error or not properly executing the jar file.IF any one have the code please upload it or reply to my mail
    I want to execute the jar file using java code instead of going to cmd and type java -jar jar file

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Washington, DC
    Rep Power

    Default Re: Need help for jar file exec

    What have you tried? Hint: you can either use a ProcessBuilder or you can add the jar to your classpath and call its main method from your code.
    How to Ask Questions the Smart Way
    Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
    Static Void Games forum - Come say hello!

  3. #3
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: Need help for jar file exec

    I want to execute the jar file using java code
    Do you want the code in the jar file to execute in the same JVM as the code that calls it?
    Or do you want the code to execute in its own, separate JVM by using the java command to execute it?
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. UTF-8 from an Exec
    By Grismar in forum New To Java
    Replies: 2
    Last Post: 12-12-2012, 01:18 PM
  2. App needs to exec script
    By jocala in forum Android
    Replies: 0
    Last Post: 07-06-2012, 05:51 AM
  3. runtime.exec
    By cotede2 in forum Advanced Java
    Replies: 3
    Last Post: 04-17-2009, 06:18 PM
  4. help with Runtime.exec()
    By Lanfear in forum New To Java
    Replies: 18
    Last Post: 12-16-2008, 12:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts