And lo, the chronicles report that Leung Yau Wai spake thusly unto the masses:
> 
> On Sat, 30 Jan 1999, Aaron Gaudio wrote:
> 
> > You won't...not from java at least. How you determine endianess will be
> > platform-dependant. In glibc (and possibly libc5) systems, look at
> > /usr/include/endian.h (you'll have to have native code for this). This
> > will be different on other systems (for example, Solaris).
> > 
> 
>       Many people will feel I very strange since I would like to know
> the system endianess.  Since I am working JNI so I need to concern about
> it.  So, I think I can determine it from the System property class!  But
> it is hard to know the endianess of all JAVA porting platform!
> 

JNI or no JNI, you can't get it from the System properties. From Java's point
of view, endianess is a non-issue, and is handled internally, therefore, why
would it be in the System properties (and it's not you can print them out
yourself and see)? Basically, if you need to find out the endianess of the
system dynamically, you'll have to do it with native code.

Unless you meant look at the os.arch system property, which may or may not
be a reasonable solution depending on your needs. In general, there's probably
a simple way to find out on-the-fly endianess via native code, without depending
on the location of macros in the os header files (because in that case, you
might as well use os.arch).

-- 

¤--------------------------------------------------------------------¤
| Aaron Gaudio                   mailto:[EMAIL PROTECTED] |
|                    http://www.rit.edu/~adg1653/                    |
¤--------------------------------------------------------------------¤
|      "The fool finds ignorance all around him.                     |
|          The wise man finds ignorance within."                     |
¤--------------------------------------------------------------------¤

Use of any of my email addresses is subject to the terms found at
http://www.rit.edu/~adg1653/email.shtml. By using any of my addresses, you
agree to be bound by the terms therein.

Reply via email to