This week's book giveaway is in the HTML Pages with CSS and JavaScript forum.
We're giving away four copies of Testing JavaScript Applications and have Lucas da Costa on-line!
See this thread for details.
Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

page 6 OCA 8 Guide: error message

 
Greenhorn
Posts: 25
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

i'm new to programming and JAVA. I've bought the OCA 8 Guide book and already found the following error message when trying to do the exercise on page 6 of the book with the Zoo.java

The commands I'm giving are:
javac Zoo.java (no problems here)
javac Zoo (this is when i get the error message)

Error message: "Class names, 'Zoo', are only accepted if annotation processing is explicitly requested"

steps I took so far to try to solve this:
1) I first actually had another error related to the fact I also had installed a newer version of JDK, the 11. I uninstalled and took it out of the path, problem solved.
2) then the error message above showed up: I've checked in the command prompt using javac -version that I have jdk version 1.8.0_212 (by the way, I wasnt sure which version to download from the site, there is also the 211 . I also only download the jdk, I did not download the respective "212 demos and samples" as I just assumed it wasn't core functionality by its name). the link I download is jdk-8u212-windows-x64.exe
3) I have added my C:\Program Files\Java\jdk1.8.0_212\bin to the path

I've checked that the file name corresponds to the class Zoo.java.
The path says C:\Program Files (x86) ....., so I wonder if I should have instead downloaded the jdk that says Windows x86 (dk-8u212-windows-i586.exe) (?) . Anyone experienced the same?

Thank you for your feedback,
Pedro
 
Bartender
Posts: 7202
65
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
 
Pedro Esgueira
Greenhorn
Posts: 25
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Carey,

Thanks for your feedback, I now see what you mean. Thank you.
 
I'm so happy! And I wish to make this tiny ad happy too:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic