Hello Guest

Running the Ant demo classes

  • 2 Replies
  • 4109 Views
Running the Ant demo classes
« on: November 28, 2015, 15:41:44 »
Hi everyone,

No problems building the library with Ant, but I'm a bit confused about how the examples are run from Ant?

The build instructions list the following:
ant demo -Dclass=<demo class> – Runs one of the LWJGL demos in the test module

However, I don't see a list of available options for <demo class>

I've looked in the following folder
bin/Tests/org/lwjgl/demo

and found various folders containing classes with names like "Mandelbrot" etc.,

but no variation on the class (with or without extension) runs the demo.
e.g,
[Demo] Error: Could not find or load main class Mandelbrot.class

« Last Edit: November 28, 2015, 15:43:20 by arkiruthis »

*

Offline spasi

  • *****
  • 2261
    • WebHotelier
Re: Running the Ant demo classes
« Reply #1 on: November 29, 2015, 17:02:11 »
You must use the full classpath, for example:

Code: [Select]
ant demo -Dclass=org.lwjgl.demo.glfw.Gears
A list of available demos does not exist, but you can have a look in modules/core/src/test/java/ for classes with a main method. Most demos are a single class, but some are more complex. For example, to run the OpenCL Mandelbrot demo:

Code: [Select]
ant demo -Dclass=org.lwjgl.demo.opencl.CLGLInteropDemo
You can also pass JVM arguments with (horrible, I know):

Code: [Select]
ant demo -Dclass=org.lwjgl.demo.opencl.CLGLInteropDemo -Djvmargs="-Dorg.lwjgl.util.Debug=true"

Re: Running the Ant demo classes
« Reply #2 on: November 30, 2015, 09:24:44 »
Fantastic, thank you so much spasi! Coming from c++ I'm a bit rusty on Java and forgot about the fully qualified package names.

The demos now work great. :)