Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-07-2007, 03:03 PM
Member
 
Join Date: Nov 2007
Posts: 1
Amateur1980 is on a distinguished road
how to enable jcreator to accept command line arguments?
Guys,

This is my first post. So, hello to everyone

Am using Jcreator and i have writtern a simple program to accept two numbers and compare them to see which is bigger.

Problem am facing is, i am not able to give my inputs to the program when i "Run Project" using Jcreator!! It runs and throws the below error..

This is to find maximum of two numbers
Enter the First Number
Length :0
java.lang.ArrayIndexOutOfBoundsException: 0
at maxTwo.main(maxTwo.java:18)
Exception in thread "main"
Process completed.

But i can run the same program via command prompt and get the correct output as below


D:\Official\Java Apps>java maxTwo 45 43
This is to find maximum of two numbers
Enter the First Number
Length :2
Enter the Second Number
First number45is greater than43

Please suggest.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-07-2007, 03:17 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
Hmm, it took lots of time since i use jcreator but all IDEs use similar logic to handle JVM parameters for projects. Find rpoject properties, (I guess it will be open if you right click to the project and select "Properties" or it might be under "Project" menu if any.) So this is a project level parameter to set, if you find where to modify project parameters, you will find a way there to specify program input! Hope this helps.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command line argument denisatandi New To Java 3 06-15-2008 07:59 AM
Printing command line arguments Java Tip Java Tips 0 12-03-2007 10:27 AM
Exporting from the command line o1121 Eclipse 1 08-09-2007 08:29 PM
Unable to execute command line command in java LordSM New To Java 1 08-08-2007 01:23 AM
Java Command Line Arguments In Eclipse IDE JavaForums Eclipse 0 05-19-2007 10:45 AM


All times are GMT +3. The time now is 11:01 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org