permaculture playing cards*
The moose likes Beginning Java and the fly likes Java or Netbeans error? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java or Netbeans error?" Watch "Java or Netbeans error?" New topic

Java or Netbeans error?

Vesko Jel
Ranch Hand

Joined: Jun 06, 2008
Posts: 30
I have following method in java class

and Netbeans 6.5 underlines "777"-> cannot find symbol error

Little confused!!?!
Am I blind ? Something overlooked?

Crosspost here: Netbeans forum

[Thumbnail for error1.JPG]

Ankit Garg

Joined: Aug 03, 2008
Posts: 9291

Vesko which version of JDK do you have on your system ??

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
Vesko Jel
Ranch Hand

Joined: Jun 06, 2008
Posts: 30
1.6.0_10 but updated to 11
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24183

Hi Vesko,

The code is perfectly good in Java 5 or later, but there is indeed no such method in JDK 1.4 or earlier. You must therefore have the project JDK set to a 1.4 or earlier version, and/or the compiler language compliance level set to JDK 1.4 or earlier.

Since it's "777" that's being underlined, my guess is it's compiling against a 1.5 library using the JDK 1.4 compiler setting.

[Jess in Action][AskingGoodQuestions]
Vesko Jel
Ranch Hand

Joined: Jun 06, 2008
Posts: 30
I'm with 1.6, but project has been compiled with JDK 1.4 .
Thanks Ernest Friedman-Hill !!!
A lesson for me - from now on, all JDKs installed or just to look in the last line in javadoc .
It is sorta covered in the JavaRanch Style Guide.
subject: Java or Netbeans error?
Similar Threads
unable to get response from payment website
While replacing char of soap response then it throws error
populate one drop down on change of other using ajax and servlet with jsp page
Posting one selected option value in two forms
Validation for the Indexed properties dynamic fields in struts (JSP)