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

List:       rxtx
Subject:    Re: [Rxtx] arch
From:       Trent Jarvi <tjarvi () qbang ! org>
Date:       2006-02-24 14:03:13
Message-ID: Pine.LNX.4.61.0602240659510.11239 () www
[Download RAW message or body]

On Fri, 24 Feb 2006, Dr. Douglas Lyon wrote:

> Hi All,
> I think we need the moral equivalent of
> the unix ARCH function in Java.
> So
>>  arch
> i686
> Allows me to put the bin/i686 directory into
> my path, for CLI execution.
>
> We could use the arch function to map a consistently named
> file system containing the RXTX lib into a fully-qualified
> URL. Once this is done, I think we could beam over signed jars
> and place them into the java.library.path...using a reflection hack.
>
> This would automatically install the native libraries for all serial
> port users.
>
> What do you think of that?
>


while doing configure to build rxtx, the configure script does this - with 
java.

...
checking os.arch  i386
...

OS_NAME=`run_conftest os.name`

which is:

run_conftest()
{
         echo $ECHO_N checking $1   " " 1>&6
         if test x$JPATH = x; then
                 VAR=`java -classpath .:$CLASSPATH:\`which 
java\`../lib/RXTXcomm.jar conftest $1`
         else
                 VAR=`$JPATH/bin/java -classpath .:$CLASSPATH:\`which 
java\`../lib/RXTXcomm.jar conftest $1`
         fi
         echo $VAR  1>&6
         echo $VAR
         return
}

and Finally:

build_conftest()
{
cat > conftest.java << EOF
/* this may be usefull for getting around java cobwebs during build */
public class conftest
{
         public static void main(String[[]] args)
         {
                 System.out.println(System.getProperty(args[[0]]));
         }
}

...

Did you want that in rxtx?  Its rather simple.  If so, where?

--
Trent Jarvi
tjarvi@qbang.org

_______________________________________________
Rxtx mailing list
Rxtx@qbang.org
http://mailman.qbang.org/mailman/listinfo/rxtx
[prev in list] [next in list] [prev in thread] [next in thread] 

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