• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting error while running this code from Head First Java in Eclipse  RSS feed

 
Somnath Rakshit
Greenhorn
Posts: 8
C++ Google App Engine Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded this code from Head First Java. But when I tried running it on Eclipse, it gives this error message. Please help.
and this was the error message: Jan 02, 2015 8:10:36 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Untitled.png
[Thumbnail for Untitled.png]
 
Tomas Linhart
Ranch Hand
Posts: 86
2
Java Ubuntu VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Google suggests, manually creating the Prefs key under HKEY_LOCAL_MACHINE\Software\JavaSoft should do it.
 
Campbell Ritchie
Marshal
Posts: 56541
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code won't compile. You haven't copied it right. You have missed out a { at the beginning of the play method.
 
Campbell Ritchie
Marshal
Posts: 56541
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
Somnath Rakshit
Greenhorn
Posts: 8
C++ Google App Engine Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks. it works fine now.
 
Campbell Ritchie
Marshal
Posts: 56541
172
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!