Hi
I've already successfully used shaders with JMonkeyEngine 3, Ardor3D and JOGL 2. The GLSL version supported by your program doesn't depend on the JOGL version you use but rather on your OpenGL driver and your graphics card. I confirm that gl_VertexID is an input variable available since GLSL 1.10 (but later in the core, see
here) as you can see
here.
At first, keep in mind that you don't have to declare gl_VertexID as it is a variable of the language. Secondly, this input is available if and only if GL_EXT_gpu_shader4 is supported on your hardware. Thirdly, you have to use VBOs and no display list otherwise this variable might be undefined.