문제

So I have Java 7 (64bit Windows build 84) and NetBeans 6.8. I want to use the new invokedynamic stuff in Java 7 and compile from NetBeans but I can't figure out how to get NetBeans to run the program with the right options except when I build it (run fails, build works).

The code needs to be compiled with the option -XDinvokedynamic and run with -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles -XX:+EnableInvokeDynamic. So, in the Project Properties dialogue, I change the Additional Compiler Options in Build to include -XDinvokedynamic but that only affects the build not when I click run.

I believe adding the -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles -XX:+EnableInvokeDynamic options to the VM Options box in Run works correctly though (although I can't be sure).

So, simply how can I get NetBeans to use compile with -XDinvokedynamic whether I'm building or just running it?

도움이 되었습니까?

다른 팁

In each project's properties, in the compile part you can specify additional compile options like this one.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top