<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Chui's counterpoint &#187; Java</title>
	<atom:link href="http://www.redmountainsw.com/wordpress/archives/category/java/feed" rel="self" type="application/rss+xml" />
	<link>http://www.redmountainsw.com/wordpress</link>
	<description>pulling the rug</description>
	<lastBuildDate>Fri, 19 Mar 2010 03:35:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>JDBC Connection URLs for 22 Databases</title>
		<link>http://www.redmountainsw.com/wordpress/archives/jdbc-connection-urls</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/jdbc-connection-urls#comments</comments>
		<pubDate>Fri, 07 Aug 2009 23:40:22 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[jdbc]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/?p=131</guid>
		<description><![CDATA[Here is a non-exhaustive list of JDBC connection URLs for various databases. Corrections welcome!
Microsoft SQL Server JDBC connection URL
jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=northwind
com.microsoft.jdbc.sqlserver.SQLServerDriver
msbase.jar;mssqlserver.jar;msutil.jar
downloadl
Microsoft SQL Server 2005 JDBC connection URL
jdbc:sqlserver://serverName\instance:port[;user=value][;password=value][;property=value]
com.microsoft.sqlserver.jdbc.SQLServerDriver
sqljdbc.jar
download SQL Server 2005 driver
Microsoft SQL Server (JTurbo) JDBC connection URL
jdbc:JTurbo://&#60;HOST&#62;:&#60;PORT&#62;/&#60;DB&#62;
com.ashna.jturbo.driver.Driver
Microsoft SQL Server (Sprinta) JDBC connection URL
jdbc:inetdae7:&#60;HOST&#62;:&#60;PORT&#62;?database=&#60;DB&#62;
com.inet.tds.TdsDrive
download

Cloudscape JDBC connection URL
jdbc:cloudscape:MyDataBase
COM.cloudscape.core.JDBCDriver
Cloudscape RMI JDBC connection URL
jdbc:rmi://hostname:portnumber/jdbc:cloudscape:MyDatabase
RmiJdbc.RJDriver
Hypersonic SQL (server) JDBC connection URL
jdbc:hsqldb:hsql://localhost
org.hsqldb.jdbcDriver
hsqldb.jar
download (SourceForge)
Hypersonic SQL [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a non-exhaustive list of JDBC connection URLs for various databases. Corrections welcome!</p>
<h2>Microsoft SQL Server JDBC connection URL</h2>
<pre>jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=northwind
com.microsoft.jdbc.sqlserver.SQLServerDriver
msbase.jar;mssqlserver.jar;msutil.jar
<a href="http://www.microsoft.com/sql/downloads/default.asp">download</a>l</pre>
<h2>Microsoft SQL Server 2005 JDBC connection URL</h2>
<pre>jdbc:sqlserver://serverName\instance:port[;user=value][;password=value][;property=value]
com.microsoft.sqlserver.jdbc.SQLServerDriver
sqljdbc.jar
<a href="http://www.microsoft.com/downloads/details.aspx?familyid=e22bc83b-32ff-4474-a44a-22b6ae2c4e17&amp;displaylang=en">download SQL Server 2005 driver</a></pre>
<h2>Microsoft SQL Server (JTurbo) JDBC connection URL</h2>
<pre>jdbc:JTurbo://&lt;HOST&gt;:&lt;PORT&gt;/&lt;DB&gt;
com.ashna.jturbo.driver.Driver</pre>
<h2>Microsoft SQL Server (Sprinta) JDBC connection URL</h2>
<pre>jdbc:inetdae7:&lt;HOST&gt;:&lt;PORT&gt;?database=&lt;DB&gt;
com.inet.tds.TdsDrive
<a href="http://www.inetsoftware.de/products/jdbc/mssql/sprinta/">download</a></pre>
<p><span id="more-131"></span></p>
<h2>Cloudscape JDBC connection URL</h2>
<pre>jdbc:cloudscape:MyDataBase
COM.cloudscape.core.JDBCDriver</pre>
<h2>Cloudscape RMI JDBC connection URL</h2>
<pre>jdbc:rmi://hostname:portnumber/jdbc:cloudscape:MyDatabase
RmiJdbc.RJDriver</pre>
<h2>Hypersonic SQL (server) JDBC connection URL</h2>
<pre>jdbc:hsqldb:hsql://localhost
org.hsqldb.jdbcDriver
hsqldb.jar
<a href="http://sourceforge.net/project/showfiles.php?group_id=23316">download (SourceForge)</a></pre>
<h2>Hypersonic SQL (in-process) JDBC connection URL</h2>
<pre>jdbc:hsqldb:file:/opt/db/testdb
org.hsqldb.jdbcDriver
hsqldb.jar</pre>
<h2>Hypersonic SQL (in-memory) JDBC connection URL</h2>
<pre>jdbc:hsqldb:mem:aname
org.hsqldb.jdbcDriver
hsqldb.jar</pre>
<h2><a href="http://www.h2database.com">H2 Database</a> (embedded)</h2>
<pre>jdbc:h2:test</pre>
<h2><a href="http://www.h2database.com">H2 Database</a> (Client Server)</h2>
<pre>jdbc:h2:tcp://localhost:9092/test</pre>
<h2><a href="http://www.h2database.com">H2 Database</a> (Client Server, Clustered)</h2>
<pre>jdbc:h2:tcp://localhost:9092,backuphost.com:9092/test</pre>
<h2><a href="http://www.h2database.com">H2 Database</a> (In Memory)</h2>
<pre>jdbc:h2:{ {.|mem:}[name] | [file:]fileName | {tcp|ssl}:[//]server[:port][,server2[:port]]/name }[;key=value...]</pre>
<h2>Informix JDBC connection URL</h2>
<pre>jdbc:informix-sqli://hostname:portnumber/MyDatabase:INFORMIXSERVER=MyServerName
com.informix.jdbc.IfxDriver</pre>
<h2>MySQL JDBC connection URL</h2>
<pre>jdbc:mysql:///test
jdbc:mysql://[host][,failoverhost...][:port]/[database][?propertyName1][=propertyValue1][&amp;propertyName2][=propertyValue2]...
com.mysql.jdbc.Driver</pre>
<h2>Oracle JDBC connection URL</h2>
<pre>jdbc:oracle:thin:@localhost:1521:MyDatabase
oracle.jdbc.driver.OracleDriver
classes12.zip</pre>
<p>To reference the Oracle SID (Service name), you have to <a href="http://dirknachbar.blogspot.com/2009/06/jdbc-url-with-oracle-sid-or-servicename.html">apply // in front of the host name</a>.</p>
<pre>jdbc:oracle:thin:myusername/mypassword@//localhost:1521/PROD.OCZH.CH</pre>
<p>To connect to your database <a href="http://theblasfrompas.blogspot.com/2008/04/jdbc-thin-connection-using-tnsnamesora.html">using a tnsnames.ora entry</a>, </p>
<pre>
System.setProperty("oracle.net.tns_admin",
                        "D:\\oracle\\product\\10.2.0\\db_1\\NETWORK\\ADMIN");
or
Doracle.net.tns_admin=D:\oracle\product\10.2.0\db_1\NETWORK\ADMIN
jdbc:oracle:thin:@mysvcname
</pre>
<h2>PostgresSQL JDBC connection URL</h2>
<pre>jdbc:postgresql:template1
org.postgresql.Driver</pre>
<h2>DB2 JDBC connection URL</h2>
<pre>jdbc:db2:test
com.ibm.db2.jdbc.app.DB2Driver</pre>
<h2><a href="http://www.oracle.com/technology/software/products/timesten/index.html">TimesTen</a> in-memory database JDBC connection URL</h2>
<pre>jdbc:timesten:direct:test
com.timesten.jdbc.TimesTenDriver</pre>
<h2>DB2/400 (native) JDBC connection URL</h2>
<pre>jdbc:db2://systemname
com.ibm.db2.jdbc.app.DB2Driver</pre>
<h2>DB2/400 (toolbox) JDBC connection URL</h2>
<pre>jdbc:as400://systemname
com.ibm.as400.access.AS400JDBCDriver</pre>
<h2>Derby JDBC connection URL</h2>
<pre>jdbc:derby:/test;create=true
org.apache.derby.jdbc.EmbeddedDriver</pre>
<h2>Derby JDBC network connection URL</h2>
<pre>jdbc:derby://localhost:1527/sample;user=judy;password=no12see
jdbc:derby://localhost:1527/c:/my-db-dir/my-db-name;user=judy;password=no12see
org.apache.derby.jdbc.ClientDriver
</pre>
<p>Note that authentication is <b>off</b> by default. To enable user authentication, the property <code>derby.connection.requireAuthentication</code> must be set to true. This is set in the <em>derby.properties</em> file.</p>
<h2>Sybase JDBC connection URL</h2>
<pre>jdbc:sybase:Tds:localhost:2048/MyDatabase
com.sybase.jdbc2.jdbc.SybDriver
jconn2.jar
<a href="http://www.google.com.au/url?sa=t&amp;ct=res&amp;cd=1&amp;url=http%3A//www.sybase.com/products/informationmanagement/softwaredeveloperkit/jconnect&amp;ei=cHnRQ4WRN6e2YPGUtYYD&amp;sig2=xEo08Vaed31IRQ5KRNQ6ow">download</a></pre>
<h2>Mckoi SQL JDBC connection URL</h2>
<pre>jdbc:mckoi:local://C:/mckoi1.0.3/db.conf
com.mckoi.JDBCDriver</pre>
<h2>SAP DB JDBC connection URL</h2>
<pre>jdbc:sapdb://localhost/TST
com.sap.dbtech.jdbc.DriverSapDB</pre>
<h2>JSQL JDBC connection URL</h2>
<pre>jdbc:JSQLConnect://localhost/test
com.jnetdirect.jsql.JSQLDriver</pre>
<h2>JTurbo JDBC connection URL</h2>
<pre>jdbc:JTurbo://localhost:1433/test
com.newatlanta.jturbo.driver.Driver</pre>
<h2>jTDS JDBC connection URL</h2>
<pre>jdbc:jtds:sqlserver://localhost/dbName;instance=instanceName
net.sourceforge.jtds.jdbc.Driver</pre>
<p>(thanks JoelN for the correction)</p>
<h2>Interbase (Java driver) JDBC connection URL</h2>
<pre>jdbc:firebirdsql:localhost/3050:/firebird/test.gdb
org.firebirdsql.jdbc.FBDriver</pre>
<h2>Interbase (Interclient driver) JDBC connection URL</h2>
<pre>jdbc:interbase://localhost:3060/C:/firebird/test.gdb
interbase.interclient.Driver</pre>
<h2>PointBase JDBC connection URL</h2>
<pre>jdbc:pointbase:embedded:sample
com.pointbase.jdbc.jdbcUniversalDriver</pre>
<h2>Ingres JDBC connection URL</h2>
<p>ca.edbc.jdbc.EdbcDriver<br />
jdbc:edbc://localhost:II7/database</p>
<h2>Mimer SQL JDBC connection URL</h2>
<pre>jdbc:mimer:multi1
com.mimer.jdbc.Driver</pre>
<h2>Sources</h2>
<ul>
<li><a href="http://www.hibernate.org/">Hibernate</a></li>
<li><a href="http://www.visualcase.com/jdbc.htm#Microsoft%20SQL%20Server%202000">VisualCase</a></li>
<li><a href="http://www.petefreitag.com/articles/jdbc_urls/">Pete&#8217;s Guide to JDBC Driver URLs</a></li>
<li><a href="http://www.devx.com/tips/Tip/28818">devX List of JDBC Drivers</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/jdbc-connection-urls/feed</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Clojure symbol counting</title>
		<link>http://www.redmountainsw.com/wordpress/archives/clojure-symbol-counting</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/clojure-symbol-counting#comments</comments>
		<pubDate>Mon, 01 Jun 2009 23:27:39 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[lisp]]></category>
		<category><![CDATA[clojure]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/?p=774</guid>
		<description><![CDATA[One of the little things I found enjoyable while trying out Clojure was discovering the merge-with command. After counting the each of the subbranch and collecting the results in dictionaries, the dictionaries were merged together.

clojure.core/merge-with
([f &#038; maps])
  Returns a map that consists of the rest of the maps conj-ed onto
  the first.  [...]]]></description>
			<content:encoded><![CDATA[<p>One of the little things I found enjoyable while trying out <a href="http:/www.clojure.org/">Clojure</a> was discovering the <b>merge-with</b> command. After counting the each of the subbranch and collecting the results in dictionaries, the dictionaries were merged together.</p>
<pre>
clojure.core/merge-with
([f &#038; maps])
  Returns a map that consists of the rest of the maps conj-ed onto
  the first.  If a key occurs in more than one map, the mapping(s)
  from the latter (left-to-right) will be combined with the mapping in
  the result by calling (f val-in-result val-in-latter).
</pre>
<p>Using merge-with yields a rather terse code, comprising a tree-walker and a final tally.</p>
<pre>

(defn count-syms
  "count number time of a symbol occurs in the first place of a sequence"
  [obj]
  (if (not (seq? obj))
      {} ; only count sequences
      (do
        (reduce #(merge-with + %1 %2)
          (conj
            (map
                count-syms
                (filter seq? (rest obj)))
            (inc-dict dict (first obj)))))))
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/clojure-symbol-counting/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A plan for learning clojure</title>
		<link>http://www.redmountainsw.com/wordpress/archives/a-plan-for-learning-clojure</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/a-plan-for-learning-clojure#comments</comments>
		<pubDate>Mon, 01 Jun 2009 14:05:04 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[lisp]]></category>
		<category><![CDATA[clojure]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/?p=772</guid>
		<description><![CDATA[I had printed out the list of functions and macros in the Clojure API page, and it filled out two A4 pages. Where to start though? I walked the entire clojure and clojure contrib directory and counted the number of function calls. Here are the top stats.

sym	count	len
clojure.core/list	3872	17
quote	2749	5
defn	1757	4
clojure.core/seq	1481	16
clojure.core/concat	1480	19
=	1074	1
let	1042	3
is	885	2
.	836	1
if	826	2
defmethod	431	9
def	407	3
complex	377	7
defn-	376	5
fn	356	2
first	346	5
defmacro	298	8
clojure.core/apply	264	18
deftest	257	7
str	252	3
when	244	4
imaginary	238	9
recur	237	5
apply	229	5
instance?	220	9
nil	217	3
and	214	3
next	208	4
cl-format	206	9
fn*	197	3
ns	194	2
map	193	3
:use	187	4
list	184	4
1	181	1
count	178	5
+	169	1
seq	167	3
reduce	165	6
are	148	3
cons	143	4
println	141	7
or	141	2
not	135	3
loop	133	4
thrown?	127	7
*	127	1
conj	125	4
print	124	5
nth	124	3
-	116	1
doseq	114	5

Now, I have a study-plan.
Incidentally, waterfront IDE is quite [...]]]></description>
			<content:encoded><![CDATA[<p>I had printed out the list of functions and macros in the Clojure API page, and it filled out two A4 pages. Where to start though? I walked the entire clojure and clojure contrib directory and counted the number of function calls. Here are the top stats.</p>
<pre>
sym	count	len
clojure.core/list	3872	17
quote	2749	5
defn	1757	4
clojure.core/seq	1481	16
clojure.core/concat	1480	19
=	1074	1
let	1042	3
is	885	2
.	836	1
if	826	2
defmethod	431	9
def	407	3
complex	377	7
defn-	376	5
fn	356	2
first	346	5
defmacro	298	8
clojure.core/apply	264	18
deftest	257	7
str	252	3
when	244	4
imaginary	238	9
recur	237	5
apply	229	5
instance?	220	9
nil	217	3
and	214	3
next	208	4
cl-format	206	9
fn*	197	3
ns	194	2
map	193	3
:use	187	4
list	184	4
1	181	1
count	178	5
+	169	1
seq	167	3
reduce	165	6
are	148	3
cons	143	4
println	141	7
or	141	2
not	135	3
loop	133	4
thrown?	127	7
*	127	1
conj	125	4
print	124	5
nth	124	3
-	116	1
doseq	114	5
</pre>
<p>Now, I have a study-plan.</p>
<p>Incidentally, waterfront IDE is quite nice, particularly because I don&#8217;t have to learn Emacs key-bindings. There are some moments when it barfs and prints out hashmaps incorrectly, but I enjoyed working in a REPL environment. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/a-plan-for-learning-clojure/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaFX experiment</title>
		<link>http://www.redmountainsw.com/wordpress/archives/javafx-experiment</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/javafx-experiment#comments</comments>
		<pubDate>Wed, 01 Apr 2009 20:12:24 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[javafx]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/?p=739</guid>
		<description><![CDATA[I was having a lot of problems getting the simplest test case below to run without throwing an odd exception:

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.*;
import javafx.ext.swing.SwingTextField;
import javafx.ext.swing.SwingButton;

Stage {
    title : &#34;MyApp&#34;
    scene: Scene {
        width: 200
        height: [...]]]></description>
			<content:encoded><![CDATA[<p>I was having a lot of problems getting the simplest test case below to run without throwing an odd exception:</p>
<pre class="brush: java">
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.layout.*;
import javafx.ext.swing.SwingTextField;
import javafx.ext.swing.SwingButton;

Stage {
    title : &quot;MyApp&quot;
    scene: Scene {
        width: 200
        height: 200
        content: [
            VBox{
                content:
                [
                SwingTextField {
                columns: 10
                text: &quot;TextField&quot;
                editable: true
                },
                SwingButton {
                text: &quot;Button&quot;
                action: function() {  }
                }]
            }

        ]
    }
}
</pre>
<p>SwingTextField barfs like this:</p>
<pre>
Exception in thread "AWT-EventQueue-1" java.lang.IllegalArgumentException: Zero length string passed to TextLayout constructor.
        at java.awt.font.TextLayout.<init>(TextLayout.java:364)
        at sun.font.FontDesignMetrics.charsWidth(FontDesignMetrics.java:487)
        at javax.swing.text.Utilities.getTabbedTextWidth(Utilities.java:262)
        at javax.swing.text.Utilities.getTabbedTextWidth(Utilities.java:191)
        at javax.swing.text.PlainView.modelToView(PlainView.java:335)
        at javax.swing.text.FieldView.modelToView(FieldView.java:248)
        at javax.swing.plaf.basic.BasicTextUI$RootView.modelToView(BasicTextUI.java:1496)
        at javax.swing.plaf.basic.BasicTextUI.modelToView(BasicTextUI.java:1034)
        at javax.swing.text.DefaultCaret.paint(DefaultCaret.java:600)
        at javax.swing.plaf.basic.BasicTextUI.paintSafely(BasicTextUI.java:730)
        at javax.swing.plaf.basic.BasicTextUI.paint(BasicTextUI.java:868)
        at javax.swing.plaf.basic.BasicTextUI.update(BasicTextUI.java:847)
        at javax.swing.JComponent.paintComponent(JComponent.java:758)
        at javafx.ext.swing.JTextFieldImpl.paintComponent(JTextFieldImpl.java:77)
        at javax.swing.JComponent.paint(JComponent.java:1022)
        at javax.swing.JComponent.paintChildren(JComponent.java:859)
        at javax.swing.JComponent.paint(JComponent.java:1031)
        at com.sun.embeddedswing.EmbeddedPeer.paint(EmbeddedPeer.java:135)
        at com.sun.scenario.scenegraph.SGComponent.paint(SGComponent.java:121)
        at com.sun.scenario.scenegraph.SGLeaf.render(SGLeaf.java:179)
        at com.sun.scenario.scenegraph.SGWrapper.render(SGWrapper.java:122)
        at com.sun.scenario.scenegraph.SGGroup.render(SGGroup.java:222)
        at com.sun.scenario.scenegraph.SGWrapper.render(SGWrapper.java:122)
        at com.sun.scenario.scenegraph.SGGroup.render(SGGroup.java:222)
        at com.sun.scenario.scenegraph.SGGroup.render(SGGroup.java:222)
        at com.sun.scenario.scenegraph.JSGPanel.paintComponent(JSGPanel.java:582)
        at javax.swing.JComponent.paint(JComponent.java:1022)
        at javax.swing.JComponent.paintChildren(JComponent.java:859)
        at javax.swing.JComponent.paint(JComponent.java:1031)
        at javax.swing.JLayeredPane.paint(JLayeredPane.java:564)
        at javax.swing.JComponent.paintChildren(JComponent.java:859)
        at javax.swing.JComponent.paintToOffscreen(JComponent.java:5111)
        at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1386)
        at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1317)
        at javax.swing.RepaintManager.paint(RepaintManager.java:1132)
        at javax.swing.JComponent.paint(JComponent.java:1008)
        at java.awt.GraphicsCallback$PaintCallback.run(GraphicsCallback.java:21)
        at sun.awt.SunGraphicsCallback.runOneComponent(SunGraphicsCallback.java:60)
        at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:97)
        at java.awt.Container.paint(Container.java:1797)
        at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:738)
        at javax.swing.RepaintManager.seqPaintDirtyRegions(RepaintManager.java:667)
        at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:128)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at com.sun.embeddedswing.EmbeddedEventQueue.dispatchEvent(EmbeddedEventQueue.java:369)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)</pre>
<p>Running javafx with the verbose switch pointed the fault out</p>
<pre>javafx -verbose:class test
:
:
[Loaded java.awt.Container$EventTargetFilter from c:\Progra~1\Java\jdk1.6.0\jre\lib\rt.jar]
:
</pre>
<p>I was running an old version of the JDK!<br />
Unsetting the JAVA_HOME resolved the problem.<br />
I hope this helps somebody.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/javafx-experiment/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JavaFX Custom Cursors</title>
		<link>http://www.redmountainsw.com/wordpress/archives/javafx-custom-cursors</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/javafx-custom-cursors#comments</comments>
		<pubDate>Mon, 30 Mar 2009 01:00:47 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[javafx]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/archives/javafx-custom-cursors</guid>
		<description><![CDATA[Setting custom cursors with JavaFx is relatively straightforward, but for one little catch. Your image has to be 32&#215;32. If you want a 16&#215;16 icon, simply leave the rest of the image transparent.

import java.awt.Toolkit;
import javafx.scene.Cursor;
import javafx.scene.image.Image;

public class ColorChooser extends Cursor
{
    public override function impl_getAWTCursor(): java.awt.Cursor {

       [...]]]></description>
			<content:encoded><![CDATA[<p>Setting custom cursors with JavaFx is relatively straightforward, but for one little catch. <span style="font-style: italic;">Your image has to be 32&#215;32</span>. If you want a 16&#215;16 icon, simply leave the rest of the image transparent.</p>
<pre class="brush: java">
import java.awt.Toolkit;
import javafx.scene.Cursor;
import javafx.scene.image.Image;

public class ColorChooser extends Cursor
{
    public override function impl_getAWTCursor(): java.awt.Cursor {

        def url = &quot;{__DIR__}eyedropper.png&quot;;

        var toolkit = Toolkit.getDefaultToolkit();

        var image = Image{width:32 height:32 url:url}.bufferedImage;
        var hotspot = new java.awt.Point(0,15);
        var cursor = toolkit.createCustomCursor(image, hotspot, &quot;colorpicker&quot;);
        return cursor;
    }
}

public def ColorChooserCursor=ColorChooser{};

public function run()
{
    javafx.scene.shape.Rectangle
    {
        x:5 y:5
        width:200 height:200
        cursor:ColorChooserCursor
    }
}
</pre>
<p><!-- technorati tags begin -->
<p style="font-size:10px;text-align:right;">Tags: <a href="http://technorati.com/tag/javafx" rel="tag">javafx</a></p>
<p><!-- technorati tags end --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/javafx-custom-cursors/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JavaFX Introspection</title>
		<link>http://www.redmountainsw.com/wordpress/archives/javafx-introspection</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/javafx-introspection#comments</comments>
		<pubDate>Mon, 23 Mar 2009 14:59:58 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[javafx]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/archives/javafx-introspection</guid>
		<description><![CDATA[Just sharing some code snippets for deserialization of JavaFX objects.

function getValueType(obj:Object,name:String):String
{
    var context:FXLocal.Context=FXLocal.getContext();
    var objectValue:FXLocal.ObjectValue = new FXLocal.ObjectValue(obj,context);
    var cls:FXClassType = objectValue.getClassType();
    var varType:FXType = cls.getVariable(name).getType();
    println(&#34;{name} {varType}&#34;);
    if (varType instanceof FXSequenceType)
    {
  [...]]]></description>
			<content:encoded><![CDATA[<p>Just sharing some code snippets for deserialization of JavaFX objects.</p>
<pre class="brush: java">
function getValueType(obj:Object,name:String):String
{
    var context:FXLocal.Context=FXLocal.getContext();
    var objectValue:FXLocal.ObjectValue = new FXLocal.ObjectValue(obj,context);
    var cls:FXClassType = objectValue.getClassType();
    var varType:FXType = cls.getVariable(name).getType();
    println(&quot;{name} {varType}&quot;);
    if (varType instanceof FXSequenceType)
    {
        return &quot;array&quot;;
    } else if (varType instanceof FXClassType) {
        return &quot;element&quot;;
    } else {
        return &quot;value&quot;;
    }
}
</pre>
<p>Thanks to James Weaver for tips on <a href="http://learnjavafx.typepad.com/weblog/2009/03/answering-reader-mail-about-the-javafx-reflection-api.html">JavaFX Reflection API</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/javafx-introspection/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaFX binding in sequences</title>
		<link>http://www.redmountainsw.com/wordpress/archives/javafx-binding-in-sequences</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/javafx-binding-in-sequences#comments</comments>
		<pubDate>Fri, 20 Mar 2009 12:41:29 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[javafx]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/?p=729</guid>
		<description><![CDATA[I had a Group of circles, i.e.
var circles:Circle[];
var group:Group = Group { content: [circles] };
strangely, I couldn&#8217;t get newly inserted circles to render. 
It turns out that you have to bind group.content to ensure that changes in circles are reflected in group.content.
Here&#8217;s a test routine.

import javafx.scene.*;
import javafx.scene.paint.*;
import javafx.scene.shape.*;
import javafx.stage.*;

var lines = for (i in [1..10])
 [...]]]></description>
			<content:encoded><![CDATA[<p>I had a Group of circles, i.e.</p>
<p><code>var circles:Circle[];<br />
var group:Group = Group { content: [circles] };</code></p>
<p>strangely, I couldn&#8217;t get newly inserted circles to render. </p>
<p>It turns out that you have to bind group.content to ensure that changes in circles are reflected in group.content.</p>
<p>Here&#8217;s a test routine.</p>
<pre class="brush: java">
import javafx.scene.*;
import javafx.scene.paint.*;
import javafx.scene.shape.*;
import javafx.stage.*;

var lines = for (i in [1..10])
    Line {startX:i*30 startY:20 endX:i*20 endY:500};

var circles = for (i in [1..10])
    Circle {centerX:i*30 centerY:50 radius:20};

Stage
{
    scene: Scene
    {
        content: Group
        {
            content: // bind
            [

                Rectangle {fill:Color.YELLOW width:800 height:500}
                circles,
                lines,

            ]

            onMouseClicked: function(e)
            {
                println(&#039;clicked&#039;);
                insert Circle {fill:Color.RED centerX:e.x centerY:e.y radius:20} into circles;
            }

        }

    }
}
</pre>
<p>Uncomment the <b>//bind</b> and observe the difference.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/javafx-binding-in-sequences/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Applet for Submitting Screenshot</title>
		<link>http://www.redmountainsw.com/wordpress/archives/applet-for-submitting-screenshot</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/applet-for-submitting-screenshot#comments</comments>
		<pubDate>Fri, 06 Mar 2009 13:26:12 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/?p=720</guid>
		<description><![CDATA[Submitting screenshots through the web takes several steps more than it ought to. Firstly we have to paste it into mspaint.exe, save it to disk, only to then fiddle around with the File upload to look for the file again.
Another way to do it is via a signed applet. Unfortunately, the signed applet is unable [...]]]></description>
			<content:encoded><![CDATA[<p>Submitting screenshots through the web takes several steps more than it ought to. Firstly we have to paste it into mspaint.exe, save it to disk, only to then fiddle around with the File upload to look for the file again.</p>
<p>Another way to do it is via a signed applet. Unfortunately, the signed applet is unable to cooperate with the rest of the HTML form to submit multipart posts.</p>
<p>The next best thing is to send the screenshot to a hidden field with a base64 encoded image.</p>
<p><b>Download signed jar with sources</b> <a href='http://www.redmountainsw.com/wordpress/wp-content/uploads/simageuploadapplet.jar'>SImageUploadApplet.jar</a></p>
<p>Here&#8217;s a proof of concept:</p>
<p><a href="http://www.redmountainsw.com/wordpress/wp-content/uploads/imageuploadapplet.png"><img src="http://www.redmountainsw.com/wordpress/wp-content/uploads/imageuploadapplet.png" alt="image upload applet" title="image upload applet" width="548" height="618" class="aligncenter size-full wp-image-721" /></a></p>
<p><b>Download signed jar with sources</b> <a href='http://www.redmountainsw.com/wordpress/wp-content/uploads/simageuploadapplet.jar'>SImageUploadApplet.jar</a></p>
<p>It&#8217;s 2009, perhaps HTML should have a rich text area that can submit inlined images.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/applet-for-submitting-screenshot/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A list of people doing interesting work on the JVM</title>
		<link>http://www.redmountainsw.com/wordpress/archives/jvm-blog</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/jvm-blog#comments</comments>
		<pubDate>Thu, 05 Mar 2009 23:03:08 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jvm]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/archives/a-list-of-people-doing-interesting-work-on-the-jvm</guid>
		<description><![CDATA[Andrew Haley Zero, Shark &#8211; llvm code generators
Gary Benson RedHat. Zero and Shark
Volker Simonis &#8211; SAP JIT group, how to build HotSpot 
Pekka Jato &#8211; JIT compiler for Java
Jevgeni Kabanov Class reloading using serialization to patch runtime instances
I&#8217;m sorry if I missed your name here. Please leave a comment here if you wish to be [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.advogato.org/person/aph/">Andrew Haley</a> Zero, Shark &#8211; llvm code generators</p>
<p><a href="http://gbenson.net/?page_id=120">Gary Benson</a> RedHat. Zero and Shark</p>
<p><a href="http://weblogs.java.net/blog/simonis/">Volker Simonis</a> &#8211; SAP JIT group, how to build HotSpot </p>
<p><a href="http://penberg.blogspot.com/">Pekka</a> <a href="http://jatovm.sourceforge.net/">Jato &#8211; JIT compiler for Java</a></p>
<p><a href="http://www.javarebel.com/">Jevgeni Kabanov</a> <a href="http://blog.araneaframework.org/2006/11/21/zero-turn-around-in-java/">Class reloading using serialization to patch runtime instances</a></p>
<p>I&#8217;m sorry if I missed your name here. Please leave a comment here if you wish to be on the blog roll.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/jvm-blog/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Database Patterns realized with AribaWeb</title>
		<link>http://www.redmountainsw.com/wordpress/archives/database-patterns-realized-with-aribaweb</link>
		<comments>http://www.redmountainsw.com/wordpress/archives/database-patterns-realized-with-aribaweb#comments</comments>
		<pubDate>Sat, 21 Feb 2009 01:56:39 +0000</pubDate>
		<dc:creator>Chui</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[4GL]]></category>
		<category><![CDATA[rad]]></category>

		<guid isPermaLink="false">http://www.redmountainsw.com/wordpress/archives/database-patterns-realized-with-aribaweb</guid>
		<description><![CDATA[Take a look at aribaweb.org (viaTheServerSide). 
AribaWeb is a 4GL RAD for web applications running on a Java stack.
It uses an approach described in data dictionaries as a database pattern to generate metadata-driven UI.
The Ariba toolset seems reasonably mature from the screencasts, although one has to be wary because a lot of the AJAX work [...]]]></description>
			<content:encoded><![CDATA[<p>Take a look at <a href="http://www.aribaweb.org">aribaweb.org</a> (via<a href="http://www.theserverside.com/">TheServerSide</a>). </p>
<p>AribaWeb is a 4GL RAD for web applications running on a Java stack.</p>
<p>It uses an approach described in <a href="http://www.redmountainsw.com/wordpress/archives/4gl-patterns-6-data-dictionaries">data dictionaries as a database pattern</a> to generate metadata-driven UI.</p>
<p>The Ariba toolset seems reasonably mature from the screencasts, although one has to be wary because a lot of the AJAX work appears to be relatively new.</p>
<p>I&#8217;m watching the <a href="http://www.vimeo.com/1840925">MetaUI screencast</a> now, and the bubble style error messages on fields is quite cool. However, cooler still is the use of CSS-like language to mark up how fields are presented. This reduces impedance mismatch between binding data to controls, instead turns data into its representation.</p>
<p>Custom validation rules is specfied using a groovy string. I&#8217;m not sure if this is translated into Javascript on the client-side. The Meta UI specification decoupled from HTML (layout is in named zones), and there is no reason why this couldn&#8217;t be rendered in a RIA.</p>
<p>Actions in UI on a POJO is declared via an annotation (similar to Naked Objects). However, the actions seem to be more restrictive in the sense that the methods must not take any arguments.</p>
<p>e.g.</p>
<pre class="brush: java">
@Action(message=&quot;Account Suspended&quot;)
@Visible(&quot;! $object.isSuspended&quot;)
void suspendAccount() {
...
}
</pre>
<p>Overall, AribaWeb looks very polished. I haven&#8217;t had a look at the underlying libraries used<sup>1</sup>, but I look forward to delve into it further.</p>
<h2>Footnotes</h2>
<p><sup>1</sup>There was a mention of JPA and Hibernate. (Is the display layer JSF?)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.redmountainsw.com/wordpress/archives/database-patterns-realized-with-aribaweb/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
