File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java or Netbeans error?

 
Vesko Jel
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
error1.JPG
Netbeans
[Thumbnail for error1.JPG]
 
Ankit Garg
Sheriff
Posts: 9495
22
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vesko which version of JDK do you have on your system ??
 
Vesko Jel
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1.6.0_10 but updated to 11
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24204
34
Chrome Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Vesko Jel
Ranch Hand
Posts: 30
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic