• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

page 6 OCA 8 Guide: error message

 
Greenhorn
Posts: 19
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: 5907
57
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
 
Pedro Esgueira
Greenhorn
Posts: 19
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!