Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Eclipse

  1. #1
    Member
    Join Date
    Mar 2010
    Posts
    111
    Thanks
    19
    Thanked 0 Times in 0 Posts

    Default Eclipse

    I have a program that gets some parameters at runtime. I don't know how to set this parameters when I am running this program by Eclipse.


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Eclipse

    By parameter, do you mean command line parameters? These can be set by going to Run->Run Configurations and click on the Arguments tab

  3. #3
    Member
    Join Date
    Mar 2010
    Posts
    111
    Thanks
    19
    Thanked 0 Times in 0 Posts

    Default Re: Eclipse

    I want to run the following command by eclipse.
    java -cp ".;test.jar" Demo models\program.tagger input.txt
    but I don't know how I should write it in Arguments tab in run configuration.

  4. #4
    Junior Member
    Join Date
    May 2010
    Location
    India
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Eclipse

    Right Click on the java file containing public static void main method.
    Go to properties - run\debug settings - select class and click edit button on right side.
    In arguments tab, provide the runtime arguments, that will go into String args[ ].
    In classpath tab, provide jars and folders that you want to specify using -cp parameter in comand line.
    Hope this helps

Similar Threads

  1. Replies: 24
    Last Post: August 4th, 2014, 12:49 PM
  2. How to add JSF libraries to eclipse?
    By tien1504 in forum Java IDEs
    Replies: 5
    Last Post: October 24th, 2012, 04:32 PM
  3. Eclipse on Mac
    By Cuju in forum Java IDEs
    Replies: 6
    Last Post: March 19th, 2010, 09:29 PM
  4. eclipse help
    By mos33 in forum Java IDEs
    Replies: 3
    Last Post: November 24th, 2009, 02:10 PM
  5. About plugins for eclipse
    By sun26 in forum Java IDEs
    Replies: 1
    Last Post: November 20th, 2009, 09:43 AM