Difference between revisions of "How to install"

From JPCT
Jump to: navigation, search
(Created page with 'There isn't much to install. The 3D engine itself is one jar only. It can be found in the distribution's lib-directory. Just include that jar into your classpath and you are read...')
(No difference)

Revision as of 22:14, 3 April 2009

There isn't much to install. The 3D engine itself is one jar only. It can be found in the distribution's lib-directory. Just include that jar into your classpath and you are ready to compile and/or run jPCT applications. When using the hardware renderers, you have to include some LJWGL jars in addition. jPCT based applications require the lwjgl.jar and the lwjgl_util.jar. Both are included in the distribution and can be found in the lib-directory as well. In addition, you have to specify the location of the native components that LWJGL uses to access the hardware. Under Windows, these are so called DLLs, undr Linux SOs etc. To include them, the easiest way is to specify the java library path. On the command line, this is done by adding a -Djava.library.path-parameter to your command. For example

java -classpath jpct.jar;lwjgl.jar;lwjgl_util.jar;myJar.jar -Djava.library.path=path_to_the_native_stuff MyTest

if the native components are located in the directory "path_to_the_native_stuff". Please note that you only have to specify the directory, not the files themselves (this is different compared to the classpath-paramater).

In Eclipse, you can add the -Djava...line in the "VM Arguments" Textbox of your "Arguments" Tab in the Run Configuration of your application. Another option is to add it to the lwjgl.jar in the Build Path.

After configuring this, you should be able to compile and start any jPCT based application.