Java LWJGL Cant use allocateDirect(int) undefined for type ByteBuffer

http://www.lwjgl.org/wiki/index.php?title=Using_Frame_Buffer_Objects_(FBO)

I copied EXACTLY from the LWJGL wiki about Using Frame Buffer Objects the code:

    IntBuffer buffer = ByteBuffer.allocateDirect(1*4).order(ByteOrder.nativeOrder()).asIntBuffer(); // allocate a 1 int byte buffer

The LWJGL is installed correctly but i get

The method allocateDirect(int) is undefined for the type ByteBuffer

I dont know how to fix it. I updated my LWJGL lib and natives. Help

You probably imported some incorrect ‘ByteBuffer’ class. It should be ‘java.nio.ByteBuffer’.

BufferUtils.createIntBuffer(int)?

Or even better:

glGenFramebuffer();

oh thats helpful. Also i noticed some of the functions in the wiki have EXT added to the end of its name. Why so?

also how do you use the glGenFrameBuffer() one.

Functions with EXT are the extension version of the function, in the EXT (multi-vendor) namespace. FBOs became standard in OpenGL 3.0, but were supported by most vendors as extensions long before then. Almost everything in OpenGL 2.0 and up was an extension before it became standard.

old answer deleted

The question i really want to ask is how do you go from texture id number to Texture Object? Because when i use glGenTextures I have no way of saving the Texture Object since it only returns to me an integer.