This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The Da Vinci Machine Project is developing the reference implementation of JSR 292, new JVM features for multi-language support. Part of the project has a proposed changes to "javac" to allow Java code to access the new JVM features. Here are the relevant URLS describing the Java language changes (they accompany javac patches): 6754038: writing libraries in Java for non-Java languages requires method handle invocation http://hg.openjdk.java.net/mlvm/mlvm/langtools/file/tip/meth.txt 6746458: writing libraries in Java for non-Java languages requires support for exotic identifiers http://hg.openjdk.java.net/mlvm/mlvm/langtools/file/tip/quid.txt In order to use NetBeans to develop code with the new features, error highlighting needs to be suppressed on the new features. It might be helpful (but is probably not necessary) to teach NetBeans about the relaxed typing of MethodHandle.invoke and Dynamic.* sites; it is sufficient for the present to simply treat those as a kind of wildcard call, by suppressing overload resolution and (in the case of Dynamic) name resolution. Ideally, the lexer could recognize the #"new identifier syntax" for exotic identifiers, but it would be sufficient to skip over it as a sort of "unknown node", since the exotic identifiers would be used only to call out to non-Java languages, or to a metaobject protocol. Supporting such things (which aren't fully invented yet) is not in the scope of this bug. I'm hoping to recruit someone from the mlvm or jdk-languages communities to do this work (or show me how to do it). This RFE will track progress of the work. Thanks.
RFEs like this should eventually be addressed by referring language questions to javac itself. Now, I put my special javac.jar on the bootclasspath of the javac command which ant uses to build the project which uses the extended language features. I can do this easily by adding a line like this to nbproject/project.properties : javac.compilerargs=-Xlint:unchecked -J-Xbootclasspath/p:${reference.langtools-javac.jar} -XDinvokedynamic Ideally, these special options, along with the special jar, should (somehow) be absorbed into the NetBeans editor, and used to perform all sorts of textual analysis of the Java code which will be compiled by that special javac. I think the javac guys are eager to work on this; it's certainly better than writing half of your own compiler (or forking the code). For the moment, since the new features are used infrequently so far, I'd be happy with the partial solutions outlined in the previous comment.