<?xml version="1.0" encoding="utf-8"?>
<!-- 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
-->
<?xml-stylesheet type="text/xsl" href="https://www.sunnychan.hk/blog/roller-ui/styles/rss.xsl" media="screen"?><rss version="2.0" 
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
  <title>Sunny Chan blogs</title>
  <link>https://www.sunnychan.hk/blog/sunny/</link>
      <atom:link rel="self" type="application/rss+xml" href="https://www.sunnychan.hk/blog/sunny/feed/entries/rss?cat=Java" />
    <description>Can you see the Logic in my Madness?</description>
  <language>en-us</language>
  <copyright>Copyright 2023</copyright>
  <lastBuildDate>Tue, 28 Feb 2023 19:38:26 +0000</lastBuildDate>
  <generator>Apache Roller 6.0.1</generator>
        <item>
    <guid isPermaLink="true">https://www.sunnychan.hk/blog/sunny/entry/my-java-story-and-my</guid>
    <title>My Java story and my latest spat with a famous blogger in HK</title>
    <dc:creator>Sunny Chan</dc:creator>
    <link>https://www.sunnychan.hk/blog/sunny/entry/my-java-story-and-my</link>
        <pubDate>Fri, 2 Jun 2017 00:08:35 +0000</pubDate>
    <category>Java</category>
            <description>
&lt;p&gt;&lt;p&gt;I end up being Mr. Java pretty much by luck - I was in my third year and I was looking for an internship, which is a requirement for my degree. I was pretty late and got rejected in quite a few places until certain manager from IBM come and interview me for a role. The certain lab in IBM actually made quite a few products and I end up working in the Java Technology Center, and my intern project was to port the JVM to Linux/IA-64 (well no one knows it end up being the biggest white elephant of Intel history). And the rest is history.&lt;/p&gt;&lt;br/&gt;
  &lt;p&gt;My whole career was built on Java, and it has brought me the opportunity to work on pretty impressive projects and interesting work. Java feels like my kid and it is like a proud parent seeing that child growing up and used everywhere as it does.&lt;/p&gt;&lt;br/&gt;
  &lt;p&gt;I understand Java is not as &amp;quot;cool&amp;quot; as it used to be, but I believed in the technology and I know what it can and it cannot do.&amp;nbsp;&lt;/p&gt;&lt;br/&gt;
  &lt;p&gt;Recently, a leaked memo from Hong Kong has suggested that certain components with the new Air Traffic Control system requires reboot every time the heap is at 2.5G. A number of &amp;quot;high profile&amp;quot;(?) IT(?) blogger posted a couple of piece spreading FUD against Java. Java has its problems and if you &amp;quot;hate&amp;quot; it for the right reason backed by evidence, I would more than happy to accept the opinion. However, the blogger decided for no valid reason in his post he accused Java not being suitable for anything serious. I am not going to let that pass.&lt;/p&gt;&lt;br/&gt;
  &lt;p&gt;Now that blogger has accused those who criticized him spreading FUD against Java being a lefty, and they are helping the government to turn an blind eye in the bad governance/project management of the new ATC roll out. Let me be cleared - you are a respected blogger and with a lot of readers who might not know Java. By reading the FUD in the article you are affecting my career and my life work and I will come out fighting against anyone who spread FUD against Java.&lt;/p&gt;&lt;br/&gt;
  &lt;p&gt;Anyway, I have published my rebuttal to his article in other channel so I am not going to re-post it. If he is believe he is right feel to come and have a conversation with me in &lt;a href=&quot;https://www.meetup.com/Codeaholics/events/240048431/&quot;&gt;June Codeaholics meeting&lt;/a&gt; about Java, instead of blocking me on the Facebook.&amp;nbsp;&lt;/p&gt;&lt;/p&gt;

</description>          </item>
    <item>
    <guid isPermaLink="true">https://www.sunnychan.hk/blog/sunny/entry/centos_docker_images_for_building</guid>
    <title>Centos Docker images for building OpenJDK</title>
    <dc:creator>Sunny Chan</dc:creator>
    <link>https://www.sunnychan.hk/blog/sunny/entry/centos_docker_images_for_building</link>
        <pubDate>Sat, 1 Nov 2014 13:43:12 +0000</pubDate>
    <category>Java</category>
            <description>
&lt;p&gt;&lt;p&gt;I am going to lead an &lt;a href=&quot;http://www.meetup.com/taiwanjug/events/207281402/&quot;&gt;OpenJDK hackathon&lt;/a&gt; in Taiwan later this month and I am trying to create an VM image so that people can get up and running quickly. Then last couple of weeks I came across Docker, which is a very simple container which allows easy deployment of images to your machine. So I have decided to try and see whether I can create some docker images for Hackathon use. Here is what I have come up with:&lt;/p&gt; &lt;br/&gt;
  &lt;p&gt;https://registry.hub.docker.com/u/sunnythepooh/openjdk-build&lt;/p&gt; &lt;br/&gt;
  &lt;p&gt;There are two images, one build with Centos 6 base image and one with Centos 7. Out of the container there are all the dependency you need to build OpenJDK 9, and an openjdk user. Once you pull the image down, you can login as openjdk and use mercurial to download openjdk and build straight away.&lt;/p&gt; &lt;br/&gt;
  &lt;p&gt;For Linux, you can install docker directly on any modern distribution. On Windows/MacOS you can use &lt;a href=&quot;http://boot2docker.io/&quot;&gt;Boot2docker&lt;/a&gt;&amp;nbsp;which would give you a very small Linux VM which you can run docker command from and you can take a look at the following command sequence to compile a OpenJDK 9 build:&lt;/p&gt; &lt;br/&gt;
  &lt;pre&gt;[schan@sandybridge ~]$ sudo docker run -t -i sunnythepooh/openjdk-build:centos6 /bin/bash&lt;br/&gt;
bash-4.2# login openjdk&lt;br/&gt;
Password:&lt;br/&gt;
Last login: Fri Oct 31 05:02:55 on pts/1&lt;br/&gt;
-bash: cannot set terminal process group (-1): Inappropriate ioctl for device&lt;br/&gt;
-bash: no job control in this shell&lt;br/&gt;
[openjdk@e583ed8a4e04 ~]$ hg clone http://hg.openjdk.java.net/jdk9/dev jdk9&lt;br/&gt;
requesting all changes&lt;br/&gt;
adding changesets&lt;br/&gt;
adding manifests&lt;br/&gt;
adding file changes&lt;br/&gt;
added 1213 changesets with 1750 changes to 151 files&lt;br/&gt;
updating to branch default&lt;br/&gt;
93 files updated, 0 files merged, 0 files removed, 0 files unresolved&lt;br/&gt;
[openjdk@e583ed8a4e04 ~]$ cd jdk9&lt;br/&gt;
[openjdk@e583ed8a4e04 jdk9]$ ls&lt;br/&gt;
ASSEMBLY_EXCEPTION  Makefile  README-builds.html  common     get_source.sh  modules.xml&lt;br/&gt;
LICENSE             README    THIRD_PARTY_README  configure  make           test&lt;br/&gt;
[openjdk@e583ed8a4e04 jdk9]$ bash get_source.sh&lt;br/&gt;
WARNING: Mercurial version 2.6.3 or later is recommended. /bin/hg is version 2.6.2&lt;br/&gt;
# Repositories:  corba jaxp jaxws langtools jdk hotspot nashorn&lt;br/&gt;
                corba:   hg clone http://hg.openjdk.java.net/jdk9/dev/corba corba&lt;br/&gt;
                 jaxp:   hg clone http://hg.openjdk.java.net/jdk9/dev/jaxp jaxp&lt;br/&gt;
                corba:   requesting all changes&lt;br/&gt;
.............................................................................cut for brevity..........................................................................&lt;br/&gt;
              nashorn:   searching for changes&lt;br/&gt;
              nashorn:   no changes found&lt;br/&gt;
                  jdk:   searching for changes&lt;br/&gt;
                  jdk:   no changes found&lt;br/&gt;
                jaxws:   searching for changes&lt;br/&gt;
                jaxws:   no changes found&lt;br/&gt;
                 jaxp:   searching for changes&lt;br/&gt;
                 jaxp:   no changes found&lt;br/&gt;
                    .:   searching for changes&lt;br/&gt;
              hotspot:   searching for changes&lt;br/&gt;
                    .:   no changes found&lt;br/&gt;
              hotspot:   no changes found&lt;br/&gt;
                corba:   searching for changes&lt;br/&gt;
                corba:   no changes found&lt;br/&gt;
            langtools:   searching for changes&lt;br/&gt;
            langtools:   no changes found&lt;br/&gt;
[openjdk@e583ed8a4e04 jdk9]$ bash ./configure&lt;br/&gt;
Running generated-configure.sh&lt;br/&gt;
configure: Configuration created at Sat Nov  1 05:15:04 GMT 2014.&lt;br/&gt;
configure: configure script generated at timestamp 1414663067.&lt;br/&gt;
checking for basename... /bin/basename&lt;br/&gt;
checking for bash... /bin/bash&lt;br/&gt;
checking for cat... /bin/cat&lt;br/&gt;
checking for chmod... /bin/chmod&lt;br/&gt;
checking for cmp... /bin/cmp&lt;br/&gt;
checking for comm... /bin/comm&lt;br/&gt;
checking for cp... /bin/cp&lt;br/&gt;
checking for cut... /bin/cut&lt;br/&gt;
checking for date... /bin/date&lt;br/&gt;
.............................................................................cut for brevity..........................................................................&lt;br/&gt;
====================================================&lt;br/&gt;
A new configuration has been successfully created in&lt;br/&gt;
 /home/openjdk/jdk9/build/linux-x86_64-normal-server-release&lt;br/&gt;
using default settings.&lt;/p&gt;


&lt;p&gt;Configuration summary:&lt;br/&gt;
* Debug level:    release&lt;br/&gt;
* HS debug level: product&lt;br/&gt;
* JDK variant:    normal&lt;br/&gt;
* JVM variants:   server&lt;br/&gt;
* OpenJDK target: OS: linux, CPU architecture: x86, address length: 64&lt;/p&gt;


&lt;p&gt;Tools summary:&lt;br/&gt;
* Boot JDK:       openjdk version &quot;1.8.0-internal&quot; OpenJDK Runtime Environment (build 1.8.0-internal-openjdk_2014_10_31_05_05-b00) OpenJDK 64-Bit Server VM (build 25.20-b23, mixed mode)  (at /usr/local/jvm/openjdk-1.8.0-internal)&lt;br/&gt;
* Toolchain:      gcc (GNU Compiler Collection)&lt;br/&gt;
* C Compiler:     Version 4.8.2 (at /bin/gcc)&lt;br/&gt;
* C++ Compiler:   Version 4.8.2 (at /bin/g++)&lt;/p&gt;


&lt;p&gt;Build performance summary:&lt;br/&gt;
* Cores to use:   7&lt;br/&gt;
* Memory limit:   11753 MB&lt;/p&gt;


&lt;p&gt;WARNING: Your build output directory is not on a local disk.&lt;br/&gt;
This will severely degrade build performance!&lt;br/&gt;
It is recommended that you create an output directory on a local disk,&lt;br/&gt;
and run the configure script again from that directory.&lt;br/&gt;
[openjdk@e583ed8a4e04 jdk9]$ make images&lt;br/&gt;
Running make as &apos;/bin/gmake -s VERBOSE=-s LOG_LEVEL=warn -R -I /home/openjdk/jdk9/make/common -s SPEC=/home/openjdk/jdk9//build/linux-x86_64-normal-server-release/spec.gmk&apos;&lt;br/&gt;
Building OpenJDK for target &apos;images&apos; in configuration &apos;linux-x86_64-normal-server-release&apos;&lt;br/&gt;
.............................................................................cut for brevity..........................................................................&lt;br/&gt;
## Finished verify-modules (build time 00:00:08)&lt;/p&gt;


&lt;p&gt;----- Build times -------&lt;br/&gt;
Start 2014-11-01 05:23:08&lt;br/&gt;
End   2014-11-01 05:30:34&lt;br/&gt;
00:00:08 verify-modules&lt;br/&gt;
00:07:26 TOTAL&lt;br/&gt;
-------------------------&lt;/p&gt;


&lt;p&gt;Finished building OpenJDK for target &apos;images&apos;&lt;br/&gt;
[openjdk@e583ed8a4e04 jdk9]$ build/linux-x86_64-normal-server-release/images/j2sdk-image/bin/java -version&lt;br/&gt;
openjdk version &quot;1.9.0-internal&quot;&lt;br/&gt;
OpenJDK Runtime Environment (build 1.9.0-internal-openjdk_2014_11_01_05_15-b00)&lt;br/&gt;
OpenJDK 64-Bit Server VM (build 1.9.0-internal-openjdk_2014_11_01_05_15-b00, mixed mode)&lt;br/&gt;
&lt;/pre&gt;&lt;/p&gt;

</description>          </item>
    <item>
    <guid isPermaLink="true">https://www.sunnychan.hk/blog/sunny/entry/blog_upgraded</guid>
    <title>Blog upgraded</title>
    <dc:creator>Sunny Chan</dc:creator>
    <link>https://www.sunnychan.hk/blog/sunny/entry/blog_upgraded</link>
        <pubDate>Tue, 13 Dec 2011 14:34:32 +0000</pubDate>
    <category>Java</category>
    <category>java</category>
    <category>java7</category>
    <category>roller</category>
            <description>
&lt;p&gt;&lt;p&gt;I have upgraded this website to:&lt;/p&gt; &lt;br/&gt;
  &lt;ul&gt; &lt;br/&gt;
    &lt;li&gt;Apache Roller 5.0&lt;/li&gt; &lt;br/&gt;
    &lt;li&gt;Apache TOmcat 6.0.35&lt;/li&gt; &lt;br/&gt;
    &lt;li&gt;Java 7 Update 2&lt;/li&gt; &lt;br/&gt;
  &lt;/ul&gt; &lt;br/&gt;
  &lt;div&gt;Let&apos;s see how this goes!&lt;/div&gt;&lt;/p&gt;

</description>          </item>
    <item>
    <guid isPermaLink="true">https://www.sunnychan.hk/blog/sunny/entry/openjdk_compile_problem_on_ubuntu</guid>
    <title>OpenJDK compile problem on Ubuntu 11.10, and the fix</title>
    <dc:creator>Sunny Chan</dc:creator>
    <link>https://www.sunnychan.hk/blog/sunny/entry/openjdk_compile_problem_on_ubuntu</link>
        <pubDate>Fri, 28 Oct 2011 02:45:40 +0000</pubDate>
    <category>Java</category>
    <category>jvm</category>
    <category>openjdk</category>
            <description>
&lt;p&gt;&lt;p&gt;If you have following the&lt;a href=&quot;http://www.google.com.hk/url?sa=t&amp;amp;rct=j&amp;amp;q=openjdk%2Bbuild%2Breadme&amp;amp;source=web&amp;amp;cd=1&amp;amp;ved=0CBwQFjAA&amp;amp;url=http%3A%2F%2Fhg.openjdk.java.net%2Fjdk7%2Fbuild%2Fraw-file%2Ftip%2FREADME-builds.html&amp;amp;ei=fkmqTt2gLs60iQf569jxDw&amp;amp;usg=AFQjCNHgBDX_XzZp3wrID_lM6ekZOjlndQ&amp;amp;sig2=337pUWFgsG_PPtAx6boWwA&quot;&gt; OpenJDK build Readme&lt;/a&gt; and try to compile OpenJDK on Ubuntu 11.10, you may see this error:&amp;nbsp;&lt;/p&gt; &lt;br/&gt;
  &lt;pre&gt;&lt;font class=&quot;Apple-style-span&quot; size=&quot;2&quot;&gt;/home/schan/openjdk7/build/linux-amd64/tmp/sun/javax.sound/jsoundalsa/obj64/PLATFORM_API_LinuxOS_ALSA_PCM.o: In function `DAUDIO_GetFormats&apos;:&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x1fd): undefined reference to `snd_pcm_format_mask_malloc&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x20a): undefined reference to `snd_pcm_close&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x225): undefined reference to `snd_pcm_hw_params_malloc&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x236): undefined reference to `snd_pcm_hw_params_get_format_mask&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x246): undefined reference to `snd_pcm_format_mask_free&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x259): undefined reference to `snd_pcm_hw_params_any&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x26a): undefined reference to `snd_pcm_hw_params_get_format_mask&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x277): undefined reference to `snd_pcm_hw_params_get_channels_min&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x288): undefined reference to `snd_pcm_hw_params_get_channels_max&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x2cf): undefined reference to `snd_pcm_format_mask_test&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x45d): undefined reference to `snd_pcm_hw_params_free&apos;&lt;br/&gt;
/home/schan/openjdk7/build/linux-amd64/tmp/sun/javax.sound/jsoundalsa/obj64/PLATFORM_API_LinuxOS_ALSA_PCM.o: In function `setStartThresholdNoCommit&apos;:&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x48c): undefined reference to `snd_pcm_sw_params_set_start_threshold&apos;&lt;br/&gt;
/home/schan/openjdk7/build/linux-amd64/tmp/sun/javax.sound/jsoundalsa/obj64/PLATFORM_API_LinuxOS_ALSA_PCM.o: In function `setStartThreshold&apos;:&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x4bf): undefined reference to `snd_pcm_sw_params&apos;&lt;br/&gt;
/home/schan/openjdk7/build/linux-amd64/tmp/sun/javax.sound/jsoundalsa/obj64/PLATFORM_API_LinuxOS_ALSA_PCM.o: In function `setHWParams&apos;:&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x518): undefined reference to `snd_pcm_hw_params_any&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x531): undefined reference to `snd_pcm_hw_params_set_access&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x544): undefined reference to `snd_pcm_hw_params_set_format&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x557): undefined reference to `snd_pcm_hw_params_set_channels&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x58a): undefined reference to `snd_pcm_hw_params_set_rate_near&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x5dc): undefined reference to `snd_pcm_hw_params_set_buffer_size_near&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x60b): undefined reference to `snd_pcm_hw_params_set_period_time_near&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x61b): undefined reference to `snd_pcm_hw_params&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x647): undefined reference to `snd_pcm_hw_params_set_periods_near&apos;&lt;br/&gt;
/home/schan/openjdk7/build/linux-amd64/tmp/sun/javax.sound/jsoundalsa/obj64/PLATFORM_API_LinuxOS_ALSA_PCM.o: In function `setSWParams&apos;:&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x67e): undefined reference to `snd_pcm_sw_params_current&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x6b4): undefined reference to `snd_pcm_sw_params_set_avail_min&apos;&lt;br/&gt;
PLATFORM_API_LinuxOS_ALSA_PCM.c:(.text+0x6c4): undefined reference to `snd_pcm_sw_params&apos;&lt;/font&gt;&lt;/pre&gt; &lt;br/&gt;
  &lt;div&gt; &lt;br/&gt;
    &lt;p&gt;Don&apos;t panic - it looks like the Java&apos;s linking sequence for ALSA sound library is wrong. Just use this patch:&lt;/p&gt; &lt;br/&gt;
    &lt;pre&gt;--- old/make/javax/sound/jsoundalsa/Makefile &amp;nbsp; &amp;nbsp;2011-10-28 02:28:00.000000000 -0400&lt;br/&gt;
+++ new/make/javax/sound/jsoundalsa/Makefile &amp;nbsp; &amp;nbsp;2011-10-28 02:28:00.000000000 -0400&lt;br/&gt;
@@ -65,7 +65,7 @@&lt;br/&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(MIDIFILES_export) \&lt;br/&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $(PORTFILES_export)&lt;br/&gt;
&amp;nbsp;&lt;br/&gt;
-LDFLAGS += -lasound&lt;br/&gt;
+EXTRA_LIBS += -lasound&lt;br/&gt;
&amp;nbsp;&lt;br/&gt;
&amp;nbsp;CPPFLAGS += \&lt;br/&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -DUSE_DAUDIO=TRUE \&lt;/pre&gt; &lt;br/&gt;
  &lt;/div&gt; &lt;br/&gt;
  &lt;div&gt;You should be good to go!&lt;/div&gt;&lt;/p&gt;

</description>          </item>
    <item>
    <guid isPermaLink="true">https://www.sunnychan.hk/blog/sunny/entry/my_coscup_talk_on_openjdk</guid>
    <title>My COSCUP talk on OpenJDK 7</title>
    <dc:creator>Sunny Chan</dc:creator>
    <link>https://www.sunnychan.hk/blog/sunny/entry/my_coscup_talk_on_openjdk</link>
        <pubDate>Thu, 15 Sep 2011 12:54:50 +0000</pubDate>
    <category>Java</category>
    <category>java</category>
    <category>openjdk</category>
    <category>talk</category>
            <description>
&lt;p&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/Ce3EVtn56oA&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;&lt;/p&gt;

</description>          </item>
    <item>
    <guid isPermaLink="true">https://www.sunnychan.hk/blog/sunny/entry/how_to_compile_openjdk_on</guid>
    <title>How to compile OpenJDK on Windows</title>
    <dc:creator>Sunny Chan</dc:creator>
    <link>https://www.sunnychan.hk/blog/sunny/entry/how_to_compile_openjdk_on</link>
        <pubDate>Sun, 24 Jul 2011 12:42:36 +0000</pubDate>
    <category>Java</category>
    <category>openjdk</category>
    <category>windows</category>
            <description>
&lt;p&gt;&lt;p&gt;These are the steps that I have made OpenJDK to compile on Windows platform:&lt;/p&gt;&lt;br/&gt;
  &lt;p&gt;&lt;br/&gt;
    &lt;ol&gt;&lt;br/&gt;
      &lt;li&gt;Install &lt;a href=&quot;http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express&quot;&gt;Visual C++ 2010 Express&lt;/a&gt; (or if you are rich, get Visual Studio 2010 Professional)&amp;nbsp;&lt;/li&gt;&lt;br/&gt;
      &lt;li&gt;Install &lt;a href=&quot;http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=8279&quot;&gt;Windows 7 Platform SDK&lt;/a&gt; &lt;/li&gt;&lt;br/&gt;
      &lt;li&gt;Install &lt;a href=&quot;http://www.cygwin.com/&quot;&gt;Cygwin&lt;/a&gt;, install the packages suggested on &lt;a href=&quot;http://hg.openjdk.java.net/jdk7/build/raw-file/tip/README-builds.html#cygwin&quot;&gt;OpenJDK Readme&lt;/a&gt;. Also install gcc for step 5&lt;/li&gt;&lt;br/&gt;
      &lt;li&gt;Install &lt;a href=&quot;http://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;amp;id=21416&quot;&gt;DirectX 9.0 SDK&lt;/a&gt; &lt;/li&gt;&lt;br/&gt;
      &lt;li&gt;The gnu make package in the current cygwin does not support Windows directory convention and you should compile your own version of the &lt;a href=&quot;http://ftp.gnu.org/gnu/make/&quot;&gt;make 3.82&lt;/a&gt; which has the correct support.&lt;/li&gt;&lt;br/&gt;
      &lt;li&gt;Download latest &lt;a href=&quot;http://freetype.sourceforge.net/index2.html&quot;&gt;Freetype&lt;/a&gt;.&amp;nbsp;&lt;/li&gt;&lt;br/&gt;
      &lt;ul&gt;&lt;br/&gt;
        &lt;li&gt;Compile it using Visual C++ - you can find the Visual C++ project file under &amp;lt;freetype src&amp;gt;/builds/win32/vc2010.&amp;nbsp;&lt;/li&gt;&lt;br/&gt;
        &lt;li&gt;Make sure you have change the type of DLL it generates by going to Project-&amp;gt;Properties, then Configuration Manager... button, set it to Release and Win32&lt;/li&gt;&lt;br/&gt;
        &lt;li&gt;Make sure you have set it so that it builds a DLL - you can find that under Project-&amp;gt;Properties, Configuration Properties, General and there should be a Configuration Type drop down box&lt;/li&gt;&lt;br/&gt;
        &lt;li&gt;You can then build freetype. The DLL generated will have a version number attached to it (e.g. freetype245.dll) and you will need to make sure you rename it to freetype.dll.&lt;/li&gt;&lt;br/&gt;
      &lt;/ul&gt;&lt;br/&gt;
      &lt;li&gt;Get latest &lt;a href=&quot;http://ant.apache.org/&quot;&gt;Apache ANT&lt;/a&gt; &lt;/li&gt;&lt;br/&gt;
      &lt;li&gt;Make sure you have a Java 6 JDK installed&lt;/li&gt;&lt;br/&gt;
      &lt;li&gt;Download the openjdk source code, either using hg or &lt;a href=&quot;http://download.java.net/openjdk/jdk7/&quot;&gt;source bundle&lt;/a&gt; (I will assume you put it in c:\openjdk)&lt;/li&gt;&lt;br/&gt;
      &lt;li&gt;Open a command prompt for Windows SDK by going to Start -&amp;gt; Windows SDK 7.1 -&amp;gt; Windows SDK 7.1 command prompt&lt;/li&gt;&lt;br/&gt;
      &lt;li&gt;&lt;b&gt;For 32bit ONLY&lt;/b&gt;, you should run the Visual Studio compiler settings batch file: c:\program files\Microsoft Visual Studio 10.0\VC\bin\vcvars32.bat&lt;/li&gt;&lt;br/&gt;
      &lt;li&gt;Make sure you have override the standard cygwin bin path so that make.exe you have compiled in &lt;i&gt;step 5&lt;/i&gt; take precedent of the default cygwin.&lt;/li&gt;&lt;br/&gt;
      &lt;li&gt;Also check that the link.exe you run in the path is the actual Microsoft linker and not the cygwin&apos;s link command - you will need to fiddle with the path.&lt;/li&gt;&lt;br/&gt;
      &lt;li&gt;Setup a number of environment variables:&lt;/li&gt;&lt;br/&gt;
      &lt;ol style=&quot;list-style-type: lower-alpha; &quot;&gt;&lt;br/&gt;
        &lt;li&gt;ALT_BOOTDIR should point to the Java 6 JDK (Step 8)&lt;/li&gt;&lt;br/&gt;
        &lt;li&gt;ALT_DXSDK_PATH is the DirectX SDK PATH (Step 4)&lt;/li&gt;&lt;br/&gt;
        &lt;li&gt;ALT_FREETYPE_LIB_PATH and ALT_FREETYPE_HEADERS_PATH.&lt;/li&gt;&lt;br/&gt;
        &lt;li&gt;ANT_HOME&lt;/li&gt;&lt;br/&gt;
        &lt;li&gt;HOTSPOT_BUILD_JOBS if you want to parallelize your build - you can&apos;t use -j options in the make command&lt;/li&gt;&lt;br/&gt;
        &lt;li&gt;ALLOW_DOWNLOADS=true so that it can download JAXP and JAXS jar&lt;/li&gt;&lt;br/&gt;
        &lt;li&gt;Make sure the path is setup correctly (Step 12/13)&lt;/li&gt;&lt;br/&gt;
      &lt;/ol&gt;&lt;br/&gt;
      &lt;li&gt;You are ready to give it a go. First, run &amp;quot;make sanity&amp;quot; and see whether there is anything you setup incorrectly. If something is wrong, fix it.&lt;/li&gt;&lt;br/&gt;
      &lt;li&gt;If you have passed make sanity, you can run make to build the JDK! Go and make a cuppa, it will take a while. On my i7-2600 and hard drive it took 2 hours.&lt;/li&gt;&lt;br/&gt;
    &lt;/ol&gt;&lt;br/&gt;
    &lt;p&gt;&lt;b&gt;Important: In order to build a 32bit JDK you must use a 32bit System - ie. you cannot cross compile (ie. 64bit Windows and compile a 32bit JDK)&lt;/b&gt;&lt;/p&gt;&lt;br/&gt;
    &lt;div&gt;&lt;br/&gt;
      &lt;p&gt;Let me know whether it works for you. if it doesn&apos;t tell me what&apos;s wrong and I will fix the instructions!&lt;/p&gt;&lt;br/&gt;
    &lt;/div&gt;&lt;br/&gt;
  &lt;/p&gt;&lt;/p&gt;

</description>          </item>
    <item>
    <guid isPermaLink="true">https://www.sunnychan.hk/blog/sunny/entry/coscup_talk</guid>
    <title>COSCUP talk</title>
    <dc:creator>Sunny Chan</dc:creator>
    <link>https://www.sunnychan.hk/blog/sunny/entry/coscup_talk</link>
        <pubDate>Fri, 15 Jul 2011 14:18:19 +0000</pubDate>
    <category>Java</category>
    <category>coscup</category>
            <description>
&lt;p&gt;&lt;p&gt;This is the abstract for my &lt;a href=&quot;http://coscup.org/2011/en/program/&quot;&gt;COSCUP talk&lt;/a&gt; on August 18th, 2011:&lt;/p&gt;&lt;br/&gt;
  &lt;p&gt;&lt;span style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 18px; &quot;&gt;OpenJDK 7: The universal language runtime&lt;/span&gt;&lt;span style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 18px; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 18px; &quot;&gt;&lt;/span&gt;&lt;/p&gt;&lt;br/&gt;
  &lt;p&gt;&lt;i&gt;&lt;span style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 18px; &quot;&gt;Sunny Chan&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 18px; &quot;&gt;Hong Kong Java User Group Leader&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;br/&gt;
  &lt;p&gt;&lt;span style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 18px; &quot;&gt;OpenJDK 7 is the latest release of the Java Platform. In this release, there are a number of major innovations in the OpenJDK&apos;s Java Virtual Machine to enable other scripting languages like Ruby, Python and PHP to run on the platform efficiently.&lt;/span&gt;&lt;br /&gt;&lt;/p&gt;&lt;br/&gt;
  &lt;p&gt;&lt;span style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 18px; &quot;&gt;In this talk, I will give you 5 reasons why you should run your applications written in alternative languages like Ruby on the OpenJDK Runtime. I will also explore some of the common myths about running your application with the Java Runtime.&lt;/span&gt; &lt;/p&gt;&lt;/p&gt;

</description>          </item>
    <item>
    <guid isPermaLink="true">https://www.sunnychan.hk/blog/sunny/entry/opengl_with_javascript</guid>
    <title>OpenGL with JavaScript</title>
    <dc:creator>Sunny Chan</dc:creator>
    <link>https://www.sunnychan.hk/blog/sunny/entry/opengl_with_javascript</link>
        <pubDate>Wed, 10 Jan 2007 09:08:45 +0000</pubDate>
    <category>Java</category>
            <description>
&lt;p&gt;&lt;p&gt;That&apos;s a little bit of fun for you today: You can write &lt;a href=&quot;http://blogs.sun.com/sundararajan/entry/exploring_opengl_java_binding_by&quot; target=&quot;_self&quot;&gt;a 3D apps using javascript&lt;/a&gt; while using javascript agent!&lt;/p&gt;&lt;br/&gt;
&lt;p&gt;Don&apos;t think you can do that with c# :-)&lt;/p&gt;&lt;/p&gt;

</description>          </item>
    <item>
    <guid isPermaLink="true">https://www.sunnychan.hk/blog/sunny/entry/server_crashed_last_night</guid>
    <title>Server crashed last night</title>
    <dc:creator>Sunny Chan</dc:creator>
    <link>https://www.sunnychan.hk/blog/sunny/entry/server_crashed_last_night</link>
        <pubDate>Thu, 9 Mar 2006 13:39:27 +0000</pubDate>
    <category>Java</category>
            <description>
&lt;p&gt;Well, the tomcat server that runs this roller weblog died last night - seems like it has running out of memory.... &lt;br /&gt;&lt;br /&gt;I am running thi weblog on a Xen VM with 128M&amp;nbsp; memory - seems like it is not enough! I can&apos;t really afford a proper hosted machine at the moment - otherwise I definitely would try to get more memory! Anyway, I have restarted the server now and it is all fine - maybe I need to switch JVM, and my old colleagues will bark!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;

</description>          </item>
  </channel>
</rss>