Xlight ftp server

Xlight ftp server is able to run in Windows 98/ME/NT/2000/XP/2003/Vista. Its main features include:

  • Support virtual servers – Xlight FTP Server can run multiple virtual servers on the same IP address.
  • System Service – It can run as window system service.
  • Native User Isolation – Each user has separate virtual paths from other users, he can never see virtual paths of others. There is no need to lock a user in his home path any more.
  • Hierarchy Virtual Paths – FTP server has public and group paths, which make access control and permission management easier. Group path can be seen only by users of a group, public path can be seen by all users.
  • GUI based Remote Administration – Xlight FTP server can be securely administrated from anywhere.
  • 128 bits SSL – FTP sessions can be protected by industry security standard. Support SSL client authentication.
  • Store users in the database – User settings and password can be stored in the external database and retrieved through ODBC connections. Stored procedure is supported to facilitate the integration of database applications.
  • Store file transfer logs in the database – File transfer logs can be stored in the external database through ODBC.
  • Email Event Notification – Automatically notify events happened in the ftp server by email. Such events include file upload, download, delete and disk space low etc.
  • Active Directory – Users can be authenticated against Active Directory. Settings of ftp users can be stored in the Active Directory.
  • Support LDAP – Users can be authenticated against the LDAP directory Server. Settings of ftp users can be stored in the LDAP directory server.
  • Support UPnP – Configuring ftp server behind the UPnP broadband router becomes much easier.
  • UNC Path Impersonation – FTP server can can use the impersonation account to access password protected network shares.
  • Advanced Configuration Management – Configuration changes will take place in real-time, without restarting the ftp server.
  • Advanced Access Control – Provides many methods to control user’s access right.
  • Advanced Bandwidth Control – Bandwidth can be fine-tuned by different virtual servers, groups and users level or scheduled by time range.
  • Auto Block IPs – It can prevent server from hammers or malicious behaviors.
  • Deny or Allow IPs – It can deny or allow user’s access by his ip address.
  • Login Time Control – It can control login period by each user.
  • File Access Control – It can control user only downloading or uploading certain files.
  • Detail Server Status – It has detailed bandwidth usage and user connections information, download and upload status.
  • Server Log – It has detailed logs for recording users’ activities and server errors.
  • xferlog Support – Support writing ftp transfer log in UNIX ftp xferlog format.
  • Anti Leech Support – Support anti-leech function to prevent unauthorized people from leeching ftp links.
  • MODE Z Support – Support real time data compression during the data transfer.
  • UFT-8 Support – Support OPTS UTF8 command to turn on and off UTF-8 encoding.
  • IPv6 Support – IPv6 is seamlessly integrated in all server functions.

Xlight ftp server has three editions: personal, standard, professional.

Personal edition is free for personal use only. During the 30-day evaluation period, the trial program works like the professional edition with exactly the same functions. After the evaluation period, unregistered program will automatically becomes the personal edition.

Standard edition is limited to 50 online users. It has secure SSL, Anti Leech Protection and UNC Path Impersonation support. But the standard edition doesn’t support ODBC, LDAP, Active Directory, email Notification and Remote Administration function. The price for standard edition is only $39.95.

Professional edition has no online users limitation and supports all functions. The price for professional edition is $129.95.

Note: For standard and professional editions, one license can be used on only one computer at any one time, unless multiple user license has been purchased in which case the software may be used on any number of computers, up to the number of purchased licenses.

The following is the comparison of Xlight ftp server editions:

Features Personal edition (free) Standard edition Professional edition
Online Users 5 50 Unlimited
GUI based remote administration No No Yes
ODBC User database No No Yes
Write file transfer logs to database No No Yes
Email Notification No No Yes
LDAP Support No No Yes
Active Directory No No Yes
UNC Path Impersonation No Yes Yes
128 bits SSL No Yes Yes
SSL client authentication No Yes Yes
Anti Leech Protection No Yes Yes
Virtual Servers Yes Yes Yes
UPnP Support Yes Yes Yes
Advanced Configuration Management Yes Yes Yes
Hierarchy Virtual Paths Yes Yes Yes
Advanced Access Control Yes Yes Yes
Advanced Bandwidth Control Yes Yes Yes
MODE Z Yes Yes Yes
xferlog format Yes Yes Yes
UTF-8 Yes Yes Yes
IPv6 Yes Yes Yes
Other Features Yes Yes Yes

FTP SERVER (Proftpd) for LINUX. (Full tutorial)

PROFTPD

I. Giới thiệu.

Cài trên centOS 4.4 Final (updated PHP 5.x.x, MySQL 5.x.x, Apache 2.x.x)

II. Download.
Download gói cài đặt: proftpd-1.3.0.tar.gz (http://mirrors.ibiblio.org/pub/mirrors/proftpd/distrib/source/)

III. Cài đặt.
Copy gói cần cài đặt đến thư mục bất kỳ, chẳng hạn: /home/abc/setup/

Giải nén:
#pwd
/home/abc/setup/proftpd-1.3.0
#tar –zxf proftpd-1.3.0.tar.gz
#cd proftpd-1.3.0
# ./configure –prefix=/usr/local/proftpd \
–enable-dso \
–enable-ctrls \
–enable-ipv6 \
–with-modules=mod_sql:mod_sql_mysql:mod_quotatab:mod_quo tatab_sql \
–with-includes=/usr/local/mysql/include/mysql/ \
–with-libraries=/usr/local/mysql/lib/mysql

#make

#make install

Cài đặt thành công.

Proftpd được cài vào thư mục /usr/local/proftpd
Xem thư mục đã cài đặt ở đây. (Cấu hình nguyên bản sau khi cài đặt – chưa chỉnh sửa.)

Test thử:
#cd /usr/local/proftpd/sbin
#./proftpd

Proftpd sẽ nhận cấu hình mặc định, account để login ftp server là account hệ thống. Có thể test thử bằng account anonymous hoặc test bằng account hệ thống đều được.

IV. Cấu hình.

Tuỳ thuộc vào yêu cầu cụ thể cũng như mục đích sử dụng FTP SERVER ta có cấu hình tương ứng:

Chứng thực account qua file text.
(Cách làm khá đơn giản và hiệu quả. Tất nhiên việc xác thực qua account hệ thống sẽ đươc bỏ qua)

Cấu hình lần lượt như sau:
-Copy toàn bộ thư mục /home/tinh_cx/setup/proftpd-1.3.0/sample-configurations sang thư mục: /usr/local/proftpd/

#mkdir /usr/local/proftpd/PFTEST
#cp /home/tinh_cx/setup/proftpd-1.3.0/sample-configurations/* /usr/local/proftpd/PFTEST
#cd /usr/local/proftpd/PFTEST

-Chỉnh sửa các file cấu hình theo yêu cầu:

#nano PFTEST.install
PFTESTDIR=/usr/local/proftpd/PFTEST1
SRCDIR=/usr/local/proftpd/PFTEST
#sh PFTEST.install

Nếu có thông báo như sau:

Sample test files successfully installed in /usr/local/proftpd/PFTEST1.

Đã cấu hình thành công. Tất nhiên trong trường hợp này FTP sẽ dùng cổng 2021.

-Khởi động Proftpd:
#/usr/local/proftpd/sbin/proftpd -n -d 5 -c /usr/local/proftpd/PFTEST1/PFTEST.conf
(xem file proftpdstart trong thư mục /usr/local/proftpd/sbin. Khởi động bằng lệnh:
# proftpdstart)
OK. Quá trình khởi động thành công,

-Test thử với account (user/pass): proftpd/proftpd
% ftp -n -d
ftp> open localhost 2021
ftp> user proftpd
—> USER proftpd
331 Password required for proftpd.
Password: [proftpd]
—> PASS proftpd
230 User proftpd logged in.
ftp>
Chú ý: Account proftpd/proftpd được lưu trong file:
/usr/local/proftpd/PFTEST1/ PFTEST.passwd

-Thêm, sửa, xoá user tác động vào các file (PFTEST.passwd, PFTEST.group) qua câu lệnh ftpasswd:
• NAME
ftpasswd – manipulates ProFTPD authentication files
• SYNOPSIS
ftpasswd –help|-h|–version
ftpasswd –hash [ –des|–md5 ] [ –stdin ] [ –use-cracklib[=path] ]
ftpasswd –passwd [ -F|–force ] [ –file=filename ] [–gecos=string ]
[ –gid=gid ] [ –des | –md5 ] [ –not-system-password ]
[ –stdin ] [ –use-cracklib[=path] ] –home=path
–name=username –shell=shellpath –uid=uid
ftpasswd –group [ -F|–force ] [ –enable-group-passwd ]
[ –file=filename ] [ -m|–member ] [ –des|–md5 ]
[ –stdin ] [ –use-cracklib[=path] ] –gid=gid
–name=groupname
ftpasswd –passwd –change-password –name=username

• DESCRIPTION
ftpasswd is a Perl script which can be used to manipulate the password and group files suitable for use with ProFTPD AuthUserFile and AuthGroupFile configuration directives. The idea is somewhat similar to Apache’s htpasswd program. Required options are –passwd, –group, or –hash. These specify whether ftpasswd is to operate on a passwd(5) format file, on a group(5) format file, or simply to generate a password hash, respectively. If used with –passwd, ftpasswd creates a file in the passwd(5) format, suitable for use with proftpd’s AuthUserFile configuration directive. You will be prompted for the password to use of the user, which will be encrypted, and written out as the encrypted string. By default, using –passwd will write output to “./ftpd.passwd”, If used with –hash, ftpasswd generates a hash of a password, as would appear in an AuthUserFile. The hash is written to standard out. This hash is suitable for use with proftpd’s UserPassword directive. If used with –group, ftpasswd creates a file in the group(5) format, suitable for use with proftpd’s AuthGroupFile configuration directive. By default, using –group will write output to “./ftpd.group”.
• OPTIONS
-F, –force
If the password or group file be used already exists, delete it and write a new one.
–file= filename
Write output to specified file (password or group files), rather than default one.
–gecos= string
Descriptive string for the given user (usually the user’s full name).
–gid= gid
Set primary group ID for this user (optional, will default to given –uid value if absent) when –passwd is specified.
–uid= uid
numerical group ID.
-h, –help, –version
Show usage and version of the program.
–home= path
Set the home directory for the user (required).
–des, –md5
Use the DES or MD5 algorithm for encrypting passwords. The latter is the default.
–name= username , –name= groupname
Name of the user account or group (required). If the name does not exist in the specified output-file, an entry will be created for it. Otherwise, the given fields will be updated.
–shell= path
Shell for the user (required). Recommended: /bin/false
–change-password
Update only the password field for a user. This option requires that the –name option be used, but no others. This also double-checks the given password against the user’s current password in the existing passwd file, and requests that a new password be given if the entered password is the same as the current password.
–not-system-password
Double-checks the given password against the system password for the user, and requests that a new password be given if the entered password is the same as the system password. This helps to enforce different passwords for different types of access.
–stdin
Read the password directly from standard in rather than prompting for it. This is useful for writing scripts that automate use of ftpasswd.
–use-cracklib[ =path ]
Causes ftpasswd to use Alec Muffet’s cracklib routines in order to determine and prevent the use of bad or weak passwords. The optional path to this option specifies the path to the dictionary files to use — default path is /usr/lib/cracklib_dict . This requires the Perl Crypt::Cracklib module to be installed on your system.
–enable-group-passwd
Prompt for a group password. This is disabled by default, as group passwords are not usually a good idea at all.
-m username , –member= username
user to be a member of the group. This argument may be used This argument may be used multiple times to specify the full list of users to be members of this group.

Ví dụ minh hoạ:

Thêm user:
#ftpasswd –home /home/abc –shell /bin/false/ –uid 666 -gid 666 –name abc –passwd 1234567

Sửa thông tin user: (tương tự)

Xoá user: (tương tự)

-Chỉnh sửa thông tin cấu hình qua file nằm trong thư mục /usr/local/proftpd/PFTEST1/PFTEST.conf

#
# This ProFTPD configuration is intended for unprivileged TESTING ONLY.
# See Step 4 in INSTALL.
#
ServerName “##### MY FTP SERVER#####”
ServerType standalone
DefaultServer on
# Use a non-privileged port, rather than the standard ftp port (21).
# The ftpd-data port will be one less.
Port 21
User root
Group root
###################################9:42 A 24/07/2007
# To cause every FTP user to be “jailed” (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~

# These must be absolute paths.
AuthUserFile /usr/local/proftpd/PFTEST1/PFTEST.passwd
AuthGroupFile /usr/local/proftpd/PFTEST1/PFTEST.group
PidFile /usr/local/proftpd/PFTEST1/PFTEST.pid
ScoreboardFile /usr/local/proftpd/PFTEST1/PFTEST.score
SystemLog /usr/local/proftpd/PFTEST1/PFTEST.syslog
TransferLog /usr/local/proftpd/PFTEST1/PFTEST.xferlog
# Disable some checks.
IdentLookups off
RequireValidShell off
UseFtpUsers off
UseReverseDNS off
WtmpLog off
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022
# To prevent DoS attacks, set the maximum number of child processes to 5.
MaxInstances 5
# Normally, we want files to be overwriteable.
<DIRECTORY />
AllowOverwrite on
</DIRECTORY>
###################################9:18 A 24/07/2007
#<ANONYMOUS ~ftp>
<ANONYMOUS home pub>
User ftp
# Group ftp
Group nogroup
# We want clients to be able to login with “anonymous” as well as “ftp”
UserAlias anonymous ftp
DirFakeUser on ftp
DirFakeGroup on ftp
RequireValidShell off
# Limit the maximum number of anonymous logins
MaxClients 10
# We want ‘welcome.msg’ displayed at login, and ‘.message’ displayed
# in each newly chdired directory.
DisplayLogin welcome.msg
DisplayFirstChdir .message
# Limit WRITE everywhere in the anonymous chroot
<LIMIT WRITE>
#DenyAll
AllowAll
</LIMIT>
</ANONYMOUS>

[B][COLOR=red]Chứng thực account qua database MySQL.[/COLOR][/B]

Sau khi cài đặt theo hướng dẫn sử dụng xong, copy các file module PAM cần thiết vào theo cấu trúc của thư mục: proftpd_usr_local_proftpd. Cấu hình file proftpd.conf theo dưới đây.

#nano /usr/local/proftpd/etc/proftpd.conf
ServerName “MY FTP SERVER”
ServerType standalone
ServerIdent on “Servers identifying string”
DeferWelcome on
DefaultServer on
#########################9:03 A 02/08/2007
MultilineRFC2228 on
ShowSymlinks on
TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200
#########################9:03 A 02/08/2007

DisplayLogin .welcome # Textfile to display on login
DisplayConnect .connect # Textfile to display on connection
DisplayFirstChdir .firstchdir # Textfile to display on first changedir
UseReverseDNS off
IdentLookups off
Port 21
Umask 022
MaxInstances 15
MaxClientsPerHost 100 “Only %m connections per host allowed”
MaxClients 100 “Only %m total simultanious logins allowed”
MaxHostsPerUser 100
User nobody
Group nobody
#ScoreboardFile /var/log/scoreboard
ScoreboardFile /usr/local/proftpd/log/scoreboard
# Some logging formats
LogFormat default “%h %l %u %t \”%r\” %s %b”
LogFormat auth “%v [%P] %h %t \”%r\” %s”
LogFormat write “%h %l %u %t \”%r\” %s %b”
# Define log-files to use
TransferLog /usr/local/proftpd/log/proftpd.xferlog
ExtendedLog /usr/local/proftpd/log/proftpd.access_log WRITE,READ write
ExtendedLog /usr/local/proftpd/log/proftpd.auth_log AUTH auth
ExtendedLog /usr/local/proftpd/log/proftpd.paranoid_log ALL default
SQLLogFile /usr/local/proftpd/log/proftpd.mysql
QuotaLog /usr/local/proftpd/log/proftpd.quota
# Set up authentication via SQL
# ===========
AuthOrder mod_sql.c
SQLAuthTypes Backend

SQLConnectInfo <DB>@<IP> <USER DB>

SQLUserInfo usertable userid passwd uid gid homedir shell
SQLGroupInfo grouptable groupname gid members
SQLUserWhereClause “disabled=0 and (NOW()<=expiration or expiration=-1 or expiration=0)”
# Log the user logging in
SQLLog PASS counter
SQLNamedQuery counter UPDATE “lastlogin=now(), count=count+1 WHERE userid=’%u'” usertable
# logout log
SQLLog EXIT time_logout
SQLNamedQuery time_logout UPDATE “lastlogout=now() WHERE userid=’%u'” usertable
# display last login time when PASS command is given
SQLNamedQuery login_time SELECT “lastlogin from usertable where userid=’%u'”
SQLShowInfo PASS “230” “Last login was: %{login_time}”
# xfer Log in mysql
SQLLog RETR,STOR transfer1
SQLNamedQuery transfer1 INSERT “‘%u’, ‘%f’, ‘%b’, ‘%h’, ‘%a’, ‘%m’, ‘%T’, now(), ‘c’, NULL” xfer_stat
SQLLOG ERR_RETR,ERR_STOR transfer2
SQLNamedQuery transfer2 INSERT “‘%u’, ‘%f’, ‘%b’, ‘%h’, ‘%a’, ‘%m’, ‘%T’, now(), ‘i’, NULL” xfer_stat
# User quotas
# ===========
QuotaEngine on
QuotaDirectoryTally on
QuotaDisplayUnits Mb
QuotaShowQuotas on
SQLNamedQuery get-quota-limit SELECT “name, quota_type, per_session, limit_type, bytes_in_avail, bytes_out_avail, bytes_xfer_avail, files_in_avail, files_out_avail, files_xfer_avail FROM ftpquotalimits WHERE name = ‘%{0}’ AND quota_type = ‘%{1}'”
SQLNamedQuery get-quota-tally SELECT “name, quota_type, bytes_in_used, bytes_out_used, bytes_xfer_used, files_in_used, files_out_used, files_xfer_used FROM ftpquotatallies WHERE name = ‘%{0}’ AND quota_type = ‘%{1}'”
SQLNamedQuery update-quota-tally UPDATE “bytes_in_used = bytes_in_used + %{0}, bytes_out_used = bytes_out_used + %{1}, bytes_xfer_used = bytes_xfer_used + %{2}, files_in_used = files_in_used + %{3}, files_out_used = files_out_used + %{4}, files_xfer_used = files_xfer_used + %{5} WHERE name = ‘%{6}’ AND quota_type = ‘%{7}'” ftpquotatallies
SQLNamedQuery insert-quota-tally INSERT “%{0}, %{1}, %{2}, %{3}, %{4}, %{5}, %{6}, %{7}” ftpquotatallies
QuotaLimitTable sql:/get-quota-limit
QuotaTallyTable sql:/get-quota-tally/update-quota-tally/insert-quota-tally

AllowStoreRestart on
AllowRetrieveRestart on
RequireValidShell off
PathDenyFilter “\\.ftp)|\\.ht) (file://\\.ftp)|\\.ht))[a-z]+$”
DefaultRoot ~
DenyFilter \*.*/

#<DIRECTORY ftp *>
<DIRECTORY home ftp *>
AllowOverwrite off
HideNoAccess off
<LIMIT READ>
AllowAll
</LIMIT>
<LIMIT WRITE>
DenyGroup !admins
</LIMIT>
</DIRECTORY>
#<DIRECTORY ftp * incoming>
<DIRECTORY home ftp incoming*>
AllowOverwrite on
HideNoAccess on
<LIMIT READ>
DenyGroup !admins
</LIMIT>
<LIMIT STOR MKD>
AllowAll
</LIMIT>
</DIRECTORY>
DB MySQL 5.x.xx:

DROP DATABASE IF EXISTS `proftpdaccount`;
CREATE DATABASE `proftpdaccount`;
USE `proftpdaccount`;
CREATE TABLE `ftpquotalimits` (
`name` varchar(30) character set latin1 NOT NULL default ”,
`quota_type` enum(‘user’,’group’,’class’,’all’) character set latin1 NOT NULL default ‘user’,
`per_session` enum(‘false’,’true’) character set latin1 NOT NULL default ‘false’,
`limit_type` enum(‘soft’,’hard’) character set latin1 NOT NULL default ‘hard’,
`bytes_in_avail` float NOT NULL default ‘0’,
`bytes_out_avail` float NOT NULL default ‘0’,
`bytes_xfer_avail` float NOT NULL default ‘0’,
`files_in_avail` int(10) unsigned NOT NULL default ‘0’,
`files_out_avail` int(10) unsigned NOT NULL default ‘0’,
`files_xfer_avail` int(10) unsigned NOT NULL default ‘0’,
PRIMARY KEY (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `ftpquotatallies` (
`name` varchar(30) character set latin1 NOT NULL default ”,
`quota_type` enum(‘user’,’group’,’class’,’all’) character set latin1 NOT NULL default ‘user’,
`bytes_in_used` float NOT NULL default ‘0’,
`bytes_out_used` float NOT NULL default ‘0’,
`bytes_xfer_used` float NOT NULL default ‘0’,
`files_in_used` int(10) unsigned NOT NULL default ‘0’,
`files_out_used` int(10) unsigned NOT NULL default ‘0’,
`files_xfer_used` int(10) unsigned NOT NULL default ‘0’
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `grouptable` (
`groupname` text character set latin1,
`gid` int(11) NOT NULL auto_increment,
`members` text character set latin1,
`description` tinytext character set latin1,
PRIMARY KEY (`gid`),
UNIQUE KEY `gid_2` (`gid`),
KEY `gid` (`gid`)
) ENGINE=MyISAM AUTO_INCREMENT=10006 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `usertable` (
`userid` varchar(254) collate utf8_unicode_ci default NULL,
`passwd` varchar(254) collate utf8_unicode_ci default NULL,
`homedir` varchar(254) collate utf8_unicode_ci default NULL,
`shell` varchar(254) collate utf8_unicode_ci default NULL,
`uid` int(11) NOT NULL auto_increment,
`gid` int(11) default NULL,
`count` int(11) NOT NULL default ‘0’,
`lastlogin` datetime NOT NULL default ‘0000-00-00 00:00:00’,
`lastlogout` datetime NOT NULL default ‘0000-00-00 00:00:00’,
`expiration` datetime NOT NULL default ‘0000-00-00 00:00:00’,
`disabled` tinyint(4) default ‘0’,
`det_name` tinytext character set latin1,
`det_mail` tinytext character set latin1,
`det_adress` tinytext character set latin1,
`det_notes` tinytext character set latin1,
PRIMARY KEY (`uid`)
) ENGINE=MyISAM AUTO_INCREMENT=10011 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `vhtable` (
`servername` varchar(255) character set latin1 NOT NULL default ”,
`docroot` varchar(255) character set latin1 NOT NULL default ”,
`user_id` int(10) NOT NULL default ‘0’,
PRIMARY KEY (`servername`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `xfer_stat` (
`userid` text character set latin1,
`file` text character set latin1,
`size` bigint(20) default ‘0’,
`address_full` text character set latin1,
`address_ip` text character set latin1,
`command` text character set latin1,
`timespent` text character set latin1,
`time` text character set latin1,
`cmd` text character set latin1,
`dunno` text character set latin1
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

V. Tài liệu tham khảo.
http://en.wikipedia.org/wiki/ProFTPd

[B]Download tài liệu hướng dẫn:[/B]

1. Bộ cài (http://mirrors.ibiblio.org/pub/mirrors/proftpd/distrib/source/):
2. Tài liệu hướng dẫn cấu hình: (http://www.harmonysoft.com.vn/tinh_cx/ProFTPD – Documentation.pdf)
3. Other: (http://www.harmonysoft.com.vn/tinh_cx/proftpd1.3.xx.zip)

Sorting Algorithms

We all know that Quicksort is one of the fastest algorithms for sorting. It’s not often, however, that we get a chance to see exactly how fast Quicksort really is. The following applets chart the progress of several common sorting algorithms while sorting an array of data using in-place algorithms. This means that the algorithms do not allocate additional storage to hold temporary results: they sort the data in place. (This is inspired by the algorithm animation work at Brown University and the video Sorting out Sorting By Ronald Baecker from the University of Toronto (circa 1970!).)

Some of these sorts are very stupid or very slow and should not be used in code. The use of Bubblesort is deprecated. So don’t use Bubblesort! Also, don’t use Swapsort! It is only a demonstration of the amount of time Java takes to swap n elements.

In-Place Mergesort is yet another abomination. Mergesort is supposed to run in O(n log n), but the implementation here runs in O(n * n). This is because a temporary scratch array is not used. As with most of the examples here, In-Place Mergesort sorts the elements in the array without using additional storage (other than the stack used for the recursive calls, and temporary variables). Jack Snoeyink has provided me with a the Double Storage mergesort algorithm sort implementation that uses a scratch array.

New: Radix sort by Alvin Raj, August 13, 2002.

Click on each applet to see the algorithm run. Click on the name of the algorithm to see the source.

Link:

http://www.cs.ubc.ca/%7Eharrison/Java/sorting-demo.html
http://cg.scs.carleton.ca/%7Emorin/misc/sortalg/

Java FAQ

Get free “1000 Java Tips eBook”
I just started with Java and found very strange that in simple operation likeMemory Interceptor Library
Nokia pushing mobile development at Eclipse
Q: Can I pass a function as a parameter in Java? If so, how?
Q: How can I change the default icon on application window (java cup) to my own?
Q: How can I make my Java package name unique?
Q: How do I access to protected methods in third party package?
Q: I have made an applet in vJ++ which I have to sign.
Q: I need to communicate some data (string) from a Java Applet
Q: I would like to know how my Java program can catch when someone
Q: I’d like to know how to know which operating system java application
Q: I’m doing a small console java app, and want to know what the function
Q: Is there a collection object like the hashmap or hashtable that stores values
Q: Is there any way to accept password from a java application.
Q: Why do we need to use shift operator in Java? Can you give some examples?
Q: Why in the write method for the OutputStream class we have “int b”?
Question: Can anyone tell me why the Java Vector class is called a ”Vector”?
Question: I just started to work in big company… Before I worked with software
Question: I read that JDK 1.4 has new features: logging, xml, regular exp…
Question: I want to download Java 1.4. I looked on the page for compatability an
Question: I’m having problems with the JavaComm (javax.comm) serial / parallel A
Question: I’m just getting into Java and have a simple question: What is J2EE an
Question: I’m trying to write a script to package my class files into a jar file
Question: I’ve been using the java comm API to allow me to build a small java in
Question: If there was a ”setvalue()” method in Float class, it would have bee
Question: Is it new Java feature that my class has no constructor?
Question: Is there any way of getting the memory requirements of objects at run-
Question: Java has no sizeof() like C++… Why?
Question: JLabels: when I add ”too much” text I can’t see all of it.
Question: Please clarify my confusion about Java versions. I hear ”Java 2” but
Question: Quite often I see that programmers use full name of class in a program
Question: Some packages use capital letters in name and some low case? I read th
Question: Why do not distinguish methods based on their return value?
Question: Why do we need wrappers like Integer, Boolean for int, boolean in Java
Question: Why is thin client has name ”thin” in J2EE?
Solaris 10 & Red Hat Enterprise Linux 4.0 Dual boot : How to?
Sun president: PCs are so yesterday
The Value of the IBM Software Development Platform

Class.forName() loads a JDBC driver into the memory! Why do we need this?
CODAF 1.5 (stable) released with Compiere 2.5.2c support
Daffodil Open Sources Java Database One$DB at SourceForge
Daffodil Replicator v1.7 launched with Push-Pull Replication
Eclipse plugin eva/3 Application Builder for visual development and db managment
From 221 JDBC drivers find yours one that fits all requirements
I am reading my values from a db which is supposed to be a string, but sometime
I have a binary flat-file database that I need to access via JDBC. How do I crea
I have developed my program with MySQL and Java. It runs locally. Now I want to
IBM provides WebSphere application with JDBC/SQL

Biggest open diamond mine!
CodeInvaders Challenge – Java-based gaming with real-time programming
Friday’s not Java news again!
funny Cofe and Software
Funny dedication I found on the Net 🙂
High resolution free Java screensaver here!
Keep your eyes on …
Non profit remake of Star Wars!
Should we take out spammers… Literally?

FilePermission cannot Handle Symbolic Links? I was trying to change file permiss
I read that an object can be strongly, weakly or even phantom (!!!!) reachable..
Jakarta Commons IO 1.1 has been released

A strong cup of java can perk up your hair color
Have you heard about the object-oriented way to become wealthy?
Is text file binary?
My colleague, he is testing my code, got ”Headless Exception”. He jokes that i
Thief robs java shop, but pays for cup
Vodka, Programming and plugins 🙂
Why does not exist ”JavaNotFoundException”? When I deliver my Java program to

‘else’ Not Required
Abstract classes vs Interfaces: main differences
Advanced Installer for Java 1.7 Released
All String Handling in Java here!
alt.lang.jre: Get to know Jython
Analyst’s Soapbox: A nasty wake-up call for J2EE
Annotations in Tiger (J2SE 5.0)
Any idea how to lock a Session ID? Ho to prevent its usage again?
Are classes implementing Externalizable considered Serializable classes?
Array vs ArrayList vs LinkedList vs Vector: an excellent overview and examples
ArrayList vs. LinkedList
Autoboxing
Build distributed object management frameworks for J2EE apps
Can .Net And Java Be Friends?
Can I can force finalization using System.runFinalization()?
Can I convert my Delphi code to Java?
Can I convert Visual Basic code to Java?
Can I use try/catch block to control program flow? Will it affect program perfor
Can Java communicate with ActiveX objects?
Can the JavaHelp software run in a non-Java application, such as a C++ applicati
Can we just try without catch? Yes!
Can you tell me about ”100 Percent Pure Java Certification Program ”.
Cellular Automata and Music Using Java
Concurrency in JDK 5.0 Tutorial
Could you tell me about chain exceptions?
Data Management in J2EE Apps
Design Skinnable Java UIs with Native Performance
Develop Contact Center Telecom Applications
Do you know about ”Full Speed Debugging” and “HotSwap” Class File Replacem
Fail Early, Fail Often
Fixing the Java Memory Model, Part 2
For example I use some collection and method put() which has return type Object.
Free article on BigDecimal arithmetic
How can I check CLASSPATH variable on my OS?
How can I completely clean up my Windows XP from Microsoft JVM before I install
How can I convert any Java Object into byte array? And byte array to file object
How can I in Java convert this string 23AB to its hexadecimal representation 323
How can I install my Java program as a NT service?
How can I use the new error-reporting mechanism in JVM?
How can my application know how many CPUs work in a system?
How do I compare two dates and times, date between dates, time between times and
How do I increase the level of debugging information displayed in the Java Conso
How do I increase the level of debugging information displayed in the Java Conso
How is a multidimensional array stored in Java? Is it different from C?
How is JavaSpaces technology different from databases?
How to open, read, write, close file(s) in Java? Examples on move, rename and de
How to unsign signed bytes in Java – your guide is here
How unique serialVersionUID must be? Is not it enough with default one?
I am getting ”OutOfMemoryError”. How do I prevent such memory leaks?
I am getting ”StackOverflowError” error…
I am starting with Java now.. Could you point me some simple tool that can check
I do not like to write JavaDocs, I need some tool to help me…
I found that in Java API (when looked at v1.4.2) exist ”PrivilegedExceptionActi
I have a method that names something like this – public String doSmth()…
I have an application which can be run using 64 bit JNI libraries, or 32 bit lib
I have two String arrays: array A and array B. Now I want to get the elements of
I have written a small Java web server. I want to delete (replace) a class that
I heard many times from Java lectors: ”If you are interested how new feature wa
I just looked at Java Web Services Developer Pack (Java WSDP) and found that it
I know that exist many Java compilers, not only ”javac” from SUN 🙂
I know that Hashmap implementation is not synchronized. How can I synchronize it
I like JBuilder very much. Just one thing – mouse wheel is not supported…
I need to do a lot of technical computing in my Java programs. Could you advic
I need to program ”xyz” math function. Where can I find code examples?
I often do mistakes when write my JavaDoc comments. Do you know a tool to avoid
I often hear something like this ”daemon runs” or ”how to make my own daemon’
I read that in the Java (version 1.4.x) reflection implementation has been optim
I see that in Java a lot of Class loaders: bootstrap, extension, system, context
I show you now a class in Java which has no public constructor!
I tried to send Ctrl+Alt+Del key code to system from my class, but it does not w
I try to call the Runtime.exec() command by passing it an array of strings.
I use an old Java Tool from SUN. Today I read that SUN started End Of Life Proce
I use logging in my application… The problem is that I am opening the PrintWri
I want to create a logging system that handles the user, database, application s
I want to use COM component from Java. How can I get an access to the COM interf
I was considering an installation of java application on a new computer without
I was looking at java.util.Timer class and there is no possibility to cancel an
I was testing the new J2RE 1.4.2 for compatibility with our programs (written on
I would like to create a class that can execute jscripts. Does any one know if t
IBM releases free 2003 Software Evaluation Kit
IBM Security Providers: An Overview
If I turn off daylight saving during an installation of Windows XP then Java run
if Statement – Overview
If we write integer or double through Java in a file then the bit pattern for ea
In Ukraine first day of week is Monday but not Sunday
Interesting fact:
Interfaces in Java: Very easy to read overview
Intro to Java Tutorial
Introduction to Jena
Is it something new in J2SE 1.4.1?
Is it true that java.nio package name (I mean NIO part) means ”New Input/Output
Is there any way to keep an object from being collected by Garbage Collector?
It is not a big secret that file system in Java looks like UNIX file system. It
Iterator vs Enumeration?
Java 2 Platform and JAAS Authorization Architectures
Java Bytecode Engineering with BCEL
Java Calendar and Date: good to know facts and code examples
Java certification success, Part 1: SCJP
Java encapsulation gotchas
Java Message Service Tutorial
Java Message Service Tutorial
Java Shared Classes
Java theory and practice: State replication in the Web tier
Java Virtual Machine
Java vs .NET
Java: History of Java
Java: Strength
Java: Weaknesses
JDK 5.0: More Flexible, Scalable Locking
JMS Application Changes Under J2EE 1.4
Microsoft heed a key lesson learned or suffer the consequences
My application runs much slower with 1.3/1.4 when compared with the 1.2 Producti
My application uses just one class from big jar file. Does the entire jar file g
My Java application is for system with small memory. How to get the system’s fre
My program creates a huge number of objects dynamically and even more inside eac
NetBeans 4.1 Early Access Release Now Available
New Daylight Saving rules in USA and Java?
Object-Relation Mapping without the Container
Open Source J2EE 1.4 gets Sun green light
Orchestrating Grid Workloads w/ Tivoli
Our server (Solaris) accept a socket when got a request. Why can we only create
PHP To Challenge J2EE and .NET
Portal Apps Tutorial w/ Websphere and Struts
Portlets with FacesClient Components
Question: Do exist non SUN’s, freeware implementations of essential libraries fo
Question: How do I find out how long the JVM has been running?
Question: What is difference between add() and addElement() in Vector?
Question: What is difference between sets and lists?
Question: What is difference between sets and lists?
Question: what is fail-fast iterator in Java?
Quickly create Secure Portals with Java-based framework
Replacing Reflection with Code Generation
Serialize Java Object to file? How can I store and retrieve serialized objects t
News: softSCJD released
Sun revokes FreeBSD’s Java licence
Sun To Tighten NetBeans 4.1 and Java in 2005
Synchronized is implementation detail
Ternary operation or operator in Java: what is that?
The beta release of J2SE 1.5 is scheduled for late 2003. I have heard that there
The clear-Method in the java.util.Calendar-Class doesnt behave like I suggest.
The On Demand Operating Environment
Transforming JFrame Windows with IFrame
Unclogging Server Bottlenecks w/ Active Containers
Using Aspect-Oriented Programming to Maintain Legacy Java Apps
Webcast: Team Unifying Platform Ensures Interoperability
What are additional types of GC do exist in the J2SE platform, version 1.4.2?
What audio and video formats does the Java Media Framework support?
What can I do if some programming language has no methods to interact with Java
What does mean “Lists (like Java arrays) are zero based.”?
What does mean ”internalization” for me when I design my program and where sho
What does mean term ”peer” and what can I do with it if I use getPeer() in Com
What is date of Java birthday?
What is difference between Hashmap and Hashtable?
What is difference between RMI and Java Messaging? And between email and Java me
What is difference between the for(;;) and while(true)?
What is Java Space technology?
What is meant by persistence?
What is relation between JAXP and Xerces?
What is the maximum number of dimensions that a Java array can take?
What is young generation in GC(Garbage Collector)?
What type of garbage collection does a System.gc() do?
When do I need to use reflection?
When do I to choose an abstract class over an interface?
When does garbage collection performance matter to the user?
When I running Runtime.exec(…), I get a Process object. I want serialize it to
Where can I find sample code for J2EE guidelines, patterns, and code for end-to-
Where is MS Java Virtual Machine stored in IE? I would like to take them away…
Which Collection should I use in my Java program? Part 1. Hashtable vs hashmap?
Whizlabs Acquires INESystems, Maintains Lead in the J2EE Domain
Whizlabs Upgrades its SCMAD (J2ME Certification) Exam Simulator
Whizlabs Upgrades its SCWCD 1.4 (J2EE Certification) Exam Simulator
Why do I see the attribute in a derivative class? I can not access it anyway!
Why I can not compile it:
Why is Runtime.runFinalizersOnExit deprecated?
Why Java does not use default value which it should?
Why Java Hot Spot Compiler has the name – Hot Spot?
With 1.3.1 we got 4GB heaps on Solaris, why can’t I get this to work on Windows?
World’s first SCBCD certification exam simulator launched by Whizlabs

”Using Web Services Effectively” – the online tutorial
1.3, 1.4 –> 1.5 Migration
AJAX Interoperability Demo for WS-RT/WS-RP
An Overview of the Java WSDP 1.5
Concurrent Programming with J2SE 5.0
Demo Version of uCertify Exam Simulation PrepKit for Microsoft Exam 70-292 Relea
Exam Directory: New website for IT Certification Exam Information Launched
Five Reasons to Move to the J2SE 5 Platform
Getting Started with an Integrated Development Environment (IDE)
Getting Sun Java Certified
Gosling onto real time Java
If your system does take in external XML data this security tip is for you!
Is it possible to measure time in nanoseconds?
Java and PHP will work together!
Java is better than .NET! part I
Java is better than .NET! part II
Java preps dive into real-time role
Java Refreshable Objects
JMX for Managing Java Applications
New IBM Software PowerPack evaluation program for Java and .Net developers
New series of PHP lectures start!
No Cost developerWorks Live! Technical Briefings in 2004
Pass-Guaranteed.com Offers IT Career Enhancement Opportunities
Performance testing has shown that the finalize methods in the channel classes i
The Java Books page: the link errors are fixed now!
The Man Who Brewed Up Java
The Multi-Tasking Virtual Machine: Building a Highly Scalable JVM
Thread: run() vs start() method
Timing is Everything
uCertify announces Special Discounts on selected Exam Simulation PrepKits
uCertify Launches PrepKit for CompTIA Exam IK0-002 for i-Net+ Certification
uCertify Offers Exam PrepKit for Oracle 9i (1Z0-147) Exam
uCertify Offers Upto 70 % Limited Period Discount on Exam Simulation PrepKits.
uCertify.com announces the release date for new Exam Simulation on SCJP
Using JConsole to Monitor Applications
USING THE VARARGS LANGUAGE FEATURE
What is Java Isolates and why do we need it?
What is Model-View-Controller (MVC) architecture?
What is typical offshore model? Why offshore is so compelling?
Where can I find brief description for common set of design patterns which I can
Where could I buy gifts to my colleagues (t-shirts, glasses, caps, mugs and so o
Write for us, be famous! Get free advertisement!

Find, sort, organize and enjoy the pictures on your computer in seconds.
Gif4J PRO 2.0 and Gif4J LIGHT 1.0 released
I am loading an image into my application from users and do not know in advance
In our application we try to send an image over socket connection in binary form
Java Desktop images
On some Windows 2000 machines our application (uses Java 2D) causes system crash
Question: I am trying to construct my GUI so that my images can act like JButton
Question: I have read that Java Advanced Imaging API uses native code…
Web icons in your web oriented application
Which Java library can convert psd format (Photoshop Image)? Is it free?

A new toolset for creating web-based user interfaces with Java
Applet and command line parameter?
Building Web Services w/ Eclipse Tutorial
Can one applet load another applet on runtime, and can these two applets talk?
Domino Custom JSP Tags Tutorial
Easily create new application simulators
Every time I access an Applet browser downloads all related classes.
HeapAnalyzer v 1.3.7 – fully supports Java Profile
How do I hide system properties that applets are allowed to read by default?
I am writing a chat applet and I would like to put icons in user messages. Is i
If I run my applet with the SUN VM I get exception: ”Either ”code” or ”objec
Is there a way to write information to cookies through an Applet?
Java: Applets
My applets are big and it takes much time to download (on browser) when a networ
Question: I have an applet. I have succesfully added the class to a JAR, but whe
Use a Java Applet to access remote Web services
What is the difference between applets loaded over the net and applets loaded vi

A Practical Introduction to Enterprise Java Beans
Delivering on the Promise of Wireless Applications
EJB programming restrictions
EJBs Tutorial: Access Heterogeneous Data w/ DB2
Oracle ADF JClient support in the new version of JDatePicker
Question: How many kinds of enterprise beans does Java has?
RAD Tutorial w/ JavaServer Faces and WS Portal
Tutorial: Simplifying EJB Component Development
XBeans?

Murach’s Java Servlets and JSP

I have found that ZipEntry() method behaves strange:
Reading Java’s API version 1.41 I noticed that many classes contain now valuable

“ Get certified & earn 15% extra….. “ Part 1.
“ Get certified & earn 15% extra….. “ Part 2.
Read Java Certification Certification SCBCD Study Guide – 4. Client View of a Se
Read Java Certification Certification SCBCD Study Guide – 5. Session Bean Compon
Read Java Certification SCBCD Study Guide – 1
Read Java Certification SCBCD Study Guide – 2. Identify EJB 2.0 container requir
Read Java Certification SCBCD Study Guide – 3. The EJB roles.
Read Java Certification SCBCD Study Guide – 6. Session Bean Component Contract
Read Java Certification SCBCD Study Guide – 7. Session Bean Component Contract.
Read Java Certification SCBCD Study Guide – 8. Session Bean Life Cycle.
Read Java Certification SCBCD Study Guide – 9. Client View of an Entity.

How to make 32 byte UUID – Better Than java.RMI.server.UID
Java Array
Native From Java: Java code example
New Java book online starts now here…
Ready Java example: Embed JVM into native code.
Search JavaFAQ.nu site here
Tricky Java example: Display Icons without icons.

I defined an equals method, but Hashtable ignores it. Why?
I tried to forward a method to super, but it occasionally doesn’t work. Why?
Q: Can I get good advice from books on Java?
Q: Can I write sin(x) instead of Math.sin(x)?
Q: How big is an Object? Why is there no sizeof?
Q: I have a class with six instance variables, each of which could be initialize
Q: I have a complex expression inside a loop…
Q: I still miss global variables. What can I do instead?
Q: In what order is initialization code executed? What should I put where?
Q: Is null an Object?
Q: What about class initialization?
Q: What other operations are surprisingly slow?
Q: Why are there no global variables in Java?
Q: Why does my Properties object ignore the defaults when I do a get?
Q: Will I get killed by the overhead of object creation and GC?
Q:Inheritance seems error-prone. How can I guard against these errors?
Q:What are some alternatives to inheritance?
Q:When should I use constructors, and when should I use other methods?
Q:Within a method m in a class C, isn’t this.getClass() always C?
The code in a finally clause will never fail to execute, right?

Ergonomics in the 5.0 Java Virtual Machine
Eye on performance: Trash talk
How to improve performance?
I was using Java 1.4.x during of development of program. Our customers want to u
Java Performance Tuning w/ Fat Clients
Java: Ant
Java: CLASSPATH
Java: IDEs
Java: Packages – Importing
Java: Packages – Installing
Java: Style and Correctness Checkers
Java: Text Editors
Java: TextPad Editor
Make Tomcat page load faster
Q: How do I improve dramatically performance of my Java program?
ROXES Ant Tasks 1.0 Open Source released

Easy Java Lecture 12: Classes. Teach/learn online
Easy Java Lecture 12a: Painting Concepts. Teach/learn online
Easy Java Lecture 13-2 Inheritance in Java. Teach/learn online
Easy Java Lecture 13: Inheritance in Java. Part II. Teach/learn online
Easy Java Lecture 14: Interfaces and packages. Part I. Teach/learn online
Easy Java Lecture 14: Interfaces and packages. Part II. Teach/learn online
Easy Java Lecture 15-2: Swing I. Handling events in Swing application: theory, e
Easy Java Lecture 15: Swing I. Part I. Teach/learn online
Easy Java Lecture 16: Swing II. Part I
Easy Java Lecture 16: Swing II. Part II
Easy Java Lecture 16: Swing II. Part III
Easy Java Lecture 17: Layout managers – a visual guide part I
Easy Java Lecture 17: Layout managers – a visual guide part II
Easy Java Lecture 17: Layout managers – a visual guide part III
Easy Java lecture 1: Your first cup of Java. Teach/learn online
Easy Java lecture 2: A quick intro to Java programming. Teach/learn online
Easy Java Lecture 3: OOP programming concepts: theory. Teach/learn online
Easy Java Lecture 4: OOP programming concepts: example. Teach/learn online
Easy Java Lecture 5: Variables. Teach/learn online
Easy Java Lecture 6: Operators. Teach/learn online
Easy Java Lecture 7: Expressions, statements, and blocks. Teach/learn online
Easy Java Lecture 8: Control flow statements. Teach/learn online
Easy Java Lecture 9: The life cycle of an object. Teach/learn online
Easy Java Lectures by Anatoliy Malyarenko: Contents.
Exceptions -II: What’s an exception and why do I care?
Exceptions -III: What’s an exception and why do I care?
Exceptions: What’s an exception and why do I care?
Java Lecture 10: Characters and strings
Java Lecture 11: Numbers and arrays, examples. Teach/learn online
Lecture 18: Writing event listeners with best examples, Part I
Lecture 18: Writing event listeners with best examples, Part II

Java Lesson 37: Menus and submenus
Java Lesson 38: The WindowListener interface and the WindowAdapter class
Java Lesson 39: An introduction to GridBagLayout
Java Lesson 40: An introduction to the Java Collections API
Java Lesson 41: Exception handling with try, catch, and finally blocks
Java Lesson 42: Claiming and throwing exceptions
Java Lesson 43: Multithreading, the Thread class, and the Runnable interface
Java Lesson 44: An introduction to I/O and the File and FileDialog classes
Java Lesson 45: Low-level and high-level stream classes
Java Lesson 46: Using the RandomAccessFile class
Java Lessons by Jon Huhtala: Update
The Java Lesson 10: for, while, and do-while statements
The Java Lesson 11: Using break and continue
The Java Lesson 12: Class methods and how they are called
The Java Lesson 13: Using the Math class
The Java Lesson 14: Creating and calling custom class methods
The Java Lesson 15: Overloading class methods
The Java Lesson 16: An introduction to objects and object references
The Java Lesson 17: The String class
The Java Lesson 18: The StringBuffer class
The Java Lesson 19: Initializing and processing arrays of primitives
The Java Lesson 1: What is Java?
The Java Lesson 20: Initializing and processing arrays of objects
The Java Lesson 23: Inheritance and overriding inherited methods
The Java Lesson 24: abstract classes and polymorphism
The Java Lesson 25: Interfaces, instanceof, and object conversion and casting
The Java Lesson 26: Introduction to graphical programming and the java.awt packa
The Java Lesson 27: The Component class
The Java Lesson 28: Containers and simple layout managers
The Java Lesson 29: The Color and Font classes
The Java Lesson 2: Anatomy of a simple Java program
The Java Lesson 30: Drawing geometric shapes
The Java Lesson 31: Choice, List, and Checkbox controls
The Java Lesson 32: Using the Scrollbar graphical control
The Java Lesson 33: Menus and submenus
The Java Lesson 34: An introduction to applets and the Applet class
The Java Lesson 35: Essential HTML to launch an applet and pass it parameters
The Java Lesson 36: Mouse event processing
The Java Lesson 3: Identifiers and primitive data types
The Java Lesson 3: Identifiers and primitive data types. Page 2
The Java Lesson 4: Variables, constants, and literals
The Java Lesson 5: Arithmetic operations, conversions, and casts
The Java Lesson 6: Boolean expressions and operations
The Java Lesson 7: Bitwise operations with good examples, click here!
The Java Lesson 7: Bitwise operations with good examples, click here! Page 2
The Java Lesson 7: Bitwise operations with good examples, click here! Page 3
The Java Lesson 7: Bitwise operations with good examples, click here! Page 4
The Java Lesson 8: Flow control with if and else
The Java Lesson 9: switch statements

A Look at Binary Runtime Environment for Wireless (BREW)
AMS Implementation on Palm
apps for phones releases Version 2
Do you know good design patterns for developing applications for wireless device
Encrypt Data within Mobile Apps Tutorial
How can I use SSL in MIDP1.0?
I am going to start applications development for wireless devices. Could you gui
JBenchmark3D New Application for Mobile Java
MobiForms Revolutionises the Development of Mobile Applications
MobiForms Version 3.0 Released With Improved Wireless Networking and ERP Connect
MobiForms Wireless Development Tool Now Certified With IBM J9 Java Environment
Question: What’s New in the J2ME Wireless Toolkit 2.0?
Web Services Tool Kit for Mobile Devices
Website for mobile – A Beginner’s Guide.
Where Can I find more info on Java programming for mobiles?
Wireless messaging with JXTA

Java Newsletters:
Java Newsletters:
Java Newsletters:
Java Newsletters:
Java Newsletters:
Java Newsletters:
Java Newsletters:
Java Newsletters:
Java Newsletters:
Earth to Sun – please do not dump JavaOne
Java Newsletters: Java Newsletters Archive: 1
Java Newsletters: Java Newsletters Archive: 10
Java Newsletters: Java Newsletters Archive: 11
Java Newsletters: Java Newsletters Archive: 12
Java Newsletters: Java Newsletters Archive: 13
Java Newsletters: Java Newsletters Archive: 14
Java Newsletters: Java Newsletters Archive: 15
News: Java Newsletters Archive: 151
Java Newsletters: Java Newsletters Archive: 152
Java Newsletters: Java Newsletters Archive: 153
Java Newsletters: Java Newsletters Archive: 154
Java Newsletters: Java Newsletters Archive: 155
Java Newsletters: Java Newsletters Archive: 156
Java Newsletters: Java Newsletters Archive: 157
Java Newsletters: Java Newsletters Archive: 158
Java Newsletters: Java Newsletters Archive: 159
Java Newsletters: Java Newsletters Archive: 16
Java Newsletters: Java Newsletters Archive: 160
Java Newsletters: Java Newsletters Archive: 161
Java Newsletters: Java Newsletters Archive: 162
Java Newsletters: Java Newsletters Archive: 163
Java Newsletters: Java Newsletters Archive: 164
Java Newsletters: Java Newsletters Archive: 165
Java Newsletters: Java Newsletters Archive: 166
Java Newsletters: Java Newsletters Archive: 167
Java Newsletters: Java Newsletters Archive: 168
Java Newsletters: Java Newsletters Archive: 169
Java Newsletters: Java Newsletters Archive: 17
Java Newsletters: Java Newsletters Archive: 171
Java Newsletters: Java Newsletters Archive: 173
Java Newsletters: Java Newsletters Archive: 174
Java Newsletters: Java Newsletters Archive: 175
Java Newsletters: Java Newsletters Archive: 176
Java Newsletters: Java Newsletters Archive: 177
Java Newsletters: Java Newsletters Archive: 178
Java Newsletters: Java Newsletters Archive: 179
Java Newsletters: Java Newsletters Archive: 18
Java Newsletters: Java Newsletters Archive: 180
Java Newsletters: Java Newsletters Archive: 180
Java Newsletters: Java Newsletters Archive: 181
Java Newsletters: Java Newsletters Archive: 182
Java Newsletters: Java Newsletters Archive: 19
Java Newsletters: Java Newsletters Archive: 2
Java Newsletters: Java Newsletters Archive: 20
Java Newsletters: Java Newsletters Archive: 3
Java Newsletters: Java Newsletters Archive: 4
Java Newsletters: Java Newsletters Archive: 5
Java Newsletters: Java Newsletters Archive: 6
Java Newsletters: Java Newsletters Archive: 7
Java Newsletters: Java Newsletters Archive: 8
Java Newsletters: Java Newsletters Archive: 9
My request to replublish Tech Tips

‘if’ Quiz 1
‘if’ Statement – ‘else if’ style
Action, AbstractAction
Anonymous Listeners
ArrayList
Assertions… What is it?
Cohesion
Design By Contract
Development Techniques
Directories and Files
Drawing
Events — Introduction
Fail Early, Fail Often
Inner-class Listeners
Iterative/Incremental Development -I
Iterative/Incremental Development -II
Java Notes: Keyboard
Java Programs
Java Switch Statement – Overview and 27 examples
Java: ‘if’ Statement – Braces
Java: ‘if’ Statement – Indentation
Java: Applications – text example
Java: Arrays — Multi-dimensional
Java: Audio
Java: Beep
Java: Big Blob Structure
Java: Class and Interface Concepts
Java: Compiling a Java program
Java: Constructor Chaining Exercise
Java: Constructors
Java: Constructors – super
Java: Constructors – super example
Java: Example – FileTest.java
Java: Example – KeyDemo
Java: Exception Usage
Java: Exceptions – More
Java: GUI Overview
Java: GUI Structural Patterns
Java: import
Java: Interface Exercises
Java: Interfaces
Java: Java Data Structures
Java: Java vs. C
Java: java.util.Calendar
Java: Javadoc
Java: javax.swing.Timer
Java: Methods – Introduction
Java: Model-View-Controller (MVC) Structure
Java: Packages – Defining
Java: Presentation-Model Structure
Java: Random numbers – intro
Java: String Overview
Java: switch Example – Random Insults
Java: Unicode
Java: Various time classes
JComboBox (uneditable)
Listeners
Menus
Packages – Importing
Random numbers – API
Random Numbers – shuffling
Sorting Arrays
Top-level Listeners

A free,new,unique and advanced Java IDE
A Java implementation of BEEP (Blocks Extensible Exchange Protocol)
A utility for entering the Indian scripts
Abstract User Interface Markup Language Toolkit
Adding JRuby to your Java Toolbox
Advanced Installer For Java 1.8 Released
Advanced Installer For Java 4.0 Released
Advanced Installer for Java v1.9 Released
Advanced Installer for Java v2.2 Released
Advanced Installer for Java v2.5 Released
Advanced Installer For Java v2.6 Released
Advanced Pattern Search Toolkit for Sequential Data
AgentFX 2.1 released
Allatori Java Obfuscator
Allatori Java Obfuscator
An XML-based mark-up language for telephony call control.
An XML-driven debugging automation tool for Java
Application Privacy Monitoring for JDBC
BFO and Columbia University have great Chemistry
BFO boosts its portfolio with Java PDF Viewer
Build highly decoupled systems with the power of static crosscutting
Build intelligent Java agents using machine reasoning
Build your own Servlet-based Web server, with nonblocking I/O
Bytecode offers a glimpse into application performance
C10k problem solved with AIO4J’s Java IO alternative
Cache Invalidation Adapter for WebSphere Application Server
Can I use system provided random numbers generators when I run my Java program o
Class Finder Toolkit for Websphere Application Server
Client-and server-side templating with Velocity
CodeRuler: Medieval Java Training Game
Create a portable Web service in multiple J2EE environments
Critical update for CodeRuler medieval Java game
Debugging with FindBugs
Design Pattern Toolkit (version1.4.0)
Design service-oriented architecture framework with J2EE technology
Determining the Riskiness of Change
Develop aspect-oriented Java apps with Eclipse and AJDT
Dictionary and Thesaurus API for Java
Do you know about ”Full Speed Debugging” and ”HotSwap” Class File Replacemen
Do you know any free Java editor for the Java?
Do you know any Java API to access Windows registry?
Double your Java code quality in 10 minutes, here is receipt
Dynamic Aspects release domain/j demos
Dynamic learning with JSP, Servlets and Juru
Easy Deployment of Real-Time Java for Linux
Easy source code access with IBM’s framework for JDBC
Eclipse method for pairwise testing
Eclipse plug-in for IBM’s Cloudscape embedded Java database
Eclipse’s Rich Client Platform
Fast find memory leaks with Heap Analysis Tool
Fast improve of your Java Code Quality for peak performance with JProbe.
Has Java some APIs or tools to work with SNMP?
History Flow Shows How Wiki Articles Evolve
How does JVM interact with profilers?
How to Tomcat 5? Part 1
How to Tomcat 5? Part 2
How to use Java built-in profiler.
I am trying to make my code compact. I already ”JARed” all files…
I know that exist many Java compilers, not only ”javac” from SUN 🙂 Part II
I used JProof free utility for code obfuscation to protect my code. It seems tha
IBM creates performance harness for JMS
IBM develops Multilingual Dictionary API for Java
IBM improves Toolkit for MPEG-4
IBM Java structure analysis tool for Linux
IBM provides a java DPPE for emerging Grids
IBM provides RIB tool for Swing and Eclipse GUIs
IBM release Interoperability Tool for Eclipse and .NET WinForms
IBM releases an Eclipse-based visual ontology management tool
IBM releases Development Tool for Java-COM Bridge
IBM releases eclipse Embedded Voice Toolkit
IBM releases free 2004 Middleware Software Evaluation Kit — new 2-DVD set!
IBM releases intelligent tools for semantic programming
IBM releases new Emerging Technologies Toolkit v2.1
IBM releases Semantics Toolkit
IBM Service Management Framework Extension for Relocatable Services (ReSMF)
IBM Toolkit for MPEG-4 v1.2
IBM’s Java Embedded ViaVoice speech SDK
IBM’s Method Scheduler for J2EE, Servlets and JSP
IBM’s new XML Security Suite
IBm’s NotesBuddy update to support new Sametime level
IBM’s novel approach to spell checking
IBM’s ZetaGrid uses J2EE to solve large computing-intensive problems
IBM’s ZetaGrid uses J2EE to solve large computing-intensive problems
IBMs aDesigner now Eclipse embedded with Voice browser
Improve Eclipse software development with robust logging plug-in
Improve the quality of your J2EE-based projects
IntelliJ IDEA vs. Eclipse vs. NetBeans: my personal experience, Part II
IntelliJ IDEA vs. Eclipse vs. NetBeans: my personal experience…
Introducing the Reflexive User Interface Builder
Is there any way in Java we can view the bytecodes generated by a piece of code?
J2Native 2.0 released
J2Native version 1.0 is released.
JAR Class Finder for Eclipse
Java 2D Imaging for the Standard Widget Toolkit
Java launcher 1.5 released
Java Tools that help you learn how Java works and understand it even more.
Java Trace Analyzer for WebSphere Application Server
JetBrains Releases IntelliJ IDEA 5.0
JFluid – a profiling tool for the Java programming language
JFluid – a profiling tool for the Java programming language
JFormula 2.8 – Math expressions API
Learn how to modify classes as they’re being loaded with Javassist
License4J – licensing library for Java
License4J version 1.2 is released.
Make exe file from your Java application (code)
Maven vs Ant or Ant vs Maven?
Migrate your Swing application to SWT
MirrorJNDI version 1.0 is released.
Mobile Database Access
Mock Translation Input Method Editor
Model for Self-Managing Java Servers
NetBeans IDE 4.1 Early Access 2 Released
New Advanced Installer for Java 6.0 brings XML updates and imports 3rd party MSI
New alphaWorks license for DB2 replication monitoring
New GUIKit from Wolfram Research Enriches Mathematica(R) Development Environment
New version: Structural Analysis for Java
Overview Java commands! java vs javaw
PHP Integration Kit for J2EE
Pure Java runs JAXB for XML processing
Q: I have made an applet in vJ++ which I have to sign. Is there any tool to do
Question: Why do I see JSP code in my browser, not HTML page which supposed to b
RELAX NG with Custom Datatype Libraries
Replication Monitoring Center for DB2
Resolving classpath problems with Jarhoo
Robocode Java Violance Game Goes Open Source
ROXES Ant Tasks 1.1 Open Source released
Scripting for XML
Smokescreen 3.4 has been released
softSCWCD released
Software Configuration Management with IBM Rational and WebSphere software
Structural Analysis for Java
Sun Java Studio Creator 2 : An Introduction, part 1.
Sun Java Studio Creator 2 : An Introduction, part 2.
Sun to Release Java Dev Kit upgrade for StarOffice
Take a good look at your Heap
The buzz about Apache Beehive and the Pollinate eclipse plug-in
Tomcat example: deploy web application directly in root, not in subdirectory
Tracing in a Multithreaded, Multiplatform Environment
Tune Eclipse’s startup performance with the Runtime Spy
Unicode Input Method Editor
Unit test your Java code faster with Groovy
Use the Element Construction Set to create formatted logs
Using Javassist for Bytecode Search-and-Replace Transformations
Version 1.1 of Allatori Java Obfuscator is released.
Version 1.4 of Advanced Swing Components is released.
Visual Resource Bundle Inspector for Java
We compile a large number of files and we have strange problem:
What are enhancements were added to new javac since 1.4.2?
What do you not know about Java tools!
What is difference between ordinary Java archive file and executable one?
What is Java Shared Data Toolkit and how can I use it?
What is jvmstat?
What’s the difference between the -client and -server systems (options in JVM)?
When I use Java to write my program under some specific OS, I always set some en
Why you should consider Eclipse and how it differs from Netbeans
WinA&D 4.0 – Software Engineering Tool
XML Programming in Java Tutorial

Is it possible to run a servlet from a browser without visibly changing the bro
Which JSP model (Model 1 or Model 2) and when should I use in my web applicatio
ASP vs. JSP?
Assertions do not work in Tomcat and Java!
Can I run a Java application through a web page? Can be a servlet used for this
Can I use HttpURLConnection class to make HTTPS requests in java 1.2?
easy, stand-alone web apps with Java: webbase 1.20
easy, stand-alone web apps with Java: webbase 1.20
File path in web application on Tomcat? Take the solution and code example!
Findout in one minute why Tomcat runs on 8080 port, not 80?
How can I start/stop my web application from a JSP page?
How do I attach a file to the HTTP POST request? I am using URLConnection to sen
How do I use JavaBeans components (beans) from a JSP page?
I design User Interface for server applications. Are there any libraries,
I just started to write JSP and servlets code.
I see this error message: java.net.SocketException:
Is it possible to use RSS (”Really Simple Syndication”) together with JSP?
Is JSP standalone technology or is it an extension of Servlets?
JSP include vs JSP action: What is faster for you?
Look here: Firefox with my free tools increase productivity of your work by 50%!
New trick: Reload a page N times without JavaScript and refresh tag
Question: Can I install an application on Tomcat on the fly or do I need to stop
Question: How can I measure performance of my servlets/JSP pages?
Question: How do can I highlight search results in my JSP application?
Question: How to decrease/stop logging in Tomcat?
Question: I’m trying to read a file from the jsp file on the server. It works fi
Question: What is the force driving gurus to come for portlets?
Question: What is the force driving gurus to come for portlets?
Sun open sources JavaServer Faces code
Understanding the Java Portlet Specification
webbase – easy made web apps
What are JSP Model 1 and Model 2 architectures?
Why do I need JSP technology if I already have servlets?

Floating-point
Integers
Number to String Conversion
Strings to Numbers

Applications, applets, and servlets
Common error messages and solutions
Essential DOS skills for working with Java
How Java compiles and interprets code
How to compile source code with a switch
How to get started with Java
How to get started with Java: How to navigate the API documentation
How to get started with Java: Introduction to Java IDEs
How to get started with Java: Perspective
How to get started with Java: The BlueJ IDE
How to get started with Java: The Eclipse IDE for Java
How to prepare your system for using Java
How to run an application
How to set the classpath
How to set the command path
How to use TextPad to run an application
How to use TextPad to save and edit source code
How to use TextPad to work with Java
How to use the command prompt to work with Java
How to use the documentation for the Java SE API
Introduction to Java

In releases prior to 1.4.2, it was possible to create an invalid URL instance s
A serversocket call accept(). Does it listen the port forever until get a reques
Accendia Iris Application Server Released
Are any classes available to deal with Mac Address ( not IP ) and which are thes
Can you help with third party pure Java programming language implementations of
Do you know any P2P (peer to peer) projects like Napster, Morpheus based on Java
Does Java support QoS (Quality of Service) for packets that are sent over the In
Easy fix for long timeouts in Java Sockets and RMI connections
How can I create a new Instance of InetAddress class? I have not found any const
How do I change the encoding of the text of characters when I transmit them thro
How do I encode a binary file before sending it and how do I decode it when I re
How to do a POST Method from a java application instead of a html page?
I am not strong in networking… Is it possible to create two ServerSockets list
I know that the PersonalJava application environment is a Java platform for buil
I work with RMI now and need to implement a new feature into software that was w
I write my data into a file with serialization methods (Java 1.1.8). How can I r
In Socket class exists method ”getOOBInline” that checks if OOBINLINE is enabl
IP addresses are used to get packets to the right computer, but how do packets
Is it possible to use SSL with RMI and can I have both (plain and encrypted) con
Java TCP Sockets and Swing Tutorial
Make your Tomcat More secure – limit network address for certain IP addresses
More about JNLP – Java Network Launching Protocol…
My application tries to read html files from web server.
New NIO Tutorial with working examples: the client, code. part II
Question: Is it possible to run an applet or application directrly from
Read New NIO Tutorial with working examples: the server
Session replication and clustering in Tomcat: version 6 vs version 5?
News: Sun makes room for Jxta
uCertify Launches Exam Simulation PrepKit for Microsoft 70-294 Exam for MCSE 200
uCertify to Release Exam Simulation Prepkit for Microsoft (70-290)Exam
Unbreakable Java: A Java Server That Never Goes Down
validate an IP address
When I use InetAddress.getByName if a lookup to the name service failed then all

BFO sign, seal and deliver PDFs with new PDF Library release
BFO- FREE improvements for PDF Library
Just Published: Murach’s Java SE 6
uCertify releases new Exam Simulation on CIW 1D0-435 exam

Java flaw could lead to Windows, Linux attacks

Armor2net Personal Firewall3.12: Launched by Armor2net Software to Protect PCs
Generate Certificate Chains for Testing Java Applications
How can generate absolute unique number without using complicated math functions
I am going to use ”a code obfuscation” to prevent it from stealing. Are there
I want to be able to uniquely identify a file by its contents. I read the file a
Java Security Hole: update your Java!
Microsoft warns of Java flaws
Secure a J2ME Environment with JCE
Security Vulnerabilities in the Java Runtime Environment Image Parsing Code
Sun Java System Server XSLT Processing Remote Java Method Execution Vulnerabilit
Sun JSSE SSL/TLS Handshake Processing Denial Of Service Vulnerability
The Java Web Start is vulnerable: Unauthorized Access!!
What are most used authentication methods for web applications?

I just starting with Java and going to develop a class that will give reverberat
I tried to look at the classes for Java Speech technology… They are not includ
I use the MediaTracker class is a utility class to track the status of a number
News: IBM Toolkit for MPEG-4 (version 1.1.1)

Finding Lost Frames
Placing components on each other
”The compiler team is writing useless code again …”
A Simple Database Viewer
Story By Dr. Kabutz: Anonymous Inner Classes
Blocking Queue
Book Review: “Wicked Cool” Java
Story By Dr. Kabutz: Boolean comparisons
Charting unknown waters in JDK 1.4 Part I
Checking that your classpath is valid
Circular Array List
Class names don’t identify a class
Classloaders Revisited: ”Hotdeploy”
Commenting out your code?
Counting bytes on Sockets
Counting Objects Clandestinely
Counting Objects Clandestinely – Follow-up
Story By Dr. Kabutz: Deadlocks in Java
Story By Dr. Kabutz: Depth-first Polymorphism
Determining Memory Usage in Java
Doclet for finding missing comments
Doclets Find Bad Code
Story By Dr. Kabutz: Dynamic Proxies – Short Tutorial
Exceptional Constructors – Resurrecting the dead
Exceptions From Constructors
Final Newsletter
Follow-up to JDK 1.4 HashMap hashCode() mystery
Generic Types with Dynamic Decorators
Hash, hash, away it goes!
HashMap requires a better hashCode() – JDK 1.4 Part II
Story By Dr. Kabutz: Hooking into the shutdown call
Story By Dr. Kabutz: Implementation code inside interfaces
Story By Dr. Kabutz: Implementing a SoftReference based HashMap
Story By Dr. Kabutz: Insane Strings
J2EE Singleton
Java Import Statement Cleanup
Story By Dr. Kabutz: java.awt.EventQueue
Lack of Streaming leads to Screaming
Story By Dr. Kabutz: Logging part 1
Story By Dr. Kabutz: Logging part 2
Making Exceptions Unchecked
Multi-line cells in the JTable
Multicasting in Java
Non-virtual Methods in Java
Nulling variables and garbage collection
Once upon an Oak …
Package Versioning
Review: Object-Oriented Implementation of Numerical Methods
Review: The Secrets of Consulting
Self-tuning FIFO Queues
Story By Dr. Kabutz: Serializing GUI Components Across Network
Story By Dr. Kabutz: Serializing GUI Components Across Network, follow up
Serializing Objects Into Database
Story By Dr. Kabutz: Setting focus to second component of modal dialog
Shutting down threads cleanly
Speed-kings of inverting booleans
Switching on Object Handles
Switching on Object Handles: Follow-up
Using Unicode Variable Names
Visiting your Collection’s Elements
What do you Prefer?
When arguments get out of hand…
Why I don’t read your code comments …
Story By Dr. Kabutz: Writing GUI Layout Managers

I want to erase text in a TextArea. I want to use some function clear(), clearA
I want to use progress bar for downloading files from Internet. But how do I kn
A couple of canvases inside my applet using BorderLayout…
Could you tell me what is advantage of Spinner over Combo box?
Desktop Java Features in Mustang
GUI – Swing vs. AWT
GUI Structural Patterns
How can I call swings in browser?
How can I color in real time user text input?
How can my application dispose or close a Frame from another Frame AWT? For exam
I am getting strange artifacts when rendering Asian text in a TextArea component
I am trying by one statement to change the font for all Swing components that ar
I need ”Always On Top” functionality for my GUI… How could I do that?
I use printing of Swing components. It is slow… Can I increase the speed?
I want to disable the users ability to close a window (JDialog) using the ”x”
I want to get mouse move and click events when the mouse is outside of the Java
Icon in taskbar for my Java Application? Read here answer.
Introduction to Components
Is there a way to detect if the CAPS LOCK key is active? I want to detect it eve
Java 2 SE 6.0 Aesthetics Preview
Java Calendar Component v2.0 released
Java code examples grouped by class name
Java: Borders
Java: Change Listener
Java: Components
Java: Example – JTextArea
Java: JButton
Java: JCheckBox
Java: JComboBox (uneditable)
Java: JLabel
Java: JLabel font and color
Java: JLabel for output
Java: JMenu
Java: JTextField
Java: Radio Buttons
Java: Sliders
JButton Appearance
Mixing Heavy and Liight components
Mouse Gestures Library for Java
On Solaris, Java Advanced Imaging complains about lack of access to an X server.
Question: Do you know how to make windows button on task bar flash?
Question: What is SWT? And what is useful for?
Strange classes in Java: LayoutManager and LayoutManager2. Need you even LayoutM
Summary – Basic GUI Components (Widgets)
Summary – GUI Containers
Summary – GUI Layouts
Swing Dev with TableModel Free framework
News: Take the heavy coding out of fixed-object animation
Text
The class Robot was introduced in Java version 1.3 and belongs to awt (java.awt.
The Java Look-and-Feel Debate
Today many mice have more than three buttons. And people program the fourth – th
Version 1.5 of Advanced Swing Components is released.
VolatileBufferedToolkitImage Strategies
Where to declare components

Implementing RESTful Web Services in Java
SSL with GlassFish v2

Basic Regular expression summary
Big Smileys
comma separated into string array
Find out in one minute why you can not wirite unicode characters to my file!
Has anyone found a way to produce a MS Word file with Java?
How to check whether there are new text files in a specified folder and what is
How to get ascii code from a char in Java?
I have developed an application. At present the application is in English Langua
I have developed an application. At present the application is in English Langua
I placed the current date and time into String data type. But my table column is
I want to get the java.lang.String to read a stream of Chinese characters. But I
I want to to have a listener for a String’s change event. Is it possible?
I write a batch file dynamically. First, I collect all data into String value an
Java String is immutable, but why String Class has those methods…
java.util.StringTokenizer
Look here how can I read, write Word documents from Java program
Pattern and Matcher
Properties class inherited from Hashtable… Does it mean that I can use ”non-s
Question: Do you know how can I display special symbols like ”copyright” & ”t
Question: How do I split comma or white separated string?
Read how can I find out the same word in a text if it has different case (u
Regex Examples
Regex Language Intro
Regular expression summary
Regular Expressions
String Regex Methods
What is a rasterizer? Why doesn’t Java 2D use a native rasterizer for rendering
What is important to remember when you use SimpleDateFormat…
When I copy an MS Excel file to another Excel file, I’m getting garbage characte
Why String in Java is made immutable? Why it is not stupid idea?

Can I combine the two techniques to produce a thread that may be safely ”stoppe
Correction: In one of my last newsletters was the answer to the question:
How do I stop a thread that waits for long periods (e.g., for input)?
I am sure that in my program I create 100 new threads and when I use isAlive met
I read many times that Thread.stop is deprecated and it is unsafe to use it. But
Question: I get an error ”Green threads not supported” when tried to use -gree
The thread constructor since 1.4.1 allows the thread stack size to be specified.
What if a thread doesn’t respond to Thread.interrupt?
What should I use instead of Thread.suspend and Thread.resume?
When should I use notify() and when notifyAll() methods on threads?
Why are Thread.suspend and Thread.resume deprecated?
Why wait(), sleep(), notify(), notifyAll() must be inside a synchronized block,

Web Design:
Web Design: ”How To Create Your Own *24/7 Little Sales Machines* In 5 Simple Steps”
Advanced Web Ranking v2.4 Released
Advanced Web Ranking v2.4 Released
Advanced Web Ranking v3.0 Released
Advanced Web Ranking v3.1 Released
Advanced Web Ranking v3.2 Released
Advanced Web Ranking v3.3 Released
Advanced Web Ranking v3.7 Released
Web Design: Buy and Use a Mailing List – Headaches Forever…
Dynamic Web Data Analysis: A Design Approach
From marketing to Tea, any type of website can benefit from paid optimization
Web Design: Getting Into Google Through Their Open Back Door
Web Design: How To Write A High-Profit Autoresponder Series
IBM Business Process Execution Language for Web Services JavaTM Run Time
Web Design: It’s not just being linked, but how you link – anchor text
javasight.com, Java’s new portal, is online
Web Design: Log Analysis
Web Design: Moving to another web host or server? Some tips…
Web Design: Reciprocal Linking is Dead!
Web Design: The Top Seven Strategies for Website Success
Web Design: Web development: search engines
Whizlabs Launches SCJP 5.0 Certification Exam Simulator

EditiX 2 – XML Editor and XSLT Debugger
EditiX 2.1 – XML Editor & XSLT Debugger
Good review: Java XML RPC
I understand that the XML is some kind of language to describe documents. Why do
What is an XML registry and JAXR?
What is meant by ”transformation” in JAXP?
Why java parsers allow schema validation to be disabled?

Link: http://www.javafaq.nu/topics.html

Z-order: The difference between lightweight and heavyweight components

Swing components are referred to as lightweights while AWT components are referred to as heavyweights. The difference between lightweight and heavyweight components is z-order: the notion of depth or layering. Each heavyweight component occupies its own z-order layer. All lightweight components are contained inside heavyweight components and maintain their own layering scheme defined by Swing. When we place a heavyweight inside another heavyweight container it will, by definition, overlap all lightweights in that container.

What this ultimately means is that we should avoid using both heavyweight and lightweight components in the same container whenever possible. This does not mean that we can never mix AWT and Swing components successfully. It just means we have to be careful and know which situations are safe and which are not. Since we probably won’t be able to completely eliminate the use of heavyweight components anytime soon, we have to find ways to make the two technologies work together in an acceptable way.

The most important rule to follow is that we should never place heavyweight components inside lightweight containers that commonly support overlapping children. Some examples of these containers are JInternalFrame, JScrollPane, JLayeredPane, and JDesktopPane. Secondly, if we use a popup menu in a container holding a heavyweight component, we need to force that popup to be heavyweight. To control this for a specific JPopupMenu instance we can use its setLightWeightPopupEnabled() method.

Note: For JMenus (which use JPopupMenus to display their contents) we first have to use the getPopupMenu() method to retrieve the associated popup menu. Once retrieved we can then call setLightWeightPopupEnabled(false) on that popup to enforce heavyweight functionality. This needs to be done with each JMenu in our application, including menus contained within menus, etc.

Alternatively we can call JPopupMenu’s static setDefaultLightWeightPopupEnabled() method, and pass it a value of false to force all popups in a Java session to be heavyweight. Note that this will only affect popup menus created after this call is made. It is therefore a good idea to call this method early within initialization.

MVC architecture

MVC architecture

MVC is a well known object-oriented user interface design decomposition that dates back to the late 1970s. Components are broken down into three parts: a model, a view, and a controller. Each Swing component is based on a more modern version of this design. Before we discuss how MVC works in Swing, we need to understand how it was originally designed to work.

Note: The three-way separation described here is only used today by a small number of user interface frameworks, VisualWorks being the most notable.

Figure 1.3 Model-view-controller architecture

<<file figure1-3.gif>>

1.3.1    Model

The model is responsible for maintaining all aspects of the component state. This includes, for example, such values as the pressed/unpressed state of a push button, a text component’s character data and information about how it is structured, etc. A model may be responsible for indirect communication with the with the view and the controller. By indirect we mean that the model does not ‘know’ its view and controller–it does not maintain or retreive references to them. Instead the model will send out notifications or broadcasts (what we know as events). In figure 1.3 this indirect communication is represented by dashed lines.

1.3.2    View

The view determines the visual representation of the component’s model. This is a component’s “look.” For example, the view displays the correct color of a component, whether the component appears raised or lowered (in the case of a button), and the rendering of a desired font. The view is responsible for keeping its on-screen representation updated and may do so upon receiving indirect messages from the model, or direct messages from the controller.

1.3.3    Controller

The controller is responsible for determining whether the component should react to any input events from input devices such as the keyboard or mouse. The controller is the “feel” of the component, and it determines what actions are performed when the component is used. The controller can receive direct messages from the view, and indirect messages from the model.

For example, suppose we have a checked (selected) checkbox in our interface. If the controller determines that the user has performed a mouse click it may send a message to the view. If the view determines that the click occurred on the checkbox it sends a message to the model. The model then updates itself and broadcasts a message, which will be received by the view(s), to tell it that it should update itself based on the new state of the model. In this way, a model is not bound to a specific view or controller, allowing us to have several views and controller’s manipulating a single model.

Swing

Swing is a large set of components ranging from the very simple, such as labels, to the very complex, such as tables, trees, and styled text documents. Almost all Swing components are derived from a single parent called JComponent which extends the AWT Container class. Thus, Swing is best described as a layer on top of AWT rather than a replacement for it. Figure 1.2 shows a partial JComponent hierarchy. If you compare this with the AWT Component heirarchy of figure 1.1 you will notice that for each AWT component there is a Swing equivalent with prefix “J”. The only exception to this is the AWT Canvas class, for which JComponent, JLabel, or JPanel can be used as a replacement (in section 2.8 we discuss this in detail). You will also notice many Swing classes with no AWT counterparts.

Figure 1.2 represents only a small fraction of the Swing library, but this fraction consists of the classes you will be dealing with most. The rest of Swing exists to provide extensive support and customization capabilities for the components these classes define.

AWT

AWT (the Abstract Window Toolkit) is the part of Java designed for creating user interfaces and painting graphics and images. It is a set of classes intended to provide everything a developer requires in order to create a graphical interface for any Java applet or application. Most AWT components are derived from the java.awt.Component class as figure 1.1 illustrates. (Note that AWT menu bars and menu bar items do not fit within the Component hierarchy.)

AWT Vs. Swing

(Abstract Windowing Toolkit) A class library from Sun that provides an application framework and graphical user interface (GUI) routines for Java programmers. AWT was the first user interface development system included in the Java Foundation Classes (JFC). In 1997, Swing was introduced, which provides more capability and is written entirely in Java. See JFC, AFC and IFC.
AWT Vs. Swing
AWT calls the operating system at a higher level than Swing, and the AWT routines use native code. Swing was written entirely in Java and is platform independent.

https://i0.wp.com/common.ziffdavisinternet.com/encyclopedia_images/AWT.GIF

Swing Packages

javax.swing – Provides a set of “lightweight” (written in Java with no native code) components that, to the maximum degree possible, work the same on all platforms.
javax.swing.border – Provides classes and interfaces for drawing specialized borders around a Swing component.
javax.swing.colorchooser – Contains classes and interfaces used by the JColorChooser component.
javax.swing.event – Provides support for events fired by Swing components.
javax.swing.filechooser – Contains classes and interfaces used by the JFileChooser component.
javax.swing.plaf – Provides one interface and many abstract classes that Swing uses to provide its pluggable look and feel capabilities.
javax.swing.plaf.basic – Provides user interface objects built according to the Basic look and feel.
javax.swing.plaf.metal – Provides user interface objects built according to the Java look and feel (once codenamed Metal), which is the default look and feel.
javax.swing.plaf.multi – Provides user interface objects that combine two or more look and feels.
javax.swing.plaf.synth – Provides user interface objects for a skinnable look and feel in which all painting is delegated.
javax.swing.table – Provides classes and interfaces for dealing with JTable.
javax.swing.text – Provides classes and interfaces that deal with editable and non-editable text components.
javax.swing.text.html – Provides the class HTMLEditorKit and supporting classes for creating HTML text editors.
javax.swing.text.html.parser – Provides the default HTML parser, along with support classes.
javax.swing.text.rtf – Provides a class (RTFEditorKit) for creating Rich Text Format text editors.
javax.swing.tree – Provides classes and interfaces for dealing with JTree.
javax.swing.undo – Allows developers to provide support for undo/redo in applications such as text editors.

JCalendar: Tutorial

JCalendar is the generic name for two Java components: one is called JCalendar and the other is called JCalendarCombo. They both share common features, particularly the ability to select a date and/or time. The former accomplishes this with a panel and the latter with a combo-box.
Creating the Components

The simplest constructors for JCalendar and JCalendarCombo have no arguments. They create calendar components that allow a date to be selected from the default calendar in the default locale.

The next step is to select the specific Calendar and Locale classes to use (but the JCalendar components have only been tested with the Gregorian calendar). There are three more parameters that can be specified:
Whether to select a date, a time or both.
Whether to display today’s date at the bottom of the component.
The SimpleDateFormat pattern to use in displaying the time selection field.

Normally, the calendar components allow you to select a null date/time (press Delete or Backspace to set a null selection). This is useful for cases where the user has an option of not specifying a date/time. You can turn this off by calling setNullAllowed(false).

For the JCalendarCombo, you also have the option of making the combo-box editable (as with any combo-box). You can control the date format that appears in the combo-box field with setDateFormat().
Date Selections

You can set the selected date with setDate(). The default date/time selection will be today’s date/time unless you explicitly set a date. You can read the currently selected date at any time using getDate() or getCalendar(). Finally, you can add a DateListener to listen for date changes. Each time the date/time changes, the listener is called.
Fonts

You may specify the font to use for each elements that makes up a calendar component. The elements are:
The month-year title.
The day-of-week labels (Mon, Tue, etc.).
The day buttons.
The time spinner.
The today’s date message.

In addition, the combo box text can be changed in the usual way—by calling setFont() on the combo box component.
Keyboard Control

The calendar appears with buttons that allow the user to move a month or year backwards or forward. You can use the arrow keys to do the same:
Left Arrow – Move back a month.
Right Arrow – Move forward a month.
Shift Left Arrow – Move back a year.
Shift Right Arrow – Move forward a year.

In addition, you can use Delete or Backspace to select a null date (if null dates are allowed).

As normal, you can tab through the various buttons (including the day buttons) and press Enter to activate the button.

If there is a time field, it can be a little problematic. Once it has focus, the up/down arrow keys increment/decrement portions of the time field. The left/right keys select the portion of the time to increment/decrement. You will need to tab out of the time field or use the mouse to select a button elsewhere in the calendar in order to restore the normal keyboard controls.

The JCalendarCombo has some additional keyboard controls. The down arrow pops up a calendar if one is not visible. The up arrow hides the calendar pop-up (as does the Enter key). The Escape key also hides the calendar, but restores the date to the value it had before the calendar was popped up.
Internationalization

The JCalendar components take advantage of the internationalization and localization work done by the Calendar class. In order to fully localize JCalendar to other than US English, you will need to obtain the source code for JCalendar and create a org.freixas.jcalendar.Bundle_<locale>.properties file which translates the text in org.freixas.jcalendar.Bundle.properties, where <locale> is a two-letter country code.

The main thing in this file are the tooltips for the various buttons and the text for displaying today’s date as well as some error messages.
Look-and-Feel

It was important for my own use that the JCalendar combo-box adopt the current Java Look-and-Feel (L&F). As it turns out, it is impossible to design a class that can automatically do this for all possible L&F’s. If you need to use a L&F other than Metal, Windows or Motif, you will need to obtain the JCalendar source code and make some changes.

In the updateUI() method of JCalendarCombo.java, you will need to add some code that looks like this:
else if (cui instanceof SomeComboBoxUI) {
cui = new SomeDateComboBoxUI();
}

Then in the inner class section of the code, add a new inner class:
class SomeDateComboBoxUI
extends SomeComboBoxUI
{
protected ComboPopup createPopup() {
return new CalendarComboPopup();
}
}

Of course, the word “Some” would be replaced by the name of your L&F (Metal, Motif, etc.). When your L&F is installed, the JCalendarCombo combo-box will now look the same as a normal JComboBox.
Summary

The JCalendar components are designed to be easy to use—create the component you want, set up a few options and register a DateListener and you’re in business.

After reading this tutorial, you should examine the example programs provided which exercise many of the features of JCalendar components.

JCalendar

The main features of JCalendar are:
Easy to use.
Can input the date, time or both.
Can set entry format for time selection.
Can optionally display today’s date.
Can use as a panel (JCalendar) or combo-box (JCalendarCombo).
The combo-box can be editable.
Can select date format for selected date in combo-box.
Can select the font to use for all display elements.
Can optionally allow null date (no date) to be selected.
Keyboard access to all functionality.
Combo-box can adopt current L&F (requires modifications for new L&F’s).
Fully internationalized and ready for localization. Most localization is already done by taking advantage of the localization in the Java Calendar class.
Link: http://flib.sourceforge.net/JCalendar/doc/features.html

Features Summary

JAVA

  • 100% Java
  • Support JDK 1.1.x, 1.2.x, 1.3.x, 1.4.x, 1.5.x, 1.6.x
  • Extensive JDBC interface support with batch statement and scrollable ResultSet functionality
  • Full JDBC DatabaseMetaData and ResultSetMetaData support
  • Java stored procedures and functions
  • Full support for PreparedStatement objects to speed up query processing

SQL

  • Relational Database Management System, with the object capabilities of Java
  • Very extensive support for SQL:2003 Standard syntax, including most optional features
  • Supports all base data types of the SQL Standard, including BINARY, BIT, BOOLEAN, date-time, INTERVAL, BLOB, CLOB
  • Supports user-defined DOMAIN types, including type constraints
  • Fast SELECT, INSERT, DELETE, UPDATE and MERGE operations
  • INNER, LEFT OUTER, RIGHT OUTER and FULL joins
  • UNION, EXCEPT, INTERSECT, including use of parentheses, limits and offsets
  • Scalar (single value) SELECTS, row and correlated subqueries including IN, EXISTS, ANY, ALL
  • Views, Temp tables and sequences
  • Primary key, unique and check constraints on single or multiple columns
  • Referential Integrity (foreign keys) on multiple columns with full cascading options (delete, update, set null, set default)
  • ORDER BY, GROUP BY and HAVING
  • COUNT, SUM, MIN, MAX, AVG and statistical aggregate functions
  • Full support for SQL expressions such as CASE .. WHEN .. ELSE .. , NULLIF etc.
  • SQL standard autoincrement column support plus sequences
  • Transaction COMMIT, ROLLBACK and SAVEPOINT support
  • Multiple schemata per database
  • Triggers, implemented as Java classes, or as SQL statements
  • Database security with passwords, user rights and roles with GRANT and REVOKE
  • Extensive set of ALTER TABLE commands, including change of table column type

Persistence

  • In-memory tables for fastest operation
  • Disk based tables for large data sets
  • Text tables with external file data sources such as CSV files
  • Disk tables (CACHED TABLE) up to 8GB and text tables up to 2GB each
  • Size of each string or binary item only limited by memory
  • Database dump as SQL script with or without data

Deployment

  • Embedded (into Java applications) and Client-Server operating modes
  • Three client server protocols: HSQL, HTTP and HSQL-BER – can run as an HTTP web server – all with SSL option
  • Can be used in applets, read-only media (CD), inside jars, webstart and embedded applications
  • Multiple databases per JVM

Utilities

  • Powerful and compact java command line and GUI tools for database management
  • Tranfer tool for conversion of databases to / from other popular database managment systems

SourceForge Logo

This page last updated 20 April 2008

Link: http://hsqldb.org/web/hsqlFeatures.html

HSQL

HSQL là 1 hệ qtrị csdl quan hệ, đặc biệt nó được viết bằng 1 ngôn ngữ cấp cao: JAVA. Để biết thêm các đặc điểm của nó , các bạn có thể xem tại đây

hsql features:
http://hsqldb.org/web/hsqlFeatures.html

documentation
http://hsqldb.org/web/hsqlDocsFrame.html

TẠI SAO NÊN DÙNG HSQL: Như mọi ng biết, mọi hệ qtcsdl đều fải cài đặt tại máy khách để có thể dùng được ứng dụng có xài hệ csdl đó. Thật là bất tiện. Có 2 phương án đẻ chúng ta chọn nếu ko làm như vậy:
1/ access: gọn nhẹ, nhưng dễ bị crack password, an toàn ko cao, ko chạy trên các OS khác như linux
2/ Tự viết ra chức năng lưu/backup/restore data trên các file .dat .bak -> có ai siêng ngồi viết ko biggrin.gif

Để giải quyết vấn đề trên chúng ta cần 1 hệ csdl thân thiện (như sqlserver), cú pháp query gọn, dễ dùng như t-sql, và phải là 1 standalone database application. Lựa chọn tốt nhất theo tui hiện nay ko thể khác đó là HSQL

VÀ BÂY GIÒ LÀ MÀN KẾ: THAO TÁC SỬ DỤNG HSQL (VỚI TOOL VÀ SQL)

1/ download hsql:
http://sourceforge.net/project/showfiles.php?group_id=23316

2/ Giải nén hsql.zip -> folder hsqldb.zip
Giải nén cũng chính là thao tác cái đặt happy.gif.
Sau khi GIải nén xong, bạn có thể sữ dụng, ma ko cần 1 công đoạn cấu hình phức tạp nào nữa

3/ Sử dụng công cụ trực quan của hsql:
Trong thư mục hsqldb có 1 thư mục lib, mở nó ra bạn sẽ thấy 3 file
Trong bài này ta chỉ dùng hsqldb.jar
Đây là file dạng executable jar file (giống exe vậy)
Cách
+ set path
+ java -cp hsqldb.jar org.hsqldb.util.DatabaseManager

Ví dụ, trên máy tui cài jdk ở vị trí sau: C:\Program Files\Java\jdk1.5.0_14

Vậy thao tác tui cần làm là:

start-run-cmd
cd <path đến thư mục hsqldb>\lib
set path=.;C:\Program Files\Java\jdk1.5.0_14\bin (có thư mục bin nữa nhé)
java -cp hsqldb.jar org.hsqldb.util.DatabaseManager

Giao diện sẽ có dạng như hình sau:

Bạn để nguyên các configuration, ko chỉnh sửa gì nha
Nhấp OK.
Màn hình chính sẽ hiện ra như sau:

Không cần tạo database ^^, nó sẽ tự tạo cho ta 1 db mặc định

Bây giờ hãy thử các query statement sau: (nhớ rằng: thực hịên từng khối lênh cùng loại
thì được, khác loại sẽ gây lỗi.)

create table lop
(
malop integer primary key,
tenlop varchar
)

insert into lop values(1,’Ngoai Ngu’)
insert into lop values(2,’Tin hoc’)
insert into lop values(3,’The Duc’)
insert into lop values(4,’Am Nhac’)

select * from Lop

delete from lop

update lop set tenlop=’cntt’ where malop=2

LƯU Ý: MỖI KHI CHAỴ XONG 1 QUERY BẠN MUỐN REFRESH tree view bên trái LẠI THÌ LAM NHƯ SAU:

+ view – refresh tree hoặc
+ ctrl-R

CSDL trên tồn tại trong bộ nhớ ram, sau khi tắt ứng dụng hsql nó sẽ được giải phóng khỏi ram happy.gif. Nếu có ai hứng thú với hsql, tui sẽ post nhiều chuyên mục khác hấp dẫn hơn có liên quan đến nó.

Đón xem phần kế: lập trình Java kết nối với HSQL

Link: http://kiamiracle.wordpress.com/2008/02/09/h%E1%BB%86-qu%E1%BA%A2n-tr%E1%BB%8A-csdl-hsql/

AlloyLookAndFeel

/**Project Name: example1
* Package Name: jTable
* File Name: TableExample.java
* Path :
* Description:
* Copyright: Copyright (c) 2008
* Company: Harmonysoft, Ltd
* Created User: tinh_cx, Email: tinh_cx@harmonysoft.com.vn
* @version 1.0
* Created Time: 2:54:17 PM, Apr 27, 2008
*/
package jTable;

import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

import com.pagosoft.plaf.PlafOptions;

public class TableExample extends JPanel{
static JFrame myFrame;

// Tao cac hang DL cho bang;
String data[][] = {
{“1”, “Intro1”},
{“2”, “Intro2”},
{“3”, “Intro3”},
{“4”, “Intro4”},
{“5”, “Intro5”},
{“6”, “Intro6”},
{“7”, “Intro7”},
{“8”, “Intro8”},
{“9”, “Intro9”},
{“10”, “Intro10”}
};

// Tao ten tieu de danh cho cot;
String columNames[] ={
“STT”, “Content”
};

public TableExample() {
// Tao bang;
JTable table = new JTable(data, columNames);

// Dua bang vao khung chua JScrollPane de xem dc nhieu hang/cot;
JScrollPane pane = JTable.createScrollPaneForTable(table);

// Dua khung chua JScrollPane (co chua bang) vao chuong trinh;
this.add(pane);
}

public static void main(String[] args) {
myFrame = new JFrame(“This is Title”);
TableExample app = new TableExample();
myFrame.getContentPane().add(“Center”, app);
myFrame.addWindowListener( new WindowAdapter(){
public void windowClosing(WindowEvent we) {
System.out.println(“exited”);
System.exit(0);
}
} );

Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
System.out.println(“screenSize: ” + screenSize);
myFrame.setSize(600, 400);
myFrame.setLocation( (screenSize.width – myFrame.getWidth()) / 2,
(screenSize.height – myFrame.getHeight()) / 2
);
try {
com.incors.plaf.alloy.AlloyLookAndFeel.setProperty(“alloy.licenseCode”, “v#ej_technologies#uwbjzx#e6pck8”);
UIManager.setLookAndFeel(“com.incors.plaf.alloy.AlloyLookAndFeel”);

// com.incors.plaf.alloy.AlloyLookAndFeel
// org.fife.plaf.Office2003.Office2003LookAndFeel
// org.fife.plaf.OfficeXP.OfficeXPLookAndFeel
// org.fife.plaf.VisualStudio2005.VisualStudio2005LookAndFeel
// com.pagosoft.plaf.PgsLookAndFeel
// com.pagosoft.plaf.PlafOptions
// com.pagosoft.plaf.themes.SilverTheme
// PlafOptions.setAsLookAndFeel();
SwingUtilities.updateComponentTreeUI(myFrame);
} catch (Exception e) {
e.printStackTrace();
}

myFrame.setVisible(true);
}
}

101 Reasons Why Java Is Better Than .NET

http://www.manageability.org/blog/archive/20030108%23101_reasons_why_java_is/view

1. Run on Multiple Platforms from the Smallest Devices to the Largest Mainframes.

Run on multiple platforms, from smart cards, embedded devices(JStamp), cell phones(Nokia, Motorola, Ericsson etc), pdas (Palm, Symbian, Sharp),laptops and desktops (MacOS, Linux), servers (Unix based), Non Stop Servers (Tandem) to Mainframes ( IBM ).

2. Run Dynamic Languages

Run Dynamic Languages like Python (JPython) , Scheme (JScheme, SISC, Kawa), Ruby(JRuby), Smalltalk(Bistro). In comparison a commercial development effort to port Python to .NET showed dismal performance. Furthermore, a paper comparing the CLR and the JVM came to similar conclusions .

3. Compile in One Platform Run in Another.

Visual Studio.NET and .NET SDK End User License Agreements specifically states that code compiled with it cannot run in non-microsoft platforms.

4. Smaller Runtime Download

The Java Runtime Evironment (JRE) is a 8MB runtime download, .NET runtime download is over twice as large (i.e. 20 MB).
5. No mandatory upgrades. No subscription fees. No software insurance fees.

How many MIS organizations are held hostage to microsoft’s draconian licensing policies?

6. Run Multiple Versions of the VM (Runtime) on the Same Machine

Its common to have multiple version of the Java Virtual Machine (JVM) available and running simultaneously on the same operating system. This is useful if you need to test your application on different version of the JVM. Try doing this with .NET.
Its common for Windows based products to have several machines with different versions of Windows to do tests. In fact, this is in fact such a big problem that even Microsoft licensed the use of VMWare (a product that allows you to run multiple virtual machines) for its 6,000 salespeople .

7. Large Innovative Open Source Community

The existence of a large body of open source code is value that should not be ignored. This provides developers an enormous repository of code that can be reused. In fact, most .NET open source projects are rewrites of Java projects.

8. Low cost Commercial Quality IDE’s

The Eclipse and Netbeans IDEs are free for any kind of software development. JBuilder and JDeveloper are free for educational use. This is in stark contrast with .NET where Visual Studio.NET costs almost $500. Also, if you think sharpdevelop is commercial grade, think again!

9. More Available Jobs

A search on Monster.com will quickly reveal that there are 10 times more jobs that require Java skill than C# jobs. In fact a third of C# jobs require Java skills.

10. Better and Standardized Connectivity to Legacy Applications

The Java Connector Architecture (JCA) is a standard for connecting to Enterprise Information Systems (EIS). JCA supports access to SAP, IBM CICS, PeopleSoft, Oracle, Siebel, Screens 3270, AS/400, Unisys, ADABAS-C, VSAM, Codasyl, IMS, Tuxedo etc. This level of connectivity options in unavailable for .NET.

11. Multiple Vendor Choice and Support

Java technologies are supported by multiple vendors allowing mix and match and best of breed solutions. Java standard APIs have always been designed to be supported by multiple implementations.
For example the Java Messaging Service (JMS) standard is supported by multiple vendors IBM, TibCo, Progress, SpiritSoft, Fiorina, Swift, Open3, JBoss, etc. You have the freedom to pick what’s the best messaging product for your situation, you don’t have that option with Microsoft where there is only one choice MSMQ.

12. Compile to Machine Code

Java has several solutions to compiling into machine code, that is when compiling to byte code is an issue for either intellectual property or performance reasons. TowerJ, Jove from Instantiations, Excelsior JET and GNU GCC provide robust solutions to compiling Java to native code.

13. Future Proof

Java is future proof or rather future portable, in the sense that your existing code base will not become obsolete. How so? I can run Java on machines today and machines in the future. You don’t have that assurance for Microsoft’s technologies like .NET. A vivid example is their support for for VB6, which has been set to expire. It’s crucial to consider that every development has a ROI that spans several years. How many years was DNA around before Microsoft declared it obsolete?

14. Most Popular Language in the Corporation

A recent survey reveals “Interestingly, the strong showing of Visual C# .NET divides the Microsoft camp and propels Java into first place as the most popular language over the coming year”. In corporations, there are more developers familiar with Java than any other language. The benefit is that there’s a higher chance that someone can maintain or fix a java program than that written in any other language. Do you think you’ll find someone in your corporation who will be able to fix that legacy VB application 2 years from now?

15. Larger Talent Pool

Java is taught in most universities, this is resource for well trained affordable junior programmers, the same can’t be said about C# or VB. Senior Java developers are also easier to find. The same can’t be said about C# where there aren’t any senior developers. Also a senior VB developer is least qualified to lead development requiring OO analysis and design.

16. More Contributions From R&D Organizations

Java is not only taught at universities, it is also extensively used as part of research and development. Work by Matt Welsh at UC Berkeley contributed to the New IO mechanisms we find in JDK 1.4. Generics was worked done by University of South Australia. Aside from universities, research organizations like CERN and HEP have contributed a large amount of code to the public.

17. Government Approved

The Office of Management and Budget (OMB) of the U.S. Federal Government recommends to architects the use Java 2 Enterprise Edition over Microsoft .Net as underlying technology. This means that a larger share of billions of dollars that will be spent to upgrade the governments aging IT infrastucture will be done in Java. Expect other governments wary of Microsoft’s licensing practices to do the same.

18. More Homogeneous and Less Complex Environment

The Java environment is more homogeneous and less complex than .NET. It is not littered with obsolete technologies like COM, DCOM, COM+, ADO, nor is it dependent on operating system indiosyncracies like register settings or most recent service patch level. Furthermore, there is no artificial divisions between someone called a VB programmer and someone called a C# or C++ programmer. Developers are competent whether its UI development or server development, everything is in Java so its understandable and therefore maintainable by everyone.

19. More Deployment Options

With Java there are more ways to deploy your application. Here are a few ways: applets, webstart, x-windows, midlet. Furthermore, there is standardization for client provisioning being proposed as a JSR.

20. More Searchable References

A search in Google of for “C#” hits 1,720,000 documents, for “Visual Basic” hits 3,270,000. In comparison a search for Java hits 32,100,000, almost 10 times more than even Visual Basic.

21. Better support for Software Process Best Practices

Most best practices in software development are done in Java shops. Examples like Refactoring, JUnit testing and Continuous builds. Java developers are familiar with these practices, and by hiring them, you introduce these practices into your organization.

22. Mature Object Oriented Relational Mapping Tools

It is best practice in Object Oriented development to decouple business objects from their underlying relational database representation. Java has several mature and robust products that support the mapping of relational databases to objects, notable of which are TopLink and CocoBase. There is no equivalent of such a tool in the .NET world. Microsoft is trying to remedy the situation by buiding something called “ObjectSpaces”, however its still in beta and not mature enough to entrust your enterprise business on.

23. More Productive Coding Tools

Java IDEs are superior in their support for coding tasks. Features like code refactoring, intention actions, superior code browsing (i.e Find Usages) and robust code completion are superior to what you find in Visual Studio.NET. In fact, Visual Studio.NET is known to unintentionally erase code.

24. Cross Platform Integration with Other Languages

Integration with Java from other languages like Perl, PHP or Python is cross platform. In otherwords, I can take my PHP scripts that talk to Java and run in windows, place them in a Linux box and have them work without a major porting effort.

25. Higher Paying Jobs

On the average a Java programmer earns quantitatively more than a VB programmer with the same number of years experience.

26. Better Support for Peer to Peer Networks

Java is used extensively to build Peer to Peer (P2P) networks. There are open source java implementations of the gnutella protocol. JXTA is an emerging standard for P2P networks and uses Java as its prototype implementations. Limewire and Kazaa downloaded hundreds of millions of times are written in Java and are among the more popular P2P clients available to date.

27. Pure Java Relational Databases

There are several relational databases that are implemented in Java, these are Pointbase, HSQL, Instantdb, Firstsql and Cloudbase. These are important in that they allow you to deploy a database everywhere you can deploy Java. Some of them even allow Java types to be used in the database. Another additional benefit they are much easier to install than a traditional RDMS. There are no equivalents of an RDMS written in .NET languages like C# or VB.NET.
28.Standardized Security
Java has a standard way of providing Authentication and Authorization (JSSE). The choices in .NET is limited. In fact, a well published bug in the way IE handled digital certificates required a service pack to fix.

29. Safer Third Party Libraries

Java libraries are assumed to be 100% pure Java unless otherwise noted. .NET libraries may come in native code or IL. Native code libraries have a likelihood to make a software system unstable and insecure. In fact its not clear what percentage of code in the core .NET libraries compile to MSIL. In the .NET world the concept of safe library code is deliberately ambiguous. Rather than tell you that Windows.Forms is 90% native windows code, Microsoft prefers to be silent about it, and hope that you buy their portable and safe argument.

30. Resusable IDE Frameworks

Netbeans and Eclipse are reusable GUI Frameworks that can be leveraged in building your GUI application. This means less time building your GUI framework, and more time building the core of your application. You can’t find something similar in .NET.

31. Open Source Structured Diagram Editing Frameworks

There are many open source structured diagram editing frameworks in Java (i.e. GEF, JGraph, JHotDraw) that can be reused and embedded in your application without cost.

32. More Parser Generators

There’s is more mature support for generating parsers in the Java world, some options are JavaCC, ANTLR, Sable, JavaCUP and JFLex.

33. Aspect Oriented Programming

Grady Booch co-creator of UML states “If I were to look into my crystal ball in terms of the next generation of programming languages, my guess is it would be an aspect-oriented language, and my further guess is the UML itself could be a reasonable aspect-oriented language.” AspectJ is a compiler that supports aspect oriented programming (AOP), it has been available for Java for several years. There is no equivalent to AOP in the .NET world, some may say that .NET attributes are the same, however that is an oversimplification.

34. Model-2 Architecture

Model2 architecture promotes separation business logic and presentation logic. This leads to a more reusable and maintainable web applications. Such a concept is competely foreign to .NET.

35. Web Servers written in 100% pure Java and Open Source

Webservers like Tomcat, Jetty, Resin and Orion are written in Java unlike IIS which is written in something other than a .NET language. The benefit is that customizations and extensions are easier.

36. Microkernels and Services Frameworks

Many of the servers developed in Java are based on a JMX microkernel architecture. This means easier configurability, manageability and ultimately lower total cost of ownership (i.e. TOC), something completely absent in .NET.

37. Application Servers

Application servers help develop highly scalable implementations, the concept of an application server is missing in .NET, the equivalent however may be .NET server however its release has been delayed 3 times and its anybody’s guess when it’ll come out. Hopefully it gets released before your “Software Assurance” expires.

38. Tag Libraries

Tag Libraries are standard and safe way of encapsulating code for use by Web designers, unlike ASP.NET where it is common practice to intermingle code with HTML.

39. More Embedded Expression Languages

There are several expression languages that you can use to make programming easier. The most familar to most is support for regular expressions and support for XPath queries. However, the Java world has JXPath which supports xpath like queries across plain old java objects.

40. Pure Java Script Languages and Embedding

There are several scripting languages that are written in Java. These implementations allow you to seamlessly embed these scripting into a final product. These don’t exists in .NET because of the CLRs limitations in supporting dynamic languages. Some examples of scripting languages that have been written in Java are JavaScript, Python, DynamicJava and BeanShell.

41. More Web Service Deployments

A recent survey shows that 53.3% of webservices implementations are done on J2EE as compared to a dismal 33.7% on the .NET platform. This given the fact that .NET is supposed to be a platform designed and tuned for webservices.

42, Sophisticated Logging via Log4J

Log4J is a sophisticated logging library available for Java that has no parallel in .NET.

43. Distributed Caching

There are multiple vendors and open source projects that provide distributed caching (i.e. SpiritCache, Coherence, Gemstone, JCS, Oracle). Distributed Caching solutions are unavailable in .NET. In fact “Centralized Caching” for .NET is in one site’s wishlist.

44. More Alternative Messaging Implementations

There are more messaging implementations that are supported in Java, furthermore, they are supported by a standard API (i.e. JMS). What this means is that you can choose the best messaging product for your situation. For example, Tibco is used for high demand financial markets, iBus supports wireless environments, Sonic can bridge Mail and FTP messaging. With .NET you only have one choice, however, there are JMS vendors that can also bridge to .NET.

45. Write Stored Procedures and Embedded SQL in Java

You can write Stored Procedures in Java for Oracle, DB2 and Sybase  to name a few. Java has a standard way of embedding SQL called SQLJ, which is supported by Oracle, DB2, Sybase and Informix . In the .NET environment you write a stored procedure using TSQL, which doesn’t look anything like C# or VB.NET!

46. Better support for Lightweight Persistence

There are serveral lightweight high performance persistence libraries written for Java, some examples are NDBM, Jisp and JDataStore. This is useful when your application does not need to bundle a full fledged relational or object database. You cannot find a similar lightweight persistence library that’s written in C# or VB.NET.

47. Open Source Java Compilers and Parsers

There are several open source java compilers, many written also in java (i.e. Jikes, Eclipse, AspectJ, Kopi, Kiev) that make it easier to develop tools like Auditors, Metrics, Code Coverage and Refactoring. Furthermore, it makes is easier to develop embedded languages like SQLJ.
By contrast .NET’s CodeDOM assembly isn’t able to parse .NET languages like C# or VB. It can only generate code, however what real gain is that, when writing out strings will suffice?

48. Hardware Support

There are multiple vendors that have hardware support for Java in their microprocessors, the most notable of which is ARM which holds a commanding position in PDAs and Cell Phones. The ARM Jazelle technology provides a highly-optimized implementation of the Java Virtual Machine (JVM), speeding up execution times and providing consumers with an enriched user experience on their mobile devices. (http://www.arm.com/armtech/jazelle?OpenDocument). Other vendors include Nazomi and AJile.

49. More Licensing and Support Options

Because there are more vendors supporting Java, you have a choice of which licensing scheme fits your business model. One good example are the licensing schemes available for Application Servers. Oracle has per user licensing, IBM and BEA have per server licensing, Macromedia has a scheme to support embedding, JBOSS has a free license with support that can be licensed. In contrast, .NET Server will only be per user licensing.

50. Support for Embedded Devices

Can you develop with .NET on an embedded device like JStamp?

51. Continuous Build Frameworks

Java has several frameworks to support a countinuous build process. The frameworks manage builds, documentation, source metrics, testing, code coverage, source cross-references, email notification and more. These frameworks give teams a automated and continuously updated snapshot of the overall state of development. Examples of these frameworks are Maven, Forrest, Centipede, AntHil and Cruise Control. There are no equivalents of these frameworks in the .NET environment.

52. Open Community Process

The Java Community Process (JCP) is gives vendors, organizations and individuals a forum to contribute to Java’s future development. How does one contribute a new API to the .NET framework? Unless you’re a Microsoft employee the process isn’t available to you.

53. Faster Virtual Machines

A recent study of “Method Devirtualization and Inlining” leads to this conclusion: “The benchmark reveals clearly that the CLR lacks any devirtualization; its performance is just a little superior to HotSpot Client 1.3.1; significantly inferior to JET, and very inferior to IBM and HotSpot.”

54. No Rebooting on Upgrades

Service Pack upgrades require reboots, adding a library that’s dependent on an unmanaged DLL requires reboots. A server pack upgarde can require over 30 minutes to install. With Java an upgrade of the entire virtual machine does not require a reboot of the operating system. Furthermore, webstart has excellent facilities for managing the upgrades of the VM.

55. Multiple Pluggable Cryptographic Providers

The Java Cryptography Extension (JCE) defines a standard way of seamlessly plugging in different cryptographic services and algorithms in Java. There are multiple vendors RSA, Baltimore, Entrust, Cryptix, Phaos, BouncyCastle, Wedgetail see http://www.itworld.com/nl/java_sec/06222001/

56. Better Collection Classes

The Java Collections Frameworks is simply better than .NET.  .NET’s System.Collections namespace doesn’t even have a Set and its corresponding operators union, interesection and difference. Makes one wonder if the person who designed this has a degree in Computer Science.
Also there are also more extensions available for the Java Collections Framework. Examples are Jakarta Collections, JGL, Trove  and PCJ , many more can be found at http://www.javacollections.org.

57. More High Performance Database Drivers

There are more high performance database drivers that support the JDBC standard as compared to ADO.NET. In fact ADO.NET doesn’t have high performance drivers for DB2/Informix or Sybase, these vendors alone corner nearly half of the database market.

58. More Literature

There are more books published for Java than C# or other .NET languages. Furthermore, there are more books that cover advanced topics, most .NET languages books tend to be beginner books. There are many seminal books that are important to read by any learned developer, examples are “Concurrent Programming”, “Refactoring”, “Pattern Languages of Program Design” and “Server Component Patterns”, “Agile Software Development”, “Test Driven Development” and “Core J2EE Patterns”, these all require an understanding of Java. (note: You can support this list by purchasing any of these books via the links above, thanks!)

59. Free Tools for Checking Coding Standards

There are many free and open source tools that check coding conventions in Java. Examples are Checkstyle, PMD , JCSC and JLint.

60. Tools to Support Design By Contract

Design By Contract is a mechanism introduced by the Eiffel language to support more robust software development. There are several free tools in the Java world that support this methodology. Examples are: iContract, JMSAssert, jContractor and Jass.

61. Public API’s are Public Domain

Java Technology Restrictions. You may not modify the Java Platform Interface (“JPI”, identified as classes contained within the “java” package or any subpackages of the “java” package), by creating additional classes within the JPI or otherwise causing the addition to or modification of the classes in the JPI. In the event that you create an additional class and associated API(s) which (i) extends the functionality of the Java platform, and (ii) is exposed to third party software developers for the purpose of developing additional software which invokes such additional API, you must promptly publish broadly an accurate specification for such API for free use by all developers.

.NET doesn’t have an equivalent guarrantee.

62.More Garbage Collections Options

Generational Stop ‘n Copy
Single Spaced Concurrent
Generational Concurrent
Parallel
Concurrent Mark and Sweep
Incremental
Generational

63. More Languages for the VM

There are more languages written for the Java VM than the .NET CLR. See Languages of the Java VM (http://grunge.cs.tu-berlin.de/~tolk/vmlanguages.html) for a listing. A piece “One Runtime to Bind Them All” (http://www.javalobby.org/clr.html) exposes the myth of .NET’s common language support. Meanwhile, the number of new languages for .NET have remained stagnant since its release a year ago, in fact the only new language since then was J#.

64. Better Exception Handling

There is no analog to the throws clause in method signatures. One major side effect of this is that unless the creator of the API explicitly documents the exceptions thrown then it is not possible for the users of the API to know what exceptions to handle. Thus users of C# are reliant on the documentation skill of programmers as their primary error handling mechanism which is a less than optimal situation.
.NET also does not have Checked Exceptions, the use the Compiler to flag any unhandled exception. This is an additional mechanism that developers can use to improve the robustness of their programs.

65 Better SOAP Interoperability

Recent results from http://www.soapbuilders.org/ interoperability lab indicate lingering problems with SOAP interoperability. Several java companies Cape Clear, Systinet and TheMindElectric have made extensive effort to make their products interoperate with a large set of SOAP products. Thus with Java there is a greater likelihood of acheiving SOAP interoperability than Microsoft. In fact, Microsoft has several SOAP toolkits that astonishingly enough aren’t 100% interoperable!

66. Predictable Upgrade Cycle

The planned release schedule between major versions of the JDK is 18 months. For C# its not clear, its even murkier for the ECMA standard. For example, the next version of C# will include generics, however it changes some details of the CLI which ultimately means the ECMA standard needs to be updated. The schedule when this will happen is not clear. Even worse, based on past experience, its not clear if Microsoft will continue to support today’s technologies (i.e. VB6, DNA).

67. Better Support for Domain Specific Languages

Extensible java parser frameworks like JSE, JacO, Polyglot aid in the creation of extensions to Java to make it easier to build domain specific languages. These frameworks allow a non compiler expert to easily create new language constructs.

68. Security in Java is Proven and Peer reviewed.

Java has proven itself for many years to be an extremely secure environment, unlike Microsoft where its typical to read about viruses and security alerts on a weekly basis.
Microsoft executives have even warned that releasing the source code for Windows would reveal even more security holes. In contrast. Java has been available in source code form for the peer review for years, yet you rarely hear about java security failures.
When was the last time you heard of a Java virus. Like never. That’s because Java was designed foremost with security in mind. What good is a platform that cannot guarantee the integrity of the system and in turn acts as a petrie dish for growing and ditributing viruses? Microsoft has a rich history of platform viruses – at last count in May of 2000 there were over 52,000+ Microsoft-related platform viruses, trojan horses and other security threats. In the article, Contagion : Why Our Dependency On Microsoft Makes Us Susceptible (http://www.oreillynet.com/pub/a/network/2000/05/22/security.html), one of the foremost experts on security, Gene Spafford, lists platforms and the numbers of threats in each – Microsoft is securely in first place – probably forever. More recently one of the key centerpieces of the .Net platform, the IIS server, was sited for its repeatedly bad security – and remarkably Gartner suggested that customers examine other solutions. (http://www.theregister.co.uk/content/4/21853.html)

69. Core API Source Code Availability

The source code for the Java runtime enviroment is availabe for everyone to examine. In contrast, its a violation of the EULA agreement to decompile for study the libraries of the .NET SDK.
Knowing how a particular API does its work is vitally important in any development environment.

70. Environmentally Friendly

.NET is dependent on MDAC 2.7 and IE6. That’s even if you don’t use any of these features, particularly IE6 on a server. Expect more of these dependencies with every server pack upgrade. Java is less dependendent on the intricacies of the current service pack.

71. Better Best Practices Blueprint Application

Microsoft was recently criticized by members of the .Net community for writing “Anti-Patterns” instead of adopting best practices. Meanwhile, Java vendors spend a lot of time on educating new programmers in best practices (see this site as an example).

72. Business Rule Engine Support

Rule-based systems are designed to encode business rules explicitly and in a declarative manner. The better manageability of business rules leads to a more agile business. Java has comprehensive support for Rule-based systems through vendors like ILOG, Blaze and ATG. Furthermore, there are open source Rule-based systems written in Java, in particular you have JESS, Drools and JEOPS.

73. Run on 64-bit Platforms

Java runs 64-bit platforms today, specifically on AIX, HPUX, Sun and Linux (Itanium). .NET by contrast doesn’t even run on the Itanium based Windows Server. Expect to see Java ported first to AMD’s 64bit Opteron processors [see].

74. Millions of Java Enabled Cell Phones Today

There are 75 million java enabled phones today by contrast anyone will be hard pressed to find a wireless phone that runs .NET compact framework (There’s probably one, but I heard it has virus problems!).
There are no more than “10 mobile carriers around the world deployed Java technology enabled devices with approximately 75 million handsets worldwide running on the Java platform. In addition, there are over 80 different handset models from 19 manufacturers worldwide using the J2ME platform.” [ Numbers as of September, see source http://www.sun.com/smi/Press/sunflash/2002-09/sunflash.20020924.2.html ] . Microsoft recently suffered a big setback when one of the few implementers of Microsoft wireless smart phone solution abandoned the the Microsoft solution for Nokia/Symbian/Java. Java has rapidly become a standard part of wireless devices.

75. Garbage Collect Classes

Java classes can are garbage collected, this is controlled by allowing the ClassLoader to be garbage collected. This is a technique used for building dynamic systems.
By contrast, generated MSIL cannot be unloaded. The only way to unload code is to unload an entire application domain (that is, to unload all of your application’s code.) [see].
Furthermore, there’s no way to add dynamic scripting to an application without the ability to unload a dynamically created assembly. Loading the assembly into another AppDomain causes severe speed issues, great difficulting with respect to marshalling and memory leaks.

76. Hard RealTime Support

A recent paper by IEEE reveals the inadequacy of the .NET Framework for realtime applications. It concludes with “…the .NET platform are not currently appropriate for hard real-time systems for several reasons. It has unbounded execution of its garbage-collected environment and lacks threading constructs to adequately support schedulability and determinism, among other things. Our experiments also showed that the thread inheritance didn?t work.”
In contrast Hard RealTime support for java is well studied and standardized [http://www.rtj.org/]. Furtheremore multiple implementations are available for RTOS.

77. Multiple Complete Implementations of the Virtual Machine

With Java there are actually multiple vendor implementations of the virtual machine on the same platform. There are two reasons for this that is not present in the .NET. The first is that you can license the Java from Sun and build your own compatible implementation, IBM, Oracle and TowerJ does this. The second reason is that there’s a mechanism for writing your own JIT compiler and plugging it in to a standard JVM, BEA does this. These options are clearly not present with .NET.

78. Sane Coding Conventions

.NET Coding Conventions border on the ridiculous. For example for C# Namespaces, Class, Methods, Properties, Enums, Public Fields all have the exact same convention. That is, you could write something like this A.B.C.D.E.F.G() and you couldn’t tell where the namespace part begins and ends, whether its a static call, or whether a method is called somewhere in between. In Java the same statement is much clearer, it’ll go like this a.b.c.D.getE().f.g() . Also the weirdest thing of all is, why do method names start with caps?

79. More Comprehensive XML Support

There are more XML libaries available for Java than .NET. For example there are more kinds of parser, that is there are Pull Parsers, Event Driven (i.e.SAX) and model based parsers. There are more XML model representations (i.e. DOM, JDOM, DOM4J, EXML, XOM) these also come with a way to create customized highly effecient in memory representations. There are more extensive schema tools like validators and converters (i.e. MSV and Jing). There are XML pipeline frameworks like Cocoon. Pure XML databases like Xindice and XIS. There are XML gui frameworks like Luxor, XWT. There are XML scripting like Jelly.

80. Dynamic Distributed Systems

Support for developing dynamic distributed systems is more comprehensive in Java. Java’s RMI has no equivalent in the .NET world, RMI is able to send messages where the class itself doesn’t exist in the receiving machine. In otherwords it is able to dynamically load the class as the message is sent, extemely convenient however unavailable for .NET. Java takes this even furher with JINI by introducing dynamic discovery of services, robust distributed garbage collection and transactions. Furthermore, there are other Java based dyanamic distributed systems like OpenWings, Cougaar, FIPA Agent Systems and Grid Based systems.

81. More Flexible and Powerful 2D Drawing

Java’s 2D drawing and imaging APIs are outstandingly designed. For example, support for new Image formats can easily be added without having to modify a single class in the core API. This is not the case with .NET’s System.Drawing api. The System.Drawing api is based on a thin wrapper over GDI+ and therefore not as well designed or portable as Java2D.
The Java2D api aside from being more flexible is more powerful being able to easily support the rendering requirements of SVG (see Batik). One reason may be that a lot of the Java2D code was contributed by Adobe the leader in drawing and imaging products. There are of course SVG projects based on .NET, however until now, they haven’t yet built one that passes all the conformance tests.

82. Better Designed GUI Frameworks

Java’s two leading GUI frameworks Swing and SWT are better designed than Windows.Forms. In fact both are designed with Java in mind and designed to be portable, unlike Windows.Forms where its a thin wrapper over a native library.
Swing and SWT use the MVC pattern extensively, separating model from presentation. Windows.Form however in many cases doesn’t. Controls such as TreeView, ListBox and ComboBox don’t separate model from presentation, thus it encourages developers to store data in their UI controls.
Also Swing is more powerful than Windows.Forms. For example, border styles can be plugged into any component using the strategy design pattern. In Windows Forms, components are responsible for supplying and drawing their own borders.

83. Create More Threads in Windows

JRockit is a JIT compiler that is able to create more threads than allowed by the operating system. This is important in that is allows for more scalable servers. JRockit has the concept of thin threads that allow several threads to be simulated by a single native thread, this leads to lighterweight context switching and scheduling. .NET on the otherhand is limited by the capabilities of Windows threading.

84. Unambiguous Definition

The definition of .NET is completely ambiguous. That is, Microsoft has chosen to use the term “.NET” for almost everything it produces. I’m now eagerly waiting for Microsoft to release Mouse.NET. (more MS Dumps .NET Tag and I’m Confused… ) In practical terms, there’s no easy way for a customer to determine if a product uses the CLR or not. So you just never know if you’re buying more legacy versus upgrading to a new framework.
Also, the search term “.NET” is an extremely poor term discriminator for search engines. Searching for “.NET” in Google shows one entry for Microsoft .NET within the top 40. The implications of this is that its just harder to find information about .NET.

85. No Anti Open Source Stance

The Microsoft EULA agreement casts doubt on the legality of creating GPL software using .NET. [see see]

86. ClassLoaders

Java ClassLoaders allow bytecode analysis and manipulation, a feature absent in .NET. This runtime transformations allow for innovative interception based techniques like dynamic aspect oriented frameworks, testing frameworks and instrumentation for manageability.

87. Dynamic Proxies

Java Dynamic Proxies type safe dynamic interception of method invocations. This is extremely useful in dynamically creating remote stubs rather than using a compilation approach. JBoss uses this mechanism to allow for a more productive development environment for EJBs. Dynamic Proxies have also been used in other ways like in AOP and Design By Contract implementations. Dynamic Proxies are absent in .NET

88. More Tools To Explore The Semantic Web

RDF, TopicMap and Ontology Tools written in Java are more available to researchers than .NET. In fact, are there any RDF or TopicMap tools written in a .NET language?

89. Better Support for Emerging International XML Standards

The Jigsaw HTTP server from W3C serves as a test bed for emerging W3C standards, it is written in Java. Other W3C XML standards that have java implementations include RDF, SVG, XML Query, and XForms.
Oasis is a consortium for developing XML standards for Business, the ebXML standards are jointly sponsored by UN/CEFACT, Microsoft is conspicously absent in this standards body. Also OASIS implementations tend to be done in Java, examples are RelaxNG, BTP and Sun’s JAXM. Furthermore, many oasis standards are also becoming ISO standards, an example is RelaxNG.

90. More Easily Portable Virtual Machine

Which Virtual Machine is more easily portable to a new machine? Hints to the answers can be found looking at the progress of two open source projects. Mono [ http://www.go-mono.com ] is a project that is porting .NET to Linux systems, IK.VM.NET [ http://radio.weblogs.com/0109845 ] is a project that is porting Java to .NET.
Mono started over one and a half years ago, and has a cadre of programmers and corporate funding. IK.VM.NET by contrast was started much later and is developed by a single person. In that time span, IK.VM.NET is able to run the Eclipse IDE inside .NET, in stark contrast, Mono is unable to run even the simplest of WinForms application.
The Java Virtual Machine and Java Libraries are designed to be portable, .NET libraries are
simply not portable.

91. No Evil Type Coercion

User defined implicit conversions allow a class to define conversions from another class without requiring a explicit cast or a call to a conversion function. This construct has been the source of numerous hard to track bugs, ever since in was introduced in C++ and VB [ http://archive.devx.com/premier/mgznarch/vbpj/1995/11nov95/progtech.pdf ], that it has been nicknamed the “Evil Type Conversion”. Java took the good parts of C++ and dropped the bad, in contrast C# has reintroduced this problematic construct. To read more about its faults see http://www.geocities.com/csharpfaq/implicit.html.

92. Concurrency Utilities
Dealing with concurrency is an extremely difficult task and should be left only to the most highly skilled of developers. Doug Lea has written an extensive library of utilities that addresses the complexity of dealing with concurrency. Aslo there are other similar packages written for Java (JHPC and JThreadKit). The JCP is also in the process of developing a specification [JSR-166] that is based on ideas of Doug Lea and others.

93. Parse XML Faster

A recent observation done comparing MSXML with a java based xml vendor: “I did another benchmark for fun tonite, parsing a small (12-line) XML file using Electric XML running on CLR (compiled using J#) versus the same file using the native microsoft XML parser MSXML. surprisingly enough, Electric XML was twice as fast in all of my simple tests, whether the parsers were called from J# or C#. the contents of the file was read just once into a string, and then the string was parsed 50,000 times to generate an accurate value. Electric XML parsed the string in 0.14 milliseconds, and MSXML parsed the string in 0.28 milliseconds. not a big deal, but an interesting result. Electric XML running on a JVM parses the same string in just 0.09 milliseconds. so EXML running on a JVM is three times faster than MSXML on a CLR, at least for small files. ”

94. Mature Platform

Java has proven itself in many large deployments over the years. “.NET is at version 1.0, the C# language is still evolving and there’s not enough real world use to evaluate.” -sosnoski

95. Open Source Multicasting Libraries

Java has a wealth of open source libraries that exploint the multicast capabilities of the network. There is the JavaGroups project that has been used by JBoss to provide clustering capabilites, Spread that provides high performance multicast and group communication, Reliable Multicast, Proactive that provides a comprehensive library for parallel, distributed and concurrent programming and Java Rendezvous that implements Apple’s Rendezvous [ftp://ftp.strangeberry.com/pub] dynamic IP protocol. A google search for “java multicast” reveals 116,000 entries, a search for “c# multicast” reveals 2,850 entries. I now wonder if there are any multicasting libraries for C#.

96. Ant

Ant started life as the build tool to replace Make. It is now used for tasks other than its original purpose, its used for running automated tests, building documentation, creating installations, configuration, execution of programs and more[http://ant.apache.org/manual/tasksoverview.html]. It also serves as the core of many continuous integration frameworks.
However, isn’t there a clone called NAnt for .NET? No, claiming that NAnt is a clone ignores that hundreds of extensions that have already been written for Ant. A look at NAnt task list shows 32 tasks. In contrast there are 72 core ant tasks, 52 optional tasks [http://nant.sourceforge.net/help/tasks/index.html], there are also http://ant.apache.org/external.html 38 tasks built by other parties.
What this means as a developer is that its much easier to find an Ant ant task to fit your special situation and this means you don’t have to code it yourself. Of course that means more time for the important tasks at hand, and therefore better productivity.

97. JUnit

JUnit is a unit testing framework that serves as one of the cornerstones of agile and test-driven development.
The rebuttal again by the .NET community is going to be the same, isn’t NUnit available? Again, the answer is No. That’s again because the number of extensions [http://www.junit.org/news/extension/index.htm] for JUnit dwarfs what’s available for NUnit. The multiple extensions available for JUnit cover the different complexities in which software is deployed. For example there are extensions for GUI development, Web development, App server development, XML development, Small Device development. Furthermore, there are extension on different ways to perform testing like Mock Objects, Integration Testing and Load Testing, NAnt in contrast only gives you basic JUnit. In summary, if you want to use JUnit in anger, that is testing vigorously and comprehensively, then the tool of choice is obviously JUnit and its extensions.

98. Refactoring

Refactoring, another cornerstone of agile development. For the .NET audience who don’t understand what this means, get a primer at http://www.refactoring.com/ . Anyway, the refactoring support that’s available for Java is heads and shoulders above anything available to the .NET community. Some may argue that .NET has refactoring support, coming from some small company, well my retort is this, “have you ever tried it?”
What should one look for when evaluating a refactoring tool. For starters, it helps that it has a comprehensive list of refactorings, second it helps to know that the refactorings are not constrained, third how robust (i.e. correct) are the refactorings , and finally how easily can you revert from changes. Take a look now at IntelliJ or Eclipse evaluate them with the criteria above, now go take a look at what’s available in .NET. Come back when you’ve discovered the truth.

99. Better CVS Support

CVS, for the .NET audience that means Concurrent Versions System, not the pharmacy! Anyway, CVS is used throughout the open source world to version control software artifacts, CVS repositories are readily available on the public internet. I’m not going to debate if CVS is better than X, however I’m going to say that it’s affordable and allows for world wide collaboration.
Ant supports CVS, unlike NAnt, furthermore the Eclipse IDE is arguably the best client ever designed for working with CVS.
100. Eclipse Momentum
Eclipse, the open source IDE framework. Yes, it is the 100th entry. Why? I can go on trying to convince you that its the best thing invented since sliced bread, but I don’t think I could convince you.
However, what’s is strikingly clear and obvious is the momentum that it has generated. C# people keep claiming that C# has “momentum”, however if you want to see real “momentum” (actually velocity, more on this later) you have to see what’s happening at the grass roots level for the Eclipse community. To get a good graphic picture of what’s happening, go to sourceforge and search for “Eclipse”. You’ll find over 50 active projects building Eclipse plugins, there are even more not listed at sourceforge, you can find them here [http://eclipse-plugins.2y.net/eclipse/index.jsp]. No do the same for VS.NET, scower the web using the word “Addin” (that’s the VS.NET equivalent term), find anything? I guess not much right?
Consider then this, Eclipse 2.0 was released in June last year, when was VS.NET 1.0 released? People argue that this list isn’t fair because Java is older and therefore would have more support. Now, you have the argument the otherway, VS.NET 1.0 is older than Eclipse 2.0, so shouldn’t that mean it should have more support?

LnF: Java Look And Feel

1. Quaqua Look And Feel
By: Werner Randelshofer
License: Commercial
URL: http://www.randelshofer.ch/quaqua/download.html
Description: The Quaqua Look and Feel is an extension for Apple’s Java implementation of the Aqua Human Interface Guidelines.
2. 3D Look and Feel
By: Markus Hillenbrand
License: GNU General Public License
URL: http://www.markus-hillenbrand.de/3dlf/index.html
Description: 3D Look and Feel is a look and feel for the Java 2 Platform.
3. FH Look And Feel
By: Stefan Harsan Farr
License: GPL
URL: http://www.geocities.com/shfarr/
Description: Just a few words about the possibilities of this laf, however you’ll need to download it to see how it really works:
4. GTK/Swing Look And Feel
By: gtkswing.sourceforge.net/
License: OpenSource
URL: http://gtkswing.sourceforge.net/
Description: GTK/Swing is a pluggable look and feel (PLAF) for the Java Swing library. It tries to imitate as closely as possible the default theme of GTK+.
5. HippoLF
By: Robert Karlsson
License: Freeware
URL: http://www.javootoo.com/
Description: HippoLF is a free Java Swing Pluggable Look and Feel. The purpose of HippoLF is to provide all Swing GUI developers with a clean and simple yet professional look for java applications. Note that HippoLF is still in version 0.7, which means that many components lack full support and it has not yet been sufficiently tested. Please read the license carefully, before using HippoLF! The license is shipped with the package. HippoLF is developed using Java2 v1.4.
6. JGoodies Looks
By: JGoodies
License: Free Libraries
URL: http://www.jgoodies.com/freeware/looksdemo/index.html
Description: The JGoodies Looks Demo lets you compare the JGoodies Looks with the default implementations. It helps you get aquainted with the technical aspects of the looks and let you try optional settings that have been introduced by the JGoodies Looks.
7. Liquid Look and Feel
By: mikeai@sezampro.yu?subject=LiquidLnF
License: XPLookAndFeel
URL: http://liquidlnf.sourceforge.net/
Description: This is a new look and feel for Java GUI applications based on Swing. It is based on Mosfet’s Liquid 0.9.6-pre4 theme for KDE 3.x. I want to thanks to Daniel for this great widget theme.
8. Metouia look and feel
By: Taoufik Romdhane.
License: LGPL
URL: http://mlf.sourceforge.net/
Description: Metouia look and feel (mlf) is a pluggable look and feel for Java Swing applications and applets (for newbies, it’s something like a skin that changes the look of your application).
9. Napkin Look and Feel
By: napkinlaf.sourceforge.net/
License: OpenSource
URL: http://napkinlaf.sourceforge.net/
Description: The Napkin Look and Feel is a pluggable Java look and feel that looks like it was scrawled on a napkin. You can use it to make provisional work actually look provisonal, or just for fun.
10. Oyoaha lookandfeel
By: oyoaha
License: an apache-like license
URL: http://www.oyoaha.com/lookandfeel/
Description: oyoaha LookAndFeel introduces innovative new features: a theme enabled LAF with animations, transparency, sounds and more !
11. Skin Look And Feel
By: http://www.javootoo.com/ and l2fprod.com
License: OpenSource
URL: http://www.l2fprod.com/
Description: Now with Skin Look And Feel,YOUR Javaapplication is skinnable ! Skin Look And Feel is able to read GTK (The Gimp ToolKit) and KDE(The K Desktop Environment) Skins to enhance your application GUI controlssuch as Buttons, Checks, Radios, Scrollbars, Progress Bar, Lists, Tables,Internal Frames, Colors, Background Textures, Regular Windows. More than 500 LAFs in one !
12. SmoothMetal
By: http://www.javootoo.com/
License: OpenSource
URL: http://www.javootoo.com/
Description: SmoothMetal is a wrapper for some of Sun’s Java Look and Feels to enable anti-aliasing. Anti-aliasing is the process of smoothing text and images by introducing intermediary colours to fool the eye into believing that the resolution is somewhat higher than it is. Thus a black character on a white background is ‘smoothed’ with shades of grey. You can see this in Windows XP when using ClearType, or enable it in X11 using Xft. MacOS X and RISCOS users get it for free.
13. Squareness Look And Feel
By: Robert F. Beeger
License: OpenSource
URL: http://squareness.sourceforge.net/
Description: It’s a minimalistic flat look and feel with bright colors that are easy on the eyes. It’s part of the Squareness skin suite. The suite provides skins for Windowblinds, Java, Firebird. It aims to deliver a consistent look and feel across all your applications. It is licensed under the Academic Free License 2.0, which guarantees that it can be used in commercial applications.
14. TinyLaF
By: zuletzt geandert
License: OpenSource
URL: http://www.muntjak.de/hans/java/tinylaf/tinylaf-beta-1.2.1.zip
Description: TinyLaF can look like Windows 98 or like Windows XP. With the assistance of the control panel, the user can define the component’s colors and behaviour.

Formula One-Java 5.0

Formula One-Java 5.0
Other
Tidestone Technologies, Inc.
27 Jan 1999
49448
Tested and Approved with the following Novell products:
NetWare 5 NetWare 5
Product Description
Formula One(tm) for Java® from Tidestone Technologies, Inc. ™, is a 100% Pure Java standalone spreadsheet application that can also be used as a JavaBean by Java developers and an applet by Webmasters. Formula One for Java is ideal for use on a server or a client and includes several robust, cross-platform features including JDBC connectivity methods, the ability to write spreadsheets to HTML, fast calculations, a built-in workbook designer, and read/write compatibility with Microsoft Excel files including Excel-style formula syntax. Formula One for Java supports more than 400 properties, methods, and events and is ideal for Web-based, server-side, or client-side applications.
Minimum Hardware Requirements
Required Hard Drive Space 570 KB
Product File Specifications
Java JAR File(s):
File Name Size Date
F1JDesign.jar 577990 bytes 04-Aug-1998
Tested Client Configuration
Client Operating System(s): Novell JVM 1.1.5
Client Language Type Java
Market Classification Business Applications
The term Tested and Approved applies only to the exact configuration documented in this bulletin. For more information regarding the specific test configuration, please contact:
Tidestone Technologies, Inc.
12980 Metcalf
Overland Park, KS, 66213
Voice: 913.851.2200
Fax: 913.851.1390
Website: http://www.tidestone.com

JAVA LOOK AND FEEL(LnF): ALLOY

Image

http://www.incors.com/alloylnf/jws/alloyDemo.jnlp

Frequently Asked Questions

What is the Alloy Look and Feel?

The Alloy Look and Feel is a software component that can be used by professional Java™ developers to enhance the appearance and atmosphere of their Java™ Swing applications.

Who was the Alloy Look and Feel developed for?

The Alloy Look and Feel was developed for professional Java™ developers who want to add value to their Swing applications by enhancing the application’s appearance and atmosphere.

What are the requirements for running the Alloy Look and Feel?

The Alloy Look and Feel has been tested with the following JDKs:

  • Sun’s JDK 1.3, 1.3.1, 1.4, 1.4.1, and 1.4.2
  • IBM’s JDK 1.3.1
  • Apple’s JDK 1.3.1

It has been tested on Solaris, Windows XP/NT/2000/98, Linux, and Mac OSX.

How difficult is it to use the Alloy Look and Feel with my Swing application?

Using the Alloy Look and Feel with a Swing application is extremely simple.

First you have to make sure that the file alloy.jar is located in the class path of your application. If this is not the case, the application will not be able to find the file.

Then add the following lines to your code:

com.incors.plaf.alloy.AlloyLookAndFeel.setProperty("alloy.licenseCode", "yourLicenseCode");
try {
  javax.swing.LookAndFeel alloyLnF = new com.incors.plaf.alloy.AlloyLookAndFeel();
  javax.swing.UIManager.setLookAndFeel(alloyLnF);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
  // You may handle the exception here
}

It is possible to set the Alloy Look and Feel as the default look and feel for all Swing applications?

Yes, this is possible. The documentation that comes with the Alloy Look and Feel explains how to do it.

Will there be scrollable tabs in future?

We are planning to implement this feature in one of the next releases, maybe in version 1.5.

Since the Alloy Look and Feel is commercial, will the licence for the Kunststoff Look&Feel also be changed to a commercial license?

No. The Kunststoff Look&Feel will always be free for commercial and non-commercial use.

When I start my application a dialog window pops up saying “No license file found”. What is the reason?

If this happens, the license code was not set properly (and the Alloy Look and Feel could not find the file alloylnf.lic (for older versions)). Make sure that to set the license code (or to locate the file alloy.lic in the application’s class path (for older versions)) to solve the problem.

When I start my application a dialog window pops up saying “License not valid”. What is the reason?

This can have two reasons:
A. You are using a demo license that is not valid anymore. In this case you will have to purchase a license in order to continue using the Alloy Look and Feel with your application.
B. You are using an invalid license code.

Is it possible to create custom themes for the Alloy Look and Feel?

Yes. Since version 1.2 you can create themes using custom colors. Please refer to the documentation for details.

I have problems using the Alloy Look and Feel with my Java™ WebStart application. Running the application without Java™ WebStart works fine. What can I do?

Please refer to the section about Java™ WebStart for details about using the Alloy Look and Feel with Java™ WebStart applications.

How can I switch on the outer frame decorations with my application?

The chapter about frame decorations in the documentation explains how you can use look and feel frame decorations. But please note that this feature only works with JRE/JDK versions 1.4 and higher.

LOG4J: Example

import com.foo.Bar;

 // Import log4j classes.
 import org.apache.log4j.Logger;
 import org.apache.log4j.BasicConfigurator;

 public class MyApp {

   // Define a static logger variable so that it references the
   // Logger instance named "MyApp".
   static Logger logger = Logger.getLogger(MyApp.class);

   public static void main(String[] args) {

     // Set up a simple configuration that logs on the console.
     BasicConfigurator.configure();

     logger.info("Entering application.");
     Bar bar = new Bar();
     bar.doIt();
     logger.info("Exiting application.");
   }
 }


MyApp begins by importing log4j related classes. It then defines a static logger variable with the name MyApp which happens to be the fully qualified name of the class.

MyApp uses the Bar class defined in the package com.foo.

 package com.foo;
 import org.apache.log4j.Logger;

 public class Bar {
   static Logger logger = Logger.getLogger(Bar.class);

   public void doIt() {
     logger.debug("Did it again!");
   }
 }

The invocation of the BasicConfigurator.configure method creates a rather simple log4j setup. This method is hardwired to add to the root logger a ConsoleAppender. The output will be formatted using a PatternLayout set to the pattern “%-4r [%t] %-5p %c %x – %m%n”.

Note that by default, the root logger is assigned to Level.DEBUG.

The output of MyApp is:

0 [main] INFO MyApp – Entering application. 36 [main] DEBUG com.foo.Bar – Did it again! 51 [main] INFO MyApp – Exiting application.

The figure below depicts the object diagram of MyApp after just having called the BasicConfigurator.configure method.

Link: http://logging.apache.org/log4j/1.2/manual.html