[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rxtx
Subject:    Re: TowerJ and RXTX
From:       Trent Jarvi <taj () hex ! linuxgrrls ! org>
Date:       2002-07-11 21:00:06
[Download RAW message or body]



On Thu, 11 Jul 2002, Shreyas Kejariwal wrote:

> Hello everyone,
> 
> We have an application with an GUI using Swing. Since the GUI was running slow on \
> the system with 200 MHz processor and 64 MB RAM (client requirements), we decided \
> to use the Ahead-of-Time (AOT)  Compiler by TowerJ (www.towerj.com) . The TowerJ \
> product comes with a 1.3.1 JRE and supports AWT and swing. However, the Swing and \
> AWT are not supported if we an external JRE is used. So we are kind of forced to \
> use the the JRE provided with the TowerJ product. 
> But our main problem is difficulty in using the RXTX with the TowerJ's JRE. Please \
> let me know how I can configure/install RXTX so that it can be run with the \
> TowerJ's JRE. I already have the RXTX - 1.5-9pre4 installed on my system and it \
> works fine with the J2SDK 1.4.0. 
> Also, if you folks have an idea of other AOT compilers which can speed up java \
> application on system with low resources (like the one we have it here: 200 MHz, 64 \
> MB RAM) then please let me know. 
> Thanks in advance.
> 
> Have a good day!
> Shreyas
> 
> 
> 

I only know what is required on RXTX's part here.  You may have to ask on
a TowerJ mail-list to fill in the missing parts.

Shared Libraries:

With rxtx 1.5 the shared library is libSerial.so  libSerial.so is usually
a symbolic link to the actual library.  For instance:

	librxtxSerial.so -> librxtxSerial-2.1-3.so

This shows 2 things.  First, you will notice that the shared lib is going
to be moving from libSerial.so to librxtxSerial.so in the near future.
The change is to avoid conflicts on some systems that have their own
Serial libraries.  Second, just moving the symbolic link is not going to work.
It would end up being a broken symbolic link.

libSerial.so will need to be on the LD_LIBRARY_PATH.  Most of the current
JDK's override this in their own scripts to avoid library version
conflicts with the system libraries.  This is where you need to figure out
what TowerJ does.  for starters you may just run

	find /path/to/TowerJ -name \*.so

That should give you an idea where all the shared libraries are hiding.

The Jar files:

Since you are using rxtx 1.5 the jar issue is a little simpler.  Again,
in the near future there will be a name change.  Comm.jar tended to
confuse people who mixed rxtx 1.4 and 1.5 since comm.jar comes with Sun's
commapi so it will be renamed to RXTXcomm.jar.

The file should need only be in your classpath.  With jdk 1.3+ there is
a directory ....java/jre/lib/ext which you can place the file in and it
will automatically be in your classpath.  You can also set the CLASSPATH
environment variable or specify it on the command line with JDK.

So, for run time you just need to match the above requirments in TowerJ's
terms.

To configure and compile will probably require modification of the
configure.in file.  Assuming glinux host OS the code of interest is:

[ case $OS_NAME in
Linux)
        LDFLAGS=-lpthread
        check_kernel_headers
        check_java_headers
        CFLAGS=$CFLAGS" -D__need_timespec"
        case $JAVA_VERSION in

        1.2*|1.3*|1.4*)
                #fix_parameters $JPATH/jre/lib/javax.comm.properties
                CLASSPATH=".:\$(TOP):\$(TOP)/src:"`find $JPATH/ -name
RXTXcomm.jar |head -n1`
                JHOME=$JPATH"/jre/lib/ext"
                RXTX_PATH="\$(JPATH)/jre/lib/\$(OS_ARCH)"
        ;;

...

JHOME is where the jar will be placed
RXTX_PATH is where the shared library is placed.

Its hard to know how TowerJ is going to match up with the flow control but
once its figured out and the above variables are set to what you find
above, it should be fairly close.

After making the changes, run autoconf and then rerun the configure
script.

You may need to add more flow control to handle the TowerJ vendor.  An
example is in the HP-UX config:

        case $JAVA_VENDOR in
                Hewlett\ Packard\ Co\.)
                ;;
                *)
                ;;
        esac

If you run into more questions on the RXTX side feel free to ask.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic