RSS feed [root] /weblog /java




login:

password:

title search:




 


Wed Jun 23 23:53:07 AEST 2021

java



(google search) (amazon search)
second
download zip of files only

Wed Nov 22 22:38:38 AEDT 2006 From /weblog/java/concurrency

K-mean


An article introducing using K-mean algorithm in Java - http://www.javaworld.com/javaworld/jw-11-2006/jw-1121-thread.html

(google search) (amazon search)


Sun Nov 12 02:43:25 AEDT 2006 From /weblog/java/discussion

complaint


Some interesting points, but I guess this guy will improve his productivity after familiar with java environment? - http://developers.slashdot.org[..]tsort=0&tid=156&mode=thread&cid=13845934

(google search) (amazon search)


Sat Nov 11 21:03:05 AEDT 2006 From /weblog/java/hacks

bitwise operation on boolean


bitwise operation on boolean

The solution to the puzzle is given in the Java Language Specification, chapter 15.22.2:
15.22.2 Boolean Logical Operators &, ^, and |
When both operands of a &, ^, or | operator are of type boolean, then the type of the bitwise operator expression is boolean.
For &, the result value is true if both operand values are true; otherwise, the result is false.
For ^, the result value is true if the operand values are different; otherwise, the result is false.
For |, the result value is false if both operand values are false; otherwise, the result is true.

http://beust.com/weblog/archives/000350.html

Someone mentioned that there is no boolean, byte and short in byte code level, all just integer
http://oddjava.com/?q=node/8

(google search) (amazon search)


Tue Nov 07 16:11:24 AEDT 2006 From /weblog/java/hacks

security


Prevent System.exit() being call - http://jroller.com/page/ethdsy?entry=disabling_system_exit Usually security manager forbid it

(google search) (amazon search)


Tue Oct 31 20:16:31 AEDT 2006 From /weblog/java/network

low level tomcat io


If you really stick to tomcat, then it might be useful for you http://www.webweavertech.com/costin/archives/000421.html

(google search) (amazon search)


Fri Oct 20 18:17:39 AEST 2006 From /weblog/java/annotation

transforming


An idea to transform annotation at runtime - http://beust.com/weblog/archives/000418.html

(google search) (amazon search)


Fri Oct 20 18:00:52 AEST 2006 From /weblog/java/swing

drag and drop


How to be done at SWT - http://alan.blog-city.com/swt_dragndrop.htm

(google search) (amazon search)


Thu Oct 12 20:20:38 AEST 2006 From /weblog/java/performance

web


Improving performance in distributed Web applications

* Keep the session minimal - generally a bad idea to store shared objects in the session.
* Don't bypass setAttribute - if you just call getAttribute() to retrieve the Vector and then add something to it without then calling setAttribute again, the container might not realize that Vector has been changed.
* Use fine-grained session attributes - finer-grained objects in the session rather than one big monolithic object.
* Invalidate when done - call HttpSession.invalidate()
* Keep the session clean - remove reference to unuse thing to help GC

http://www-106.ibm.com/developerworks/library/j-jtp07294.html

(google search) (amazon search)


Thu Oct 12 19:08:54 AEST 2006 From /weblog/java/network

post at java code



Optimizing HTTP downloads in Java through conditional GET and compressed streams

http://www.oreillynet.com/pub/wlg/5216

HTTP POST -

URL url = new URL(BASE_URL);
URLConnection con = url.openConnection();
// inform the connection that we will send output and accept input
con.setDoInput(true);
con.setDoOutput(true);

// Don't use a cached version of URL connection.
con.setUseCaches (false);
con.setDefaultUseCaches (false);
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
// define a new PrintWriter on the output stream
PrintWriter outWriter = new PrintWriter(con.getOutputStream());

// send data to the servlet
outWriter.print("htmlText="+inputHtml);
outWriter.close();

InputStream input = con.getInputStream();

http://technology.amis.nl/blog/?p=1107
http://www.marcellosendos.ch/booking/documentation/chapter2.html

(google search) (amazon search)


Thu Oct 12 17:29:34 AEST 2006 From /weblog/java/concurrency

Future


An example of using Future API which availabe upon 1.5 JVM

http://www.alittlemadness.com/?p=32

The other example, make a method timeout and interrupt for sure

http://mrfeinberg.com/blog/archives/000016.html

(google search) (amazon search)


Wed Aug 09 02:59:46 AEST 2006 From /weblog/java/concurrency

hardware


There may be more issue rise at concurrency code, althrough I don't know why JVM can't/shouldn't take care all hardward change...

http://www.theserverside.com[..]d_id=41602&asrc=EM_NNL_430426&uid=703565

(google search) (amazon search)


Thu Aug 03 13:16:24 AEST 2006 From /weblog/java/j2me

benchmark


A list of j2me benchmark tools

http://blog.landspurg.net[..]small-guideto-j2me-benchmarktest-midlets

(google search) (amazon search)


Tue Jul 25 21:50:13 AEST 2006 From /weblog/java/network

Setting user agents


http://jawe.net/2006/07/23/setting-the-http-user-agent-in-java/

(google search) (amazon search)


Wed Jul 12 18:09:26 AEST 2006 From /weblog/java/hacks

Cracking class files


No sure if that still valid, but look like encrypt class file don't help on protecting class.

http://www.javaworld.com[..]ld/javaqa/2003-05/01-qa-0509-jcrypt.html

(google search) (amazon search)


Fri Jul 07 16:17:14 AEST 2006 From /weblog/java/libraries

usb


An article introducing various APIs of using java to access USB device

http://today.java.net/lpt/a/303

(google search) (amazon search)


Thu Jul 06 18:23:59 AEST 2006 From /weblog/java/libraries/ant

Problems


An nice articles about various issue of ant: http://jroller.com/page/rreyelts?entry=why_i_hate_ant involving ant with various scripting frontend of java may be a nice solution? http://www.google.com[..]&hs=f13&hl=en&lr=&client=opera&rls=zh-tw

(google search) (amazon search)


Mon Jun 26 16:32:59 AEST 2006 From /weblog/java/hacks

trick for java 5


New look of resultset, WebRowSet, http://www.onjava.com/lpt/a/6633 , but I personally don't think this is something useful

Some information how using jmxagent: http://weblogs.java.net[..]nus/archive/2006/06/going_beyond_jd.html

Just come across a nice article that discuss about various new features of 1.5 and provide tips on how to use them: http://java.sys-con.com/read/171487_p.htm

Create collection quick

List programmingLanguages = CollectionUtils.newList("Java", "C++", "Ruby");

Or this:

Map langs = new HashMap(3) {{
put("Java", "Wicked");
put("C++", "Ok");
put("Ruby", "Interesting");
}};

http://www.theserverside.com/blogs/thread.tss?thread_id=37839

(google search) (amazon search)


Fri Jun 16 23:36:39 AEST 2006 From /weblog/java/features

scripting support



A pretty clever way to work with database and xml with groovy and springs

http://jroller.com/page/Solomon?entry=spring_2_0_and_groovydaos

(google search) (amazon search)


Sat Jun 03 18:27:54 AEST 2006 From /weblog/java/features

javaone slides


http://agilejava.com/blog/?p=40

(google search) (amazon search)


Fri Jun 02 01:03:02 AEST 2006 From /weblog/java/features

javabean


Is it have to support so much? Not sure for me...

http://weblogs.java.net[..]air/archive/2006/05/the_unknown_jav.html

(google search) (amazon search)


Mon May 29 13:58:43 AEST 2006 From /weblog/java/discussion

comment of final


I personally like to declare everything in final and immulatable so that it give me feel it more safe (e.g.: variable won't be replace with other value unexpected; method won't be override unexpected). The following is some discussion, see if you interested.

http://tundra-programming.blogspot.com[..]/2005/06/how-often-do-you-use-final.html
http://bordet.blogspot.com[..]rd-particular-in-javautilconcurrent.html

Here is a few update that against using final, mainly against using final class but not final method and variable:
http://blogs.objectmentor.com[..].MichaelFeathers.ItsTimeToDeprecateFinal
http://www.cincomsmalltalk.com[..]gView?showComments=true&entry=3325667363
http://www.artima.com/forums/flat.jsp?forum=106&thread=161019

And here is some support using final: http://www.churchillobjects.com/c/11027d.html
Prevent security and memory leak in rare case: http://futuretask.blogspot.com[..]a-tip-10-constructor-exceptions-are.html

(google search) (amazon search)


Mon May 22 18:33:35 AEST 2006 From /weblog/java/fundamental

Initialization


In short, only call private methods from a constructor.

http://penberg.blogspot.com[..]005/05/calling-abstract-method-from.html

(google search) (amazon search)


Fri May 19 16:41:12 AEST 2006 From /weblog/java/discussion

speed of sun


http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4097272
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058

Also, top 25 bugs seem always the same? http://bugs.sun.com/bugdatabase/top25_bugs.do

Here is one nice blog about opensource java, see if anyone agree his position: http://software.ericsink.com/entries/Open_Source_Java.html

(google search) (amazon search)


Tue May 16 17:30:58 AEST 2006 From /weblog/java/hacks

equals() at proxy generated instance


At least need to test on the interface level. And more complicate if you don't want to expose the internal structure to interface

http://www.javaspecialists.co.za/archive/newsletter.do?issue=126

(google search) (amazon search)


Tue May 16 13:47:04 AEST 2006 From /weblog/java/deploy

Hard to upgrade


See the problem when updating JDK: http://nairanand.blogspot.com[..]/05/google-desktop-and-java-install.html

(google search) (amazon search)