Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » java.lang.ArrayIndexOutOfBoundsException: 0(when i run this program eclipse send me this exception)
java.lang.ArrayIndexOutOfBoundsException: 0 [message #643082] Sat, 04 December 2010 01:23 Go to next message
carter  is currently offline carter Friend
Messages: 1
Registered: December 2010
Junior Member
Hi Everybody!!!
i'm new on java
this code got it from the solutions of thinking in java
I'm Trying to run this program and it just send me this Exception, i've tried to change
my workspace to other place, reinstall eclipse and it keeps sending same exception any body have had
same error? Sad
please help



this is the exception eclipse send me when i run this program:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at ShowArgs.main(ShowArgs.java:5)

public class ShowArgs {
public static void main(String[] args) {
System.out.println(args[0]);
System.out.println(args[1]);
System.out.println(args[2]);
}
}


i use:
Eclipse SDK
Version: 3.6.1
Build id: M20100909-0800

hope somebody can help me
thank you verymuch
Re: java.lang.ArrayIndexOutOfBoundsException: 0 [message #643192 is a reply to message #643082] Sun, 05 December 2010 22:40 Go to previous message
Eclipse UserFriend
Originally posted by: lhasadad.gmail.google.com

Check the length of the array before trying to reference an element in it. you probably started the program
with no arguments....

On 12/3/2010 8:23 PM, carter wrote:
> Hi Everybody!!!
> i'm new on java
> this code got it from the solutions of thinking in java
> I'm Trying to run this program and it just send me this Exception, i've tried to change my workspace to other place, reinstall eclipse and it keeps sending same exception any body have had
> same error? :( please help
>
>
>
> this is the exception eclipse send me when i run this program:
> Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
> at ShowArgs.main(ShowArgs.java:5)
>
> public class ShowArgs {
> public static void main(String[] args) {
> System.out.println(args[0]);
> System.out.println(args[1]);
> System.out.println(args[2]);
> }
> }
> i use:
> Eclipse SDK
> Version: 3.6.1
> Build id: M20100909-0800
>
> hope somebody can help me
> thank you verymuch
Previous Topic:A time-out error when attempting to profile large application
Next Topic:problems with GWT RPC
Goto Forum:
  


Current Time: Fri Apr 19 20:05:59 GMT 2024

Powered by FUDForum. Page generated in 0.03126 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top