<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Developing Code, Connecting Industry &#187; Damien Gabrielson</title>
	<atom:link href="http://devblog.point2.com/author/dgp2/feed/" rel="self" type="application/rss+xml" />
	<link>http://devblog.point2.com</link>
	<description>World-Class Software Development</description>
	<lastBuildDate>Tue, 16 Mar 2010 12:36:08 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='devblog.point2.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/ba2be9339ebd2a15ca42abd36b7730b5?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Developing Code, Connecting Industry &#187; Damien Gabrielson</title>
		<link>http://devblog.point2.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://devblog.point2.com/osd.xml" title="Developing Code, Connecting Industry" />
	<atom:link rel='hub' href='http://devblog.point2.com/?pushpress=hub'/>
		<item>
		<title>Basic Hibernate @OneToOne @PrimaryKeyJoinColumn Example With Maven and MySQL</title>
		<link>http://devblog.point2.com/2009/11/14/basic-hibernate-onetoone-primarykeyjoincolumn-example-with-maven-and-mysql/</link>
		<comments>http://devblog.point2.com/2009/11/14/basic-hibernate-onetoone-primarykeyjoincolumn-example-with-maven-and-mysql/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 15:33:04 +0000</pubDate>
		<dc:creator>Damien Gabrielson</dc:creator>
				<category><![CDATA[Point2 - Technical]]></category>
		<category><![CDATA[annotation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[foreign key]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[jar]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java 6]]></category>
		<category><![CDATA[jdk 1.6]]></category>
		<category><![CDATA[join]]></category>
		<category><![CDATA[many to one]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[mvn]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[one to many]]></category>
		<category><![CDATA[one to one]]></category>
		<category><![CDATA[persistence]]></category>
		<category><![CDATA[primary key]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://devblog.point2.com/?p=1047</guid>
		<description><![CDATA[Recently we had a story which involved improving one of our data models. The table for the model had grown quite wide and we wanted to improve normalization and performance. We wanted to move a few columns from our original table (Listing) to a new table with the primary key of the new table (ListingLocation) [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.point2.com&blog=6423353&post=1047&subd=point2blog&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Recently we had a <a href="http://www.agilemodeling.com/artifacts/userStory.htm">story</a> which involved improving one of our data models. The table for the model had grown quite wide and we wanted to improve normalization and performance. We wanted to move a few columns from our original table (Listing) to a new table with the primary key of the new table (ListingLocation) also being a foreign key to the primary key of the original table, our <a href="http://www.xylax.net/hibernate/onetoone.html">one-to-one relationship</a>. I will try to detail how we accomplished this change using a simplified example. Source code is linked at the bottom of this post.</p>
<p>Here is the entity relationship diagram of the old, single table structure:<br />
<img class="alignnone size-full wp-image-1080" title="ERD-old" src="http://point2blog.files.wordpress.com/2009/11/erd-old.png?w=175&#038;h=98" alt="Old ER Diagram" width="175" height="98" /><br />
And here is the entity relationship diagram of the new, two table structure:<br />
<img class="alignnone size-full wp-image-1081" title="ERD-new" src="http://point2blog.files.wordpress.com/2009/11/erd-new.png?w=377&#038;h=82" alt="New ER Diagram" width="377" height="82" /></p>
<p>As you can see, it is a very simple example of a very common relationship in the database. However, what we found when implementing this in <a href="https://www.hibernate.org/">Hibernate</a> was not a simple as I had hoped.</p>
<p>To get started here is the SQL used to represent our new tables:<br />
<code><br />
CREATE TABLE Listing<br />
(<br />
id BIGINT(20) NOT NULL AUTO_INCREMENT,<br />
price DECIMAL(10,2),<br />
PRIMARY KEY (id)<br />
) TYPE = INNODB;</code><br />
<code><br />
CREATE TABLE ListingLocation<br />
(<br />
listingID BIGINT(20) NOT NULL,<br />
address VARCHAR(255),<br />
PRIMARY KEY(listingID),<br />
INDEX (listingID),<br />
FOREIGN KEY (listingID) REFERENCES Listing (id)<br />
) TYPE = INNODB;<br />
</code></p>
<p>I&#8217;ve used MySQL for this example because it is free and easy to setup. InnoDB table types have been because they allow <a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html">foreign keys</a>, which is crucial to this example.</p>
<p>Our old Listing entity was pretty basic; it looked something like this (imports &amp; getters/setters excluded):<br />
<code><br />
@Entity<br />
@Table<br />
public class Listing implements Serializable {<br />
@Id<br />
@GeneratedValue<br />
private long id;<br />
@Column(columnDefinition= "DECIMAL(10,2)")<br />
private double price;<br />
private String address;<br />
...<br />
</code><br />
In this case, creating a new instance of Listing and persisting it is very easy. When we split the entities, it becomes a little more complicated. Here is what our entities looked like after being split:<br />
<code><br />
@Entity<br />
@Table<br />
public class Listing implements Serializable {<br />
@Id<br />
@GeneratedValue<br />
private long id;<br />
@Column(columnDefinition= "DECIMAL(10,2)")<br />
private double price;<br />
@OneToOne<br />
@PrimaryKeyJoinColumn<br />
private ListingLocation listingLocation;<br />
...<br />
</code><br />
and<br />
<code><br />
@Entity<br />
@Table<br />
public class ListingLocation implements Serializable {<br />
@Id<br />
@Column(name = "listingID")<br />
private Long id;<br />
private String address;<br />
...<br />
</code></p>
<p>The differences are not large, but there are a couple important points to note:</p>
<ul>
<li>Adding ListingLocation to Listing with @OneToOne &amp; @PrimaryKeyJoinColumn annotations tells Hibernate the Listing has a one-to-one mapping with ListingLocation by using the Primary Key as the join column.</li>
<li>Adding @Id &amp; @Column(name = &#8220;listingID&#8221;) annotations to our id field in ListingLocation tells Hibernate that id is, well, an ID, but that column should not be called &#8220;id&#8221; in the DB, but &#8220;listingID&#8221; as that will help an observer see the relationship quickly without looking closely at the schema. Also, it is good to note that the @GeneratedValue is not on &#8220;id&#8221; in ListingLocation as it is in Listing as we want to specify exactly what goes in that field.</li>
</ul>
<p>The biggest gripe I have with using the one-to-one relationship is that we can no longer save Listing only. Our REAL Listing entity is far more complex with several relationships, but this was the first one-to-one relationship with Hibernate. Previously we could do something like:<br />
<code><br />
Listing listing = new Listing();<br />
listing.setPrice(price);<br />
listing.setAddress(address);<br />
listing.setFoo(foo); // where foo is a @OneToMany annotated entity<br />
...<br />
<strong>session.save(listing);</strong><br />
</code><br />
Now, we must save Listing and ListingLocation separately like this:<br />
<code><br />
ListingLocation listingLocation = new ListingLocation();<br />
listingLocation.setAddress(address);<br />
Listing listing = new Listing();<br />
listing.setPrice(price);<br />
listing.setListingLocation(listingLocation);<br />
...<br />
<strong>session.save(listing);</strong><br />
if (listing.getListingLocation() != null) {<br />
listing.getListingLocation().setId(listing.getId());<br />
<strong>session.save(listing.getListingLocation()); // save ListingLocation</strong><br />
}<br />
</code></p>
<p>I guess I&#8217;m just a bit spoiled, but I was hoping that this would bit more automatic, as it is with the one-to-many/many-to-one relationships.</p>
<p style="text-align:left;">I have written a small app that uses these two entities and inserts a row into each table, the link is available at the bottom of this post. The config (hibernate.cfg.xml) expects that you have MySQL running on 127.0.0.1 with a DB named &#8216;OneToOneDemo&#8217; with a user named &#8216;root&#8217; and a password of &#8216;password&#8217;; I have included the SQL (Setup-OneToOneDemo.sql) to setup the DB. Just extract the contents of the archive, navigate to the project directory, and from the command line/terminal run:<br />
<code><br />
mvn clean compile exec:java -Dexec.mainClass=com.point2.onetoonedemo.App -e<br />
</code></p>
<p>You should see the following output:<br />
<code><br />
@OneToOne @PrimaryKeyJoinColumn Hibernate Demo<br />
----------------------------------------------<br />
...<br />
Hibernate:<br />
insert into Listing (price) values (?)</code></p>
<p><code>Hibernate:<br />
insert into ListingLocation (address, listingID) values (?, ?)<br />
Saved listing ID: 1<br />
</code></p>
<p><a href="http://sites.google.com/site/gabrielsond/home/OneToOneDemo.zip?attredirects=0&amp;d=1">Download Source Code</a> (12 KB .ZIP)</p>
<p>If you have any questions, comments, or suggestions on how to do better accomplish one-to-one Hibernate mappings, I would love to hear about them. If you have any problems getting the code to compile and/or run, please let me know and I will make the necessary changes. Everything should just work, providing you modify the hibernate config or setup your DB. I had a difficult time finding complete and recent documentation on this subject so I hope this post and the maven project will help.</p>
<p>By: <a href="http://devblog.point2.com/author/dgp2/" target="_blank">Damien Gabrielson</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/point2blog.wordpress.com/1047/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/point2blog.wordpress.com/1047/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/point2blog.wordpress.com/1047/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/point2blog.wordpress.com/1047/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/point2blog.wordpress.com/1047/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/point2blog.wordpress.com/1047/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/point2blog.wordpress.com/1047/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/point2blog.wordpress.com/1047/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/point2blog.wordpress.com/1047/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/point2blog.wordpress.com/1047/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.point2.com&blog=6423353&post=1047&subd=point2blog&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.point2.com/2009/11/14/basic-hibernate-onetoone-primarykeyjoincolumn-example-with-maven-and-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5c45964d548db14dd7f09a23759f756e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Damien G.</media:title>
		</media:content>

		<media:content url="http://point2blog.files.wordpress.com/2009/11/erd-old.png" medium="image">
			<media:title type="html">ERD-old</media:title>
		</media:content>

		<media:content url="http://point2blog.files.wordpress.com/2009/11/erd-new.png" medium="image">
			<media:title type="html">ERD-new</media:title>
		</media:content>
	</item>
		<item>
		<title>Maven Projects In NetBeans 6.5 On OSX / Updating Maven On OSX</title>
		<link>http://devblog.point2.com/2009/05/01/maven-projects-in-netbeans-65-on-osx-updating-maven-on-osx/</link>
		<comments>http://devblog.point2.com/2009/05/01/maven-projects-in-netbeans-65-on-osx-updating-maven-on-osx/#comments</comments>
		<pubDate>Fri, 01 May 2009 20:44:38 +0000</pubDate>
		<dc:creator>Damien Gabrielson</dc:creator>
				<category><![CDATA[Point2 - Technical]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[mvn]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[netbeans 6.5]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[terminal]]></category>

		<guid isPermaLink="false">http://devblog.point2.com/?p=402</guid>
		<description><![CDATA[Since my last post, Defaulting To JDK 1.6 In NetBeans 6.5 On OSX, has enjoyed some popularity I decided to keep running with the NetBeans 6.5/OS X theme. NetBeans is a great, free IDE that supports more types of projects than the average developer would likely ever need. One of the most useful project types [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.point2.com&blog=6423353&post=402&subd=point2blog&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>Since my last post, <a href="http://devblog.point2.com/2009/02/17/defaulting-to-jdk-16-in-netbeans-65-on-osx/">Defaulting To JDK 1.6 In NetBeans 6.5 On OSX</a>, has enjoyed some popularity I decided to keep running with the NetBeans 6.5/OS X theme. <a href="http://www.netbeans.org/">NetBeans</a> is a great, free IDE that supports more types of projects than the average developer would likely ever need. One of the most useful project types that NetBeans supports is <a href="http://maven.apache.org/">Maven</a> projects. If you are new to Maven, <a href="http://maven.apache.org/what-is-maven.html">here</a> is an intro to peak your interest.</p>
<p>For developers who have been using Maven for a while, you likely will be creating your projects (.pom files specifically) from a text editor but this can be a little overwhelming for those new to Maven or those who would rather simply spend their time writing code instead. NetBeans 6.5 makes it incredibly easy to create a Maven project in a matter of seconds. </p>
<p>First, go to the &#8220;File&#8221; menu and choose &#8220;New Project&#8221;.<br />
<a href="http://point2blog.files.wordpress.com/2009/05/picture-0.png"><img src="http://point2blog.files.wordpress.com/2009/05/picture-0.png?w=300&#038;h=144" alt="New Project" title="New Project" width="300" height="144" class="alignnone size-medium wp-image-404" /></a><br />
Under &#8220;Categories&#8221;, choose &#8220;Maven&#8221; and in&#8221;Projects&#8221;, choose &#8220;Maven Project&#8221; and click &#8220;Next&#8221;.<br />
<a href="http://point2blog.files.wordpress.com/2009/05/picture-1.png"><img src="http://point2blog.files.wordpress.com/2009/05/picture-1.png?w=300&#038;h=216" alt="Choose Project" title="Choose Project" width="300" height="216" class="alignnone size-medium wp-image-405" /></a><br />
The &#8220;Archetype&#8221; window should open next, select &#8220;Maven Quickstart Archetype&#8221; and click &#8220;Next&#8221;.<br />
<a href="http://point2blog.files.wordpress.com/2009/05/picture-2.png"><img src="http://point2blog.files.wordpress.com/2009/05/picture-2.png?w=300&#038;h=216" alt="Project Archetype" title="Project Archetype" width="300" height="216" class="alignnone size-medium wp-image-406" /></a><br />
The &#8220;Name and Location&#8221; window will open allowing you to give specifics to your project. You can customize this as you see fit but for the purposes of this example I will leave the default settings. Click &#8220;Finish&#8221; and your project will start to build.<br />
<a href="http://point2blog.files.wordpress.com/2009/05/picture-3.png"><img src="http://point2blog.files.wordpress.com/2009/05/picture-3.png?w=300&#038;h=179" alt="Project Name &amp; Location" title="Project Name &amp; Location" width="300" height="179" class="alignnone size-medium wp-image-407" /></a><br />
If you are running OS X 10.5.6, as I am, you will likely see the following error:<br />
<code><br />
------------------------------------------------------------------------<br />
[ERROR]BUILD ERROR<br />
------------------------------------------------------------------------<br />
Error resolving version for 'org.apache.maven.plugins:maven-archetype-plugin': <strong>Plugin requires Maven version 2.0.7</strong><br />
------------------------------------------------------------------------<br />
For more information, run Maven with the -e switch<br />
</code></p>
<p>The reason for this is that OS X 10.5 shipped with Maven 2.0.6 pre-installed but Apple has never pushed any updates to it. According to the Apache archives, Maven 2.0.6 was released in April 2007 but it is kind of annoying that they didn&#8217;t realize that Maven projects would not work by default on OS X before they released NetBeans 6.5. Luckily, it is very easy to update Maven to the latest version if you don&#8217;t mind using the terminal and the <code>sudo</code> command.</p>
<ol>
<li><a href="http://maven.apache.org/download.html">Download</a> the zip with binaries for whichever Maven version you would like to install. At time of writing, the most recent version is 2.1.0, <a href="http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-2.1.0-bin.zip">http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-2.1.0-bin.zip</a>.</li>
<li>Once the file is downloaded, you can extract the archive and you should end up with a directory named something like &#8220;apache-maven-2.1.0&#8243;. Open a Terminal window and <code>cd /usr/share</code></li>
<li>Let&#8217;s move the current Maven directory to a backup folder in case we ever want to revert. In the terminal you opened in the last step, type <code>sudo mv maven maven-2.0.6</code>. This will ask you for your password and then move the &#8220;maven&#8221; directory to a new directory called &#8220;maven-2.0.6&#8243;, assuming your user account has sufficient permissions.</li>
<li>Now let&#8217;s put the new version in place so that NetBeans will start using it. To do so, we need to copy the directory we extracted from the zip file. Once again, in the Terminal window you have open, type <code>sudo cp -R /Users/dgabrielson/Desktop/apache-maven-2.1.0 maven</code>. Keep in mind that the path to the extracted &#8220;apache-maven-2.1.0&#8243; directory will have to be changed to the appropriate path on your system.</li>
<li>Maven should now be upgraded! To confirm, in your Terminal window, type <code>mvn -version</code> and you should see some output like <code>Apache Maven 2.1.0 (r755702; 2009-03-18 13:10:27-0600)</code>.</li>
</ol>
<p>Now if you try to build again, you should get a successful build log ending with:<br />
<code><br />
------------------------------------------------------------------------<br />
BUILD SUCCESSFUL<br />
------------------------------------------------------------------------<br />
</code></p>
<p>Enjoy your new Maven build and get coding!</p>
<p>By: <a href="http://devblog.point2.com/author/dgp2/">Damien Gabrielson</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/point2blog.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/point2blog.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/point2blog.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/point2blog.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/point2blog.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/point2blog.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/point2blog.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/point2blog.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/point2blog.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/point2blog.wordpress.com/402/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.point2.com&blog=6423353&post=402&subd=point2blog&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.point2.com/2009/05/01/maven-projects-in-netbeans-65-on-osx-updating-maven-on-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5c45964d548db14dd7f09a23759f756e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Damien G.</media:title>
		</media:content>

		<media:content url="http://point2blog.files.wordpress.com/2009/05/picture-0.png?w=300" medium="image">
			<media:title type="html">New Project</media:title>
		</media:content>

		<media:content url="http://point2blog.files.wordpress.com/2009/05/picture-1.png?w=300" medium="image">
			<media:title type="html">Choose Project</media:title>
		</media:content>

		<media:content url="http://point2blog.files.wordpress.com/2009/05/picture-2.png?w=300" medium="image">
			<media:title type="html">Project Archetype</media:title>
		</media:content>

		<media:content url="http://point2blog.files.wordpress.com/2009/05/picture-3.png?w=300" medium="image">
			<media:title type="html">Project Name &#38; Location</media:title>
		</media:content>
	</item>
		<item>
		<title>Defaulting To JDK 1.6 In NetBeans 6.5 On OSX</title>
		<link>http://devblog.point2.com/2009/02/17/defaulting-to-jdk-16-in-netbeans-65-on-osx/</link>
		<comments>http://devblog.point2.com/2009/02/17/defaulting-to-jdk-16-in-netbeans-65-on-osx/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 15:18:09 +0000</pubDate>
		<dc:creator>Damien Gabrielson</dc:creator>
				<category><![CDATA[Point2 - Technical]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java 6]]></category>
		<category><![CDATA[java_home]]></category>
		<category><![CDATA[jdk]]></category>
		<category><![CDATA[jdk 1.6]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[netbeans 6.5]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[Point2]]></category>

		<guid isPermaLink="false">http://point2blog.wordpress.com/?p=48</guid>
		<description><![CDATA[We try to stay current with our technologies at Point2. An example of this is using the most recent Java platform, Java 6 (JDK 1.6) and modern IDEs such as NetBeans 6.5. However, staying up to date with technology is not always as simple as it could be. Java 6 was released in December 2006 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.point2.com&blog=6423353&post=48&subd=point2blog&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>We try to stay current with our technologies at Point2. An example of this is using the most recent Java platform, Java 6 (JDK 1.6) and modern IDEs such as NetBeans 6.5. However, staying up to date with technology is not always as simple as it could be. Java 6 was released in December 2006 and NetBeans 6.5 was released almost 2 years later in November 2008 and yet it still wants to use Java 5 (JDK 1.5) as the default Java Platform, regardless of what you have set in the OSX Java preferences. Here is how you can set NetBeans 6.5 to use JDK 1.6 by default.</p>
<ul>
<li>Ensure that JDK 1.6 and NetBeans 6.5 are installed</li>
<li>Locate the NetBeans config file, typically located at &#8220;/Applications/NetBeans/NetBeans 6.5.app/Contents/Resources/NetBeans/etc/netbeans.conf&#8221; and open the file in your favourite editor</li>
<li>Set the &#8220;netbeans_jdkhome&#8221; parameter to the JDK 1.6 home directory (ie. netbeans_jdkhome=<br />
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home)</li>
<li>In NetBeans, right click on the project in the project window and select &#8220;Properties&#8221;</li>
<li>Ensure the &#8220;Source/Binary Format&#8221; is set to &#8220;1.6&#8243;<br />
<a href="http://i43.tinypic.com/oh60ep.png" target="_blank"><img src="http://i44.tinypic.com/2ptueeu.png" border="0" alt="" /></a></li>
<li>Click on &#8220;Tools&#8221; on the toolbar and select &#8220;Java Platforms&#8221;</li>
<li>Under &#8220;J2SE&#8221; the default platform should now be &#8220;JDK 1.6&#8243;<br />
<a href="http://i41.tinypic.com/2wp7bxi.png" target="_blank"><img src="http://i43.tinypic.com/v66qzn.png" border="0" alt="" /></a></li>
</ul>
<p>By: <a href="http://devblog.point2.com/author/dgp2/" target="_blank">Damien Gabrielson</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/point2blog.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/point2blog.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/point2blog.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/point2blog.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/point2blog.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/point2blog.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/point2blog.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/point2blog.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/point2blog.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/point2blog.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=devblog.point2.com&blog=6423353&post=48&subd=point2blog&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://devblog.point2.com/2009/02/17/defaulting-to-jdk-16-in-netbeans-65-on-osx/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/5c45964d548db14dd7f09a23759f756e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Damien G.</media:title>
		</media:content>

		<media:content url="http://i44.tinypic.com/2ptueeu.png" medium="image" />

		<media:content url="http://i43.tinypic.com/v66qzn.png" medium="image" />
	</item>
	</channel>
</rss>