File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 9466

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: 24199

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 .
I agree. Here's the link:
subject: Java or Netbeans error?
It's not a secret anymore!