Results 1 to 5 of 5
  1. #1
    allaudin's Avatar
    allaudin is offline Senior Member
    Join Date
    Apr 2013
    Posts
    271
    Rep Power
    0

    Default Command Line Arguments with executable JAR

    I have a jar file that takes command line arguments.. Running it from command line or via bat file is fine. Is there any way that I can run this file with arguments I set in bat file, by double-clicking that jar file?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,361
    Blog Entries
    7
    Rep Power
    20

    Default Re: Command Line Arguments with executable JAR

    Quote Originally Posted by allaudin View Post
    I have a jar file that takes command line arguments.. Running it from command line or via bat file is fine. Is there any way that I can run this file with arguments I set in bat file, by double-clicking that jar file?
    If you double click on that .jar file the .bat file obviously won't be started so no, it isn't possible.

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    allaudin's Avatar
    allaudin is offline Senior Member
    Join Date
    Apr 2013
    Posts
    271
    Rep Power
    0

    Default Re: Command Line Arguments with executable JAR

    any other method of setting command-line arguments within the jar file ?

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,361
    Blog Entries
    7
    Rep Power
    20

    Default Re: Command Line Arguments with executable JAR

    It's the same as if you're running a single class.

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    allaudin's Avatar
    allaudin is offline Senior Member
    Join Date
    Apr 2013
    Posts
    271
    Rep Power
    0

Similar Threads

  1. What are command-line arguments?
    By Kratos321 in forum New To Java
    Replies: 12
    Last Post: 03-18-2012, 10:59 PM
  2. Command-Line Arguments
    By smvolt in forum Eclipse
    Replies: 6
    Last Post: 12-21-2011, 01:48 PM
  3. Command-Line Arguments
    By mustachMan in forum New To Java
    Replies: 5
    Last Post: 02-26-2010, 03:13 AM
  4. Command Line Arguments
    By Nakira in forum NetBeans
    Replies: 10
    Last Post: 02-04-2010, 03:45 PM
  5. arguments in command-line
    By girlet18 in forum New To Java
    Replies: 2
    Last Post: 01-21-2010, 02:05 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
  •