I
ilya
How using java to get the size of RAM, CPU information?
How using java to get the size of RAM, CPU information?
Google for "java win32 api" to find examples of accessing the Windows API
that should allow you to access this information.
How using java to get the size of RAM, CPU information?
How using java to get the size of RAM, CPU information?
But if I want to know for all operation systems?
Roedy said:If you find a library that does what you want, the author may have
implemented it in JNI for several platforms.
There not much of such stuff in the standard classes. The Java ethic
is you should not know much about your platform. The code is supposed
to work on all platforms, not be tweaked to work.
The OS-specific parts of the JRE [1] are, of course, precisely stuff that's
been tweaked to work on all supported platforms.
The OS-specific parts of the JRE [1] are, of course, precisely stuff that's
been tweaked to work on all supported platforms.
File i/o, networking etc are basically the same on all platforms.
This
permits the same Java API to access the native code to handle the
minor variations.
File i/o, networking etc are basically the same on all platforms. This
permits the same Java API to access the native code to handle the
minor variations.
Things like the registry are highly specific. Only Windows has one.
Roedy said:The OS-specific parts of the JRE [1] are, of course, precisely stuff
that's been tweaked to work on all supported platforms.
File i/o, networking etc are basically the same on all platforms.
Roedy said:The OS-specific parts of the JRE [1] are, of course, precisely stuff
that's been tweaked to work on all supported platforms.
File i/o, networking etc are basically the same on all platforms.
Only if "all platforms" means Lunux, Unix and Windows, period.
The OS-specific parts of the JRE [1] are, of course, precisely stuff
that's
been tweaked to work on all supported platforms.
File i/o, networking etc are basically the same on all platforms.
Roedy, you should get out more. ;-)
The Java API's can access a sort of "least common denominator"
of capabilities found on most systems (on all Java-hosting systems,
although that's a tautology). But where do I find the Java classes
that support DECnet, or ISAM files, or AF_UNIX sockets, or resource
forks, or security designators (not sure if that's the right term),
or doors, or ...?
Portability always involves some sacrifice of capability. It's
a matter of balance, not of universality.
The OS-specific parts of the JRE [1] are, of course, precisely stuff that's
been tweaked to work on all supported platforms.
File i/o, networking etc are basically the same on all platforms. This
permits the same Java API to access the native code to handle the
minor variations.
Things like the registry are highly specific. Only Windows has one.
So you can't very well write platform-independent code, though the
preferences system is a rough stab at it. Sun won't help you. You must
look to third parties or JNI.
Arne said:The OS-specific parts of the JRE [1] are, of course, precisely
stuff that's
been tweaked to work on all supported platforms.
File i/o, networking etc are basically the same on all platforms.
Roedy, you should get out more. ;-)
The C and POSIX standards define a lot. And most platforms are
either compliant or close.
I am not sure that I understand the period part.
Some of the API's are defined in the C standard. They will be
everywhere.
Other API's are defined in POSIX. OS'es like OpenVMS and Z/OS
are POSIX compliant.
According to Wikipedia QNX and VxWorks are also POSIX compliant. And
Symbian has a compatibility package.
Lew said:QNX uses message-passing over a real-time microkernel Javaat the core of
Even if "Lunux, Unix and Windows" were all that Java supported, or
supported well, that's still the great majority of OS installations.
(One can basically count Mac in that group.)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.