Operational Systems & Java
Visit us here and you will find
much more tips!
Receive our newsletter with new tips! Almost 6,000 subscribers (by June 2001) can not be wrong!
They read our tips every week!
To subscribe to The Java FAQ Daily send empty e mail to:
javafaq tips subscribe@topica.com
or visit at:
http://www.topica.com/lists/javafaq tips/
Operational Systems & Java
Is anyone aware of any way to determine OS type, version...
Answer: There is in the java.lang.System
try first:
Properties p = System.getProperties();
System.out.println(p);
to see what properties you can get(CPU among others)..
you then can:
String prop = System.getProperty("aproperty(the CPU among other)");
Does anyone know if there is an easy way to invoke UNIX shell scripts from a
Java application.
Answer: There is!
execute a shell and then write the name of the shell script on the shells stdin stream.
Process child = rtime.exec("/bin/bash");
BufferedWriter outWriter = new BufferedWriter(new
OutputStreamWriter(child.getOutputStream()));
outWriter.writeLine("filename");
outWriter.flush();
Is there a way to differentiate the enter key on the main keyboard from the enter
key on the keypad?
Answer: I don t think so, they re both represented by the character code 10.
Is there any way to manage Systray Icons with Java? I didn t even find anything in
the Microsoft packages...
Answer: You must create a C/C++ program that call directly the
NotifyIcon API to display/manage the Icon in the Systray. Then
call the program from Java with JNI.
Currently I m running two operating systems on one machine, Windows 2000 and
Windows ME...
file:///F|/a_jsite/350_tips/os_win_linux.htm (1 of 8) [2001 07 08 11:24:58]
footer
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved