Java

From otaking wiki

(Difference between revisions)
Revision as of 20:28, 16 June 2009
Putte (Talk | contribs)

← Previous diff
Revision as of 21:00, 16 June 2009
Putte (Talk | contribs)

Next diff →
Line 1: Line 1:
-Java is a programming language from Sun Microsystems designed to run on set-top boxes and various small devices. However, due to Java being too slow and bloated, that plain failed miserably.+Java is a programming language from Sun Microsystems designed to run on set-top boxes and various small devices. However, due to Java being too slow and bloated, that plan failed miserably.
Repurposing the whole thing for writing desktop applications also largely failed, partially for the reasons mentioned and partially because the GUI toolkit, AWT, was a useless piece of crap. A second attempt at a GUI toolkit, called [[Swing]], put another layer of crap on top of AWT, resulting in something equally useless but slower, uglier and more unreliable. Repurposing the whole thing for writing desktop applications also largely failed, partially for the reasons mentioned and partially because the GUI toolkit, AWT, was a useless piece of crap. A second attempt at a GUI toolkit, called [[Swing]], put another layer of crap on top of AWT, resulting in something equally useless but slower, uglier and more unreliable.

Revision as of 21:00, 16 June 2009

Java is a programming language from Sun Microsystems designed to run on set-top boxes and various small devices. However, due to Java being too slow and bloated, that plan failed miserably.

Repurposing the whole thing for writing desktop applications also largely failed, partially for the reasons mentioned and partially because the GUI toolkit, AWT, was a useless piece of crap. A second attempt at a GUI toolkit, called Swing, put another layer of crap on top of AWT, resulting in something equally useless but slower, uglier and more unreliable.

Reportedly Java now runs OK on a powerful server, assuming you don't need to run any other applications.

Workarounds for common problems

Double-click doesn't work reliably

Java on Unix uses X resources to determine how close together clicks must occur to register as double-clicks. The default is 200 ms, which many people think is unreasonably fast.

To change it:

echo '*multiClickTime: 350' >> ~/.Xdefaults
xrdb ~/.Xdefaults

Applications are using the wrong language

The Java runtime environment works in mysterious and brain-damaged ways to determine the user's locale settings on different platforms. On Unix, the language used in most applications is determined by looking at the LC_CTYPE environment variable, which is only supposed to affect the text encoding.

Workaround: Change your LC_CTYPE before running Java applications. Something like this can be put in a wrapper script:

test -n "$LANG" && JAVALANG="$LANG"
test -n "$LC_MESSAGES" && JAVALANG="$LC_MESSAGES"
test -n "$LC_ALL" && JAVALANG="$LC_ALL"
LC_CTYPE="$JAVALANG"
export LC_CTYPE

It you're using Windows, I have no idea. Java certainly doesn't respect the OS language, and there is no per-user language setting in Windows.