Page 2 of 2 FirstFirst 12
Results 21 to 23 of 23
  1. #21
    amityadav9314 is offline Member
    Join Date
    Sep 2010
    Rep Power


    Quote Originally Posted by al_Marshy_1981 View Post
    C:\"userinput.class filepath here" java userinput 34 35
    notice the two arguments after userinput?

    You have:
    "C:\Program Files\Java\jdk1.7.0\bin>java userinput
    there are no arguments passed to args here, compare with above
    You mean we can't have any option to run it from any IDE like i am using netbeans and Geany 'cause we run it from a key directly in which there comes no option to pass the command line arguments.

  2. #22
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power


    Well, you can pass arguments with Netbeans, but that's under the Run setup (somewhere).

    You could put in a check to see if there are any args (which has been suggested I htink) and if there aren't any then go the Scanner route. That is "if (args.length == 0) the Scanner stuff... else use args".

  3. #23
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Waterford, Ireland
    Rep Power


    You can pass arguments with Eclipse too, google around im lazy :) but you can I have done it before about a year or so ago. So IDE is not your problem

Page 2 of 2 FirstFirst 12

Similar Threads

  1. plz solve this error
    By silversurfer2in in forum AWT / Swing
    Replies: 14
    Last Post: 06-15-2010, 03:30 PM
  2. Can't Solve Array Error
    By Gregadeaux in forum New To Java
    Replies: 2
    Last Post: 12-14-2009, 04:01 AM
  3. how to solve syntax error
    By pro85 in forum Java Applets
    Replies: 5
    Last Post: 04-06-2009, 11:20 AM
  4. Can't solve error message while looping
    By BHCluster in forum New To Java
    Replies: 15
    Last Post: 04-22-2008, 10:51 AM
  5. Help mi solve my error
    By Deon in forum New To Java
    Replies: 3
    Last Post: 01-11-2008, 06:26 AM

Posting Permissions

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