Embedded Freaks..

August 8, 2008

Using Rxtx without installing it to JAVA_HOME

Filed under: java — Tags: , , — kunilkuda @ 3:24 am

Sometimes, it is very annoying to know that you just cannot install your Rxtx library in the JAVA_HOME (lack of admin privilege, you don’t want to clutter your JAVA_HOME with trashes, you need easy uninstallation, etc).

So, I’ve looked around in JNI usage, and I found a way to handle this problem.

  1. Put your Rxtx library (RXTXcomm.jar, librxtxParallel.so, librxtxSerial.so) in the local project directory.
  2. Run your project with this argument: -Djava.library.path=<your local Rxtx project directory>

If you use Netbeans, you can add the argument in: Project Properties -> Run -> VM Options

Netbeans Project Properties

Netbeans Project Properties

About these ads

1 Comment »

  1. Thanx a lot… it helps me lot.

    Comment by bharat patel — May 10, 2012 @ 10:04 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Silver is the New Black Theme Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: