Results 1 to 3 of 3
Thread: Problem with eclipse?
- 05-23-2012, 06:17 PM #1
Problem with eclipse?
I'm now switched over to eclipse from VIM. I'm still new to Java. For example this simple program:
When I compile/run with VIM. I run with "java IfStatement 1" then it will show whether the results according to the If Statements.Java Code:http://www.mediafire.com/download.php?qei3jmj4h4hdtms
But when I use eclipse and hit the run button it tend to give me this error:
I couldn't seem to input my number. So I'm not sure how to run with eclipse.Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at IfStatement.main(IfStatement.java:9)
Can you sort this out for me? Thanks
Tim
- 05-23-2012, 06:30 PM #2
Re: Problem with eclipse?
First of all, you should post your code here in the form of an SSCCE. Some of us (including myself) are behind firewalls that block sites like mediafire.
Secondly, this has nothing to do with eclipse. That is a runtime error, and you'd get the same thing no matter how you were running it.
Try compiling and running from the command line to see what I mean.How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 05-23-2012, 06:58 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,393
- Blog Entries
- 7
- Rep Power
- 17
Re: Problem with eclipse?
Also in Eclipse you have to specify command line arguments (your program expects them). Define a 'Configuration'; i.e. specify that you want to run a Java application (not an Applet), define a name for the Configuration and define the main class to be started. The dialog has a tab where you can define the command line arguments for that main class. Just play a bit with it and you'll figure it out.
kind regards,
JosWhen people rob a bank they get a penalty; when banks rob people they get a bonus.
Similar Threads
-
problem of Eclipse IDE
By Dhanasekarani in forum EclipseReplies: 1Last Post: 04-02-2012, 05:34 PM -
eclipse problem
By sushma.salian in forum Web FrameworksReplies: 0Last Post: 02-23-2011, 12:45 AM -
Problem in eclipse
By amitabh in forum EclipseReplies: 6Last Post: 05-01-2010, 02:01 PM -
Problem with Eclipse
By lobodelbosque in forum New To JavaReplies: 3Last Post: 11-24-2009, 08:49 PM -
RAM Problem Eclipse
By samKnop in forum EclipseReplies: 3Last Post: 04-21-2009, 05:56 AM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks