It bugged me (ChristianRamseyer aka. rc@networkz.ch) that there was no Java candidate for the ShortestWikiContest. So, although it was clear that most of the other languages would beat java hands down, I invested an hour or two to come up with a 16 lines, 1212 bytes platform-independent JSP Wiki.
WjKj lives at http://www.networkz.ch/wjkj [broken link]
While writing the code, it came to my mind that there must be some Ents (the "Shepherds of the Trees" from "Lord of the Rings") sitting in the Java design team. It takes really really long to say something in JavaLanguage compared to PerlLanguage. Here's an example:
File f=new File(c+p);
if (!f.exists())
f.createNewFile();
Data''''''Output''''''Stream o=new Data''''''Output''''''Stream(new File''''''Output''''''Stream(f));
vs.
open F,">$&";
''Like data compression, one encoding may express some things in a compact way, but it will have to express other things in a more verbose way to make up for it. Perl is tuned for "compressing" text manipulation, but it will be bad at compressing some other things. And of course, the Java version is easy to read for someone who doesn't know Java. To someone who doesn't know Perl, you may as well have run the Java version through a zip algorithm. -- MichaelSparks''
----
This source is from http://web.archive.org/web/20050502223553/www.networkz.ch/wjkj/ -- MarkusSrank
*compacted "competition" version:
<%@page import="java.io.*,java.util.regex.*"%>