my finding is that Nvidia Optimus does not work reliably now, and never did in the past. At least for me.
Even with a plain native application verifiably exporting that symbol.
However I used GLFW for that, which also does not do anything particularly different than LWJGL 2.9 when creating the OpenGL context and also does export that NvOptimusEnablement flag with value 1.
My specs were:
Laptop: Lenovo W530
Dedicated: Nvidia Quadro K2000M (driver version 341.21)
Integrated: Intel HD Graphics 4000
OS: Windows 7 64-bit
One weird thing I noticed is that even explicitly enabling the native application's exe file to use the dedicated card in the optimus graphics settings of the Nvidia control panel did not work.
It was still using the integrated card.
Another weird thing at least on my laptop: If I plug in an external monitor, the dedicated card IS ALWAYS being used, also despite of any optimus settings. So, without external monitor: always integrated, with external: always dedicated. Might also have been a thing with my notebook, though. I also set in the BIOS the flag: "Use Optimus Technology" instead of "use dedicated" or "use integrated". And the OS also did recognize both cards. So that should have worked.
To sum it up: Optimus totally sucks!