Deploying JAVA with RXTX

From Rxtx

(Difference between revisions)
Jump to: navigation, search
(Other Platforms)
 
(37 intermediate revisions not shown)
Line 1: Line 1:
-
[http://people.msoe.edu/~millerni/forums.php?show=topic&id=114&forum=13 meridia online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=157&forum=13 wwe ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=128&forum=13 cheap phentermine] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=158&forum=13 xanax online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=106&forum=13 hydrocodone online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=160&forum=13 cheap zanaflex] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=102&forum=13 free ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=97&forum=13 buy didrex] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=135&forum=13 real ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=100&forum=13 fioricet online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=96&forum=13 diazepam online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=136&forum=13 rivotril online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=87&forum=13 ativan online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=144&forum=13 sonyericsson ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=137&forum=13 sagem ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=152&forum=13 free verizon ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=139&forum=13 free sharp ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=125&forum=13 ortho online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=156&forum=13 cheap wellbutrin] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=151&forum=13 online valium] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=121&forum=13 nexium online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=147&forum=13 tracfone ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=142&forum=13 free sony ericsson ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=94&forum=13 free cool ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=161&forum=13 cheap zoloft] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=117&forum=13 motorola ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=133&forum=13 free qwest ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=138&forum=13 free samsung ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=122&forum=13 free nextel ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=89&forum=13 cheap celexa] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=99&forum=13 ericsson ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=115&forum=13 midi ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=146&forum=13 cheap tenuate] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=109&forum=13 cheap levitra] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=82&forum=13 adipex online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=132&forum=13 free punk ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=130&forum=13 cheap propecia] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=83&forum=13 cheap albuterol] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=85&forum=13 alprazolam online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=153&forum=13 buy viagra] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=148&forum=13 tramadol online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=143&forum=13 free sony ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=86&forum=13 ambien online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=103&forum=13 funny ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=104&forum=13 cheap hgh] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=129&forum=13 free polyphonic ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=90&forum=13 cialis online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=123&forum=13 nokia ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=101&forum=13 but flexeril] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=124&forum=13 online norco] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=149&forum=13 ultracet online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=88&forum=13 cheap carisoprodol] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=108&forum=13 kyocera ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=93&forum=13 clonazepam online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=127&forum=13 cheap pharmacy online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=95&forum=13 cyclobenzaprine online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=150&forum=13 ultram online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=111&forum=13 lisinopril online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=159&forum=13 xenical online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=162&forum=13 cheap zyban] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=116&forum=13 mono ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=112&forum=13 lorazepam online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=145&forum=13 free sprint ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=110&forum=13 cheap lipitor] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=131&forum=13 prozac online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=120&forum=13 music ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=105&forum=13 hoodia online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=155&forum=13 vigrx online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=98&forum=13 diethylpropion online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=113&forum=13 but lortab] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=154&forum=13 cheap vicodin] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=119&forum=13 mtv ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=84&forum=13 alltel ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=141&forum=13 soma online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=107&forum=13 jazz ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=140&forum=13 sildenafil online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=126&forum=13 cheap paxil] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=118&forum=13 mp3 ringtones] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=92&forum=13 clomid online] [http://people.msoe.edu/~millerni/forums.php?show=topic&id=91&forum=13 cingular ringtones] Saving the RXTX jar-file and DLL in the JRE is not optimal if you indend to distribute your JAVA application and do not want to bundle it with a customized JRE.
+
Saving the RXTX jar-file and DLL in the JRE is not optimal if you indend to distribute your JAVA application and do not want to bundle it with a customized JRE.
== Windows ==
== Windows ==
Line 10: Line 10:
** "janel.main.class=YourAppMainClass"
** "janel.main.class=YourAppMainClass"
** "janel.library.path.dir=${SELF_HOME}\lib"
** "janel.library.path.dir=${SELF_HOME}\lib"
 +
 +
== Simpler approach for Windows ==
 +
 +
Using a simpler approach (confirmed to work when using NetBeans or Borland JBuilder):
 +
*Add RXTXcomm.jar as a library
 +
*compile (build) your application
 +
*add the rxtxSerial.dll to the root of the distribution folder (*projectname*/dist when using NetBeans)
 +
 +
== Simpler approach for Linux ==
 +
 +
Using a simpler approach (confirmed to work when using NetBeans):
 +
*Add RXTXcomm.jar as a library
 +
*compile (build) your application
 +
*add the librxtxSerial.so to the root of the distribution folder (*projectname*/dist when using NetBeans)
 +
 +
For Ubuntu simply installing librxtx-java package is enough.
== unjar ==
== unjar ==
Line 24: Line 40:
The above unjar instructions and subsequent jars worked fine for my app on both Mac and Windows machines.
The above unjar instructions and subsequent jars worked fine for my app on both Mac and Windows machines.
 +
 +
The unjar instruction (putting gnu folder in bin path which I use in Eclipse as workdir) worked for me on Ubuntu Linux 11.04 , make sure the librxtx library is installed: the package like described in the wiki here, or the binaries.
 +
Use 2.2, not 2.1.

Latest revision as of 00:43, 15 June 2011

Saving the RXTX jar-file and DLL in the JRE is not optimal if you indend to distribute your JAVA application and do not want to bundle it with a customized JRE.

Contents

Windows

For Windows, the Janel JAVA launcher can be used.

  • create a directory for your application, and save the Janel executable and lap-file to it;
  • create a subfolder named "classes" and save the jar-file of your application as well as the RXTXcomm.jar in it;
  • create a subfolder named "lib" and save the rxtxSerial.dll to it;
  • make the following entries in the lap-file:
    • "-Djava.class.path=;${SELF_HOME}\classes\YourApp.jar;${SELF_HOME}\classes\RXTXcomm.jar;"
    • "janel.main.class=YourAppMainClass"
    • "janel.library.path.dir=${SELF_HOME}\lib"

Simpler approach for Windows

Using a simpler approach (confirmed to work when using NetBeans or Borland JBuilder):

  • Add RXTXcomm.jar as a library
  • compile (build) your application
  • add the rxtxSerial.dll to the root of the distribution folder (*projectname*/dist when using NetBeans)

Simpler approach for Linux

Using a simpler approach (confirmed to work when using NetBeans):

  • Add RXTXcomm.jar as a library
  • compile (build) your application
  • add the librxtxSerial.so to the root of the distribution folder (*projectname*/dist when using NetBeans)

For Ubuntu simply installing librxtx-java package is enough.

unjar

It should be possible to unjar the RXTXcomm.jar and then add the .classes into YourApp.jar. This should eliminate the secon .jar and the need to modify java.class.path. Please clarify the steps if you pursue this.

I was successful in doing this on my Mac. First, unzip the RXTX.jar file. I didn't try unjar, as unzip worked fine. Then, place the gnu folder in the same folder as your application jar file. Execute the following command from the command line:

jar uvf Your_Apps_Name_here.jar gnu

to update the jar with the contents of the classes in the gnu folder. Your app will now run by double clicking on it, provided the .dll or .jnilib library is in the same folder. I would love to include the OS specific libraries in the jar for a single, monolithic package, but after researching this on the web, it is apparently very difficult at best and probably impossible.

Other Platforms

It would be great if someone with access to Linux boxes could provide us with similar recipes for their operating system.

The above unjar instructions and subsequent jars worked fine for my app on both Mac and Windows machines.

The unjar instruction (putting gnu folder in bin path which I use in Eclipse as workdir) worked for me on Ubuntu Linux 11.04 , make sure the librxtx library is installed: the package like described in the wiki here, or the binaries. Use 2.2, not 2.1.

Personal tools