• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error when "Run" pressed in IDE

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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]
 
Marshal
Posts: 4491
572
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The code entered in IDE seems to be right and runs fine with CMD.
 
Rancher
Posts: 5008
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 22
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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".
 
Marshal
Posts: 79151
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I edited out String to correct code and now this works.
 
reply
    Bookmark Topic Watch Topic
  • New Topic