Win a copy of Mastering Non-Functional Requirements this week in the Design forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error when "Run" pressed in IDE  RSS feed

 
Johnson Paege
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While trying to write a starting program after fresh download and setup of Eclipse IDE I am getting this error message as show in image attached when "Run" button is pressed -
eclipse-setup.jpg
[Thumbnail for eclipse-setup.jpg]
 
Ron McLeod
Saloon Keeper
Posts: 1486
210
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your IDE is alerting you that there is a problem that needs to be addressed.  In Java - case matters.

 
Johnson Paege
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code entered in IDE seems to be right and runs fine with CMD.
 
Norm Radder
Rancher
Posts: 1869
26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code entered in IDE seems to be right and runs fine with CMD

Have you solved your problem now?  If not, try compiling the code instead of running it to get some error messages that can be copied and pasted here to show what the errors are.
 
Adam Turner
Greenhorn
Posts: 22
1
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes very case sensitive. Try making "apples" into "Apples" - classes should always start with a capital letter. The name of the class should usually match whatever you called the class-file when you created it, also.
And "string" should be "String".
 
Campbell Ritchie
Sheriff
Posts: 54478
150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch
The only way you can get that code to run is if you have a class somewhere called string. In which case it will thrown an Exception because of the incorrect format of the main method signature. By the way: it should read String[] args (or String... args) because the [] is part of the type not part of the parameter name. You must have a very old book if it shows the [] after args.
 
Johnson Paege
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried everything as mentioned above and still getting same error. Even a blank program with no code gives same error.
 
Johnson Paege
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I edited out String to correct code and now this works.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!