Linux Java Programming

Using strace with Java

As with native applications, using strace with Java will give you some visibility into how your Java application is stressing the kernel. The challenge to using strace is to run it on the java executable, not on the java launch script. We do this with a modest trick using the debugger backdoor built into the java launch script. DEBUG_PROG strace java -green Setting the debug_prog environment variable causes the java launch script to invoke the java executable with the specified command. The...

The Linux strace Utility

Strace is a system call tracing utility it traces, in detail, the use of kernel facilities by applications. strace is found in most distributions and is usually installed by default. Red Hat users can load it from the strace RPM. What is a system call The concept is foreign to many Java developers and often a bit bewildering to C C++ programmers. As shown in the discussion of UNIX and Linux in Chapter 5, What Is Linux in the section The Structure of UNIX, there is a clear division of labor...

UNIX and GUIs

Until the late 1980s, the UNIX world was largely text-oriented. UNIX applications, tools, and utilities tended not to rely on graphics of any form. Applications that needed graphics, 2D or 3D, had to code to the proprietary graphical interfaces provided by each of the UNIX vendors and create their own GUIs not a friendly environment for innovation. This began to change with the advent of the X Window System, which arose from research at MIT's Laboratory for Computer Science. The X Window System...

Listing B10 Perf Treejava

1 package com.macmillan.nmeyers 8 class PerfTree extends JScrollPane 11 JPopupMenu popupMenu null 13 SelectThreads.ChooseThread chooseThread 15 MouseListener mouseListener null 16 PerfTree(PerfTreeNode n, FindMethod fm, SelectThreads. 19 root n 24 void initializeRoot(PerfTreeNode n) 3 6 popupMenu new JPopupMenu() 38 new AbstractAction( Goto this Method ) 39 public void actionPerformed(ActionEvent e) 48 new AbstractAction( Select a Method to Analyze ) 49 public void actionPerformed(ActionEvent...

Configuring Fonts in JDK12

JDK1.2 supports scalable fonts as the primary method of glyph generation. Although it is still capable of obtaining fonts from the X server, its preferred approach is to work directly with scalable fonts in the form of TrueType, PostScript Type1, or F3 font files. By chart ei-plain-16 chj3.rttr- ita ic-l6 Figure 14.5 JDK1.2 obtains scalable fonts directly from scalable font programs and from the X server. The ShowFonts12 program (see Appendix B, Miscellaneous Program Listings ) is a JDK1.2...

Configuring Fonts in JDK11

The font configuration files can be found in the lib subdirectory of SDK1.1 and JRE1.1 installations. The relevant file is font.properties, and its many variants for locales (font.properties.ja for Japan, font.properties.ru for Russia, and so on). The job of the font.properties files is to stitch together various X Window System fonts to support the two-byte Unicode set used by Java. Unicode supports all the characters in the world, whereas the individual X fonts do not. The font.properties...