• 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: Could not find or load main class jdk1.8.0_60 in eclipse

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am trying to run a java program from eclipse but when I ran the program, I got the following error message.
"Error: Could not find or load main class jdk1.8.0_60"

I tried to solve the issue using the following steps but no luck

1.opened buildpath> Libraries> Jre system library
2. changed the JRE library to the system mentioned JDK

But after doing the following steps also I am not able to resolve it.

Can anyone help on this? and let me know what is missing here?

PFA screenshot for your reference.

Best Regards,
Suvendu
JDK_Error.jpg
[Thumbnail for JDK_Error.jpg]
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this: Windows -> Preferences -> Installed JREs.  Highlight your Java 8 JRE and press the edit button.  Everything look okay?  Does the JRE say jdk1.8.0_60?
 
SuvenduSekhar Panda
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes, I am using jdk1.8.0_60 instead of JRE 1.8.0.60.
PFA reference attached screenshot.
reference.JPG
[Thumbnail for reference.JPG]
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you have a C:\Program Files\Java\jdk1.8.0_60\jre\lib folder with the correct jars in it?
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are you running this?  What does your Run Configuration look like?
 
SuvenduSekhar Panda
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes.
 
SuvenduSekhar Panda
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I simply right click the java application as mentioned in the previously attached screen shot. and the the configuration is like below attached screenshot.

Please let me know If I am going wrong?
config.JPG
[Thumbnail for config.JPG]
 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm... try right-clicking the program, select Run As... select Java Application.  If there's an error, copy and paste the entire text.
 
SuvenduSekhar Panda
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is only error message displayed in the console. As seen in the previous screen shot.

Error: Could not find or load main class jdk1.7.0_79

 
Knute Snortum
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you run any other projects in Eclipse?  Can you run from the Run Configuration window? (Press the Run button)  Can you run from the Play button in the toolbar?
 
and POOF! You're gone! But look, this tiny ad is still here:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic