oh my god, IDEA 5.0 do not understand java 5.0

Hello, all experts,
The IDEA 5.02 warn the System.out.printf with "can not resolve mehod printf(java.lang.String, int)...." .
but I can compile successfully, why?

5 comments
Comment actions Permalink

Evans Zhang wrote:

The IDEA 5.02 warn the System.out.printf with "can not resolve mehod printf(java.lang.String, int)...." .
but I can compile successfully, why?


Have you set the 'language level project' to "5.0"? (In the 'module
settings dialog')?

Regards,
Edwin

0
Comment actions Permalink

Or more correctly please ensure the JDK configured for the project is 1.5

-


Maxim Shafirov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

yes, language level for project is 5.0!
but, this is a module of a project, another module is j2me game, so it can not set to 5.0, just 1.4, I guess the problem is here

0
Comment actions Permalink

yes, the language level is 5.0 and the jdk is java 1.5
this is a module of a project, another module is j2me game with language level 1.4 and wtk 2.2
so I guess the IDEA do not know the module is of 5.0 and antoher module is of 1.4
this is a bug? I believe you can reproduce it easy:
new a j2me project
addd a java module, set language level to 5.0 and jdk to 1.5
write 'System.out.printf("hello, IDEA") '
watch what happens?

0
Comment actions Permalink

Unfortunately this is a known issue with IDEA and mixing
modules with different language levels can result in a lot
of pain and frustration.
http://www.jetbrains.net/jira/browse/IDEADEV-2450

You could vote for the issue to increase its chances of getting
resolved.

Vince.


0

Please sign in to leave a comment.