Linux Section Index | Page 2
How to pass values containing spaces using Runtime.exec(command)? There doesn't seem to be any way to include a space character within an argument.
Use the Runtime.exec(String) call, with each argument in its own element of the string array. This is what Java does, under the covers, after separating the arguments to Runtime.exec(String) by ...more
Why do applets that look good under Netscape/Windows look terrible under Netscape/Linux? The layout doesn't work, the text fields are too small to contain the text, etc.
This usually happens with applets that have been carefully laid out to look good in Windows. For better or worse, the AWT doesn't specify much about what its controls look like - and they can end ...more
Because each thread has a separate PID that shows up in ps and top output, it's difficult to figure out which is the top-level process. Two possible ways to do it are: ps -fax and pstree -...more
The two best-support answers are: The gcj compiler is part of the GNU compiler collection and can be found in any recent distribution of gcc. It builds native applications from Java source or cla...more
Processes run by crontab are owned by the user who created the crontab entry, but they don't inherit the user's login environment - including the PATH environment variable. So they don't usually k...more
How do java.lang.Runtime.totalMemory() and freeMemory() relate to values reported by top and other tools? In particular, why do Java processes use so much memory (according to top) above the limit set by the Xmx option and above the value reported by totalMemory()? Also, why does the memory use reported by top never decrease?
How do java.lang.Runtime.totalMemory() and freeMemory() relate to values reported by top and other tools? In particular, why do Java processes use so much memory (according to top) above the limit ...more
A daemon usually means some service that is started up and run persistently when the system boots or enters a certain init state. There are standard ways to start such daemons from scripts that ar...more
Java doesn't give you direct access to non-portable capabilities like Unix/Linux pipes. You can still do quite a few things with pipes, for example: Create a named pipe by invoking the mkfifo uti...more
How can I run a remote program using Runtime.exec()? For example, I'd like to launch a remote program on a Linux box from Windows.
Runtime.exec() runs programs locally, just as if you'd typed the command into a command shell. On a Linux box, it's as if you'd typed the command into a local bash shell; on a Windows box, it's as...more
Any use of the AWT requires access to an X server - even if you are not creating any windows. A couple of ways to handle it are: Run a virtual-frame-buffer version of an X server, as discussed in...more
If you obtain the tar-based distributions, you can install them anywhere you want. If you use the RPMs, the installation location varies. For the two current (as of this writing) releases, the loc...more
Check out the jGuru Tools FAQ.
Check out the jGuru Tomcat FAQ.
Check out the jGuru Threads FAQ.
How can I control the userid of a remote process, such as a servlet, rmid process, or EJB running on behalf of a particular user?
Developers sometimes need to write logic to be run in remote processes that must assume the permissions of a particular user on the remote machine. For example, you might want to write JSP or serv...more