Welcome, Guest! Log In | Create Account

Simple Example

From jpen

Jump to: navigation, search

JPenExample.java shows how to listen pen events over a component and print them on the standard output. You need Java 5 to use JPen.

Running the Example on Linux

  1. Launch a bash shell and make shure that you have the following files in the current directory:
  2. Run the following commands:
    • $ export LD_LIBRARY_PATH=.
    • $ java -cp jpen-2.jar:. JPenExample

Running the Example on Windows

  1. Prepare a directory with the following files:
  2. Open a command prompt and go to the directory of the previous step. Run the following command:
    • java -cp jpen-2.jar;. JPenExample
    • Note: jpen-2.dll must be in the directory where you are running the example (or any other directory of your PATH) for JPen being able to load it. If jpen-2.dll can not be loaded, then JPen will only get data from your mouse (no pen pressure info...).