Linux Section Index
How can I limit the size of a growing logfile Java creates on Linux? Can I have a file that "loses" data at the beginning to keep it from growing past a certain size?
Files don't work that way, but you can rotate logs to keep the size under control. You have a couple of ways to do that easily:
The log4j package supports log rotation
If you're working in a JDK1...more
What is the thread limit in Sun's jdk1.3 on Linux?
The limit on native threads comes from the system, not from Java. See this FAQ entry for a discussion of managing thread limits.
There is no limit on creation of green threads, other than availabl...more
Can I have Java Web Server on Linux?
According to Sun's Java Web Server FAQ:
No. There is no supported version of Java Web Server for Linux, but there are customers who have successfully run the Solaris version of Java Web Server 2.0...more
What are the hardware requirements for running a servlet environment on Linux with Apache, Tomcat, and PostregSQL?
It depends entirely on the application. Most Linux software doesn't publish hardware requirements, which are usually fictions anyway. You can get a development workstation running those components...more
The javac compiler is slow and expensive - I need a way to optimize for my application.
The javac compiler is slow and expensive - I need a way to optimize for my application.
I'm trying to run a Java compiler as a response to a POST to a Web site (users submit programs to compile) - ...more
Can I cut, copy, and paste between AWT and other X applications under Linux?
Yes - sometimes it's easy, and sometimes not. X has two commonly used mechanisms for copying and pasting between applications, which can be a bit confusing:
The primary selection: this is typical...more
Can I run a JDK under FreeBSD?
Yes. Ports of the Sun JDK for FreeBSD are published at this site.
What's the difference between the "client" and "server" virtual machines in JDK1.3 and later?
They both use the HotSpot performance engine, but the server VM optimizes aggressively up-front for the benefit of long-term performance, while the client VM defers a lot of optimization to favor ...more
Can I increase the number of file descriptors my app can support by increasing the number of threads? Since every thread on Linux is a process, and every process allows a certain number of file descriptors, it seems that this should be possible.
No. It's true that every thread takes an entry from the pid table. But they are still threads, not heavyweight processes, and the same file descriptor table is shared by all the threads.
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
How can I identify the top-level thread of a Java process?
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
Why has the -Xnoagent option gone away in JDK1.3.1?
That option is only meaningful with a JVM running green threads. JDK1.3.1 only ships a HotSpot JVM running native threads.
How can I generate native code instead of classfiles from my Java source?
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
How do I run Java programs from a crontab entry?
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