<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1082280389519172718</id><updated>2011-04-22T05:40:48.168+02:00</updated><category term='Mac OS X'/><category term='NTFS'/><category term='Ubuntu'/><category term='Storage'/><category term='Glassfish'/><category term='Java'/><category term='Apple'/><category term='JEE'/><category term='Linux'/><category term='Open Source'/><title type='text'>Computing with Jasper</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://computingwithjasper.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1082280389519172718/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://computingwithjasper.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Jasper Kalkers</name><uri>http://www.blogger.com/profile/07517030554218383428</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1082280389519172718.post-5772300714989276223</id><published>2008-01-17T21:58:00.000+01:00</published><updated>2008-01-17T22:26:05.215+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Storage'/><category scheme='http://www.blogger.com/atom/ns#' term='NTFS'/><category scheme='http://www.blogger.com/atom/ns#' term='Open Source'/><category scheme='http://www.blogger.com/atom/ns#' term='Apple'/><category scheme='http://www.blogger.com/atom/ns#' term='Mac OS X'/><title type='text'>Reading and writing ntfs on Mac OS X</title><content type='html'>&lt;div&gt;An external hard drive always comes in handy. Most of the time, such hard drives are formatted with the FAT32 filesystem. Most of the time that works well. A big advantage is that all operating systems can read and write such a filesystem. A big disadvantage is the fact that the maximum file size is 4&lt;a href="http://en.wikipedia.org/wiki/GiB"&gt;GiB&lt;/a&gt;. That makes storing big DVD images on a FAT32 drive troublesome.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;On Windows, a simple solution exists: using the newer ntfs file system. The support for ntfs is much lower. Reading ntfs is reasonably widespread (e.g. Mac OS X). Writing is much more rare. Some linux distributions support it (e.g. Ubuntu).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In my case I wanted to use my external hard drive with three different operating systems: Windows XP, Ubuntu Linux and Mac OS X. The first two have out of the box support for reading and writing to ntfs file systems. The last only has read support.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;However. A solution is right around the corner. Thanks to the following open source projects:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://code.google.com/p/macfuse/"&gt;MacFuse&lt;/a&gt; (by Google)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://macntfs-3g.blogspot.com/"&gt;NTFS-3G&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Download the latest stable versions. I downloaded &lt;a href="http://macfuse.googlecode.com/files/MacFUSE-Core-10.5-1.3.1.dmg"&gt;MacFUSE-Core-10.5-1.3.1.dmg&lt;/a&gt; and &lt;a href="http://hem.bredband.net/unsound/ntfs-3g/NTFS-3G_1.1120-stable-catacombae.dmg"&gt;NTFS-3G_1.1120-stable-catacombae.dmg&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;Install MacFuse first. Restart your mac when asked to. Next install NTFS-3G and reboot again if asked.&lt;/div&gt;&lt;div&gt;After that, no configuration is necessary. External hard drives formatted with NTFS will work with no extra care.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1082280389519172718-5772300714989276223?l=computingwithjasper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computingwithjasper.blogspot.com/feeds/5772300714989276223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1082280389519172718&amp;postID=5772300714989276223' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1082280389519172718/posts/default/5772300714989276223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1082280389519172718/posts/default/5772300714989276223'/><link rel='alternate' type='text/html' href='http://computingwithjasper.blogspot.com/2008/01/reading-and-writing-ntfs-on-mac-os-x.html' title='Reading and writing ntfs on Mac OS X'/><author><name>Jasper Kalkers</name><uri>http://www.blogger.com/profile/07517030554218383428</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1082280389519172718.post-6150244759228271225</id><published>2008-01-15T14:21:00.001+01:00</published><updated>2008-04-06T16:07:48.243+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JEE'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Open Source'/><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Glassfish'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Installing Glassfish 2 on ubuntu 7.10</title><content type='html'>Today I decided to install Glassfish on my Ubuntu 7.10 box. It had come to my attention that Glassfish was a standard package for Ubuntu, so I started the package manager and checked Glassfish for installation. All went well until I found out Glassfish 1 was just installed.&lt;div style="text-align: left;"&gt;Bummer. I had assumed version 2 was packaged. I undid the installation together with the dependencies.&lt;/div&gt;&lt;div style="text-align: left;"&gt;I don't really like installing Linux software without the standard package manager, but I decided to make an exception for Glassfish. Below I describe my findings.&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;I started looking for a blog/tutorial that describes the installation process and I found &lt;a href="http://blogs.warwick.ac.uk/spoonerandrew/entry/glassfish_on_ubuntu/"&gt;a decent one&lt;/a&gt;. I followed the instructions and it worked as intended. Thank you Andrew Spooner. It even contained a init.d script for starting and stopping with the rest of the system. However I didn't like all of it, most importantly the fact that Glassfish ran with root privileges (that is not a very good idea). &lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;My requirements for the Glassfish installation are:&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;ul&gt;&lt;li&gt;it must run as a non privileged system user&lt;/li&gt;&lt;li&gt;it must start before Apache and after MySQL. Apache links to Glassfish and Glassfish uses MySQL. Shutdown must be the exact opposite.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;Here is how I achieved those requirements:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;1. Preparation&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Download the binary most recent stable binary build for linux from the &lt;a href="https://glassfish.dev.java.net/public/downloadsindex.html"&gt;Glassfish site&lt;/a&gt;. I downloaded &lt;a href="http://java.net/download/javaee5/v2ur1/promoted/Linux/glassfish-installer-v2ur1-b09d-linux.jar"&gt;version 2 UR 1&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Make sure you have installed a java jdk. I use the sun jdk 6. You can install it like this:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;code&gt;sudo apt-get install sun-java6-jdk&lt;/code&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Create a system user called glassfish:&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;code&gt;sudo adduser --system glassfish&lt;/code&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;2. Installation&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;The unpack and installation must be run as the newly created glassfish user. First copy the installation file (in my case glassfish-installer-v2ur1-b09d-linux.jar) to /tmp. After that unpack the installation file as the glassfish user. I use /tmp, because the glassfish user has write permissions there. You could use any directory that the glassfish user has write permissions to.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;&lt;blockquote&gt;&lt;code&gt;sudo -u glassfish java -Xmx256M -jar glassfish-installer-v2ur1-b09d-linux.jar&lt;/code&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Move the glassfish directory to opt:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;code&gt;sudo mv glassfish /opt&lt;/code&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;To be able to traverse the glassfish directory without root privileges,  you must change the group of all files in the glassfish directory from nogroup to admin.:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;code&gt;sudo chgrp -R admin /opt/glassfish/&lt;/code&gt;&lt;/blockquote&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;3. Configuration&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Glassfish comes with a configuration script, which creates a server instance. Next are the steps to run that script.&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Go to the glassfish directory with the installation:&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;code&gt;cd /opt/glassfish/&lt;/code&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Glassfish comes with a custom version of ant. Make the ant scripts executable:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;code&gt;sudo chmod -R +x lib/ant/bin/&lt;/code&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Run the configuration script:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;code&gt;sudo -u glassfish lib/ant/bin/ant -f setup.xml&lt;/code&gt;&lt;/blockquote&gt;This should end with the message: "BUILD SUCCESSFUL"&lt;br /&gt;&lt;div&gt;After this, Glassfish is installed. You can test your installation by starting Glassfish in the console window:&lt;/div&gt;&lt;blockquote&gt;&lt;code&gt;sudo -u glassfish bin/asadmin start-domain domain1&lt;/code&gt;&lt;/blockquote&gt;You can open a browser and go to the admin-console at &lt;a href="http://localhost:4848/"&gt;http://localhost:4848/&lt;/a&gt;. Login as user "admin" and password "adminadmin".&lt;/div&gt;&lt;div&gt;If this all works: congratulations. You have successfully installed Glashfish!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now we need to make sure Glassfish starts when the computer boots up and that it shuts down when the computer shuts down.&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;With an editor, create the file /etc/init.d/glassfish (e.g. by &lt;code&gt;sudo gedit /etc/init.d/glassfish&lt;/code&gt;) with the following contents:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;code&gt;#! /bin/sh&lt;br /&gt;&lt;br /&gt;GLASSFISHPATH=/opt/glassfish/bin&lt;br /&gt;&lt;br /&gt;case "$1" in&lt;br /&gt;start)&lt;br /&gt;echo "starting glassfish from $GLASSFISHPATH"&lt;br /&gt;sudo -u glassfish $GLASSFISHPATH/asadmin start-domain domain1&lt;br /&gt;;;&lt;br /&gt;restart)&lt;br /&gt;$0 stop&lt;br /&gt;$0 start&lt;br /&gt;;;&lt;br /&gt;stop)&lt;br /&gt;echo "stopping glassfish from $GLASSFISHPATH"&lt;br /&gt;sudo -u glassfish $GLASSFISHPATH/asadmin stop-domain domain1&lt;br /&gt;;;&lt;br /&gt;*)&lt;br /&gt;echo $”usage: $0 {start|stop|restart}”&lt;br /&gt;exit 3&lt;br /&gt;;;&lt;br /&gt;esac&lt;br /&gt;:&lt;br /&gt;&lt;/code&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Make the init script executable:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;code&gt;sudo chmod a+x /etc/init.d/glassfish&lt;/code&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;Test the script by stopping the currently running server:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;code&gt;sudo /etc/init.d/glassfish stop&lt;/code&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;After that, try starting it with the init script:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;code&gt;sudo /etc/init.d/glassfish start&lt;/code&gt;&lt;/blockquote&gt;&lt;ul&gt;&lt;li&gt;If all goes well you can set the init script up for automatic startup and shutdown:&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;code&gt;sudo update-rc.d glassfish defaults 90 10&lt;/code&gt;&lt;/blockquote&gt;&lt;div&gt;When you start the computer the next time, Glassfish will be running with the privileges of the glassfish user.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Have fun with Glassfish!&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;4. Optional components&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;Below are some things you probably need, depending on your requirements.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;4.1. MySQL&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;I will not discuss a complete MySQL installation here, but only the installation of the MySQL jdbc driver. Install the jdbc driver as follows:&lt;/div&gt;&lt;blockquote&gt;&lt;code&gt;sudo apt-get install libmysql-java&lt;/code&gt;&lt;/blockquote&gt;Next, create a symbolic link in the lib directory of Glassfish to an existing symbolic link to the most recent MySQL jdbc driver:&lt;/div&gt;&lt;blockquote&gt;&lt;code&gt;sudo -u glassfish ln -s /usr/share/java/mysql-connector-java.jar /opt/glassfish/lib/&lt;/code&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;4.2. Using awt classes&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;I have a web application that manipulates some pictures with the use of some awt classes. Unfortunately, that resulted in some nasty exceptions on my linux box. After some research, I found out that it was caused by the fact that the linux version of java uses X11 for the awt classes. A fix for the exceptions is using a certain jvm option:&lt;/div&gt;&lt;blockquote&gt;&lt;code&gt;-Djava.awt.headless=true&lt;/code&gt;&lt;/blockquote&gt;You can add this option for Glassfish in the admin console under Application Server-&gt;JVM Settings-&gt;JVM Options.&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1082280389519172718-6150244759228271225?l=computingwithjasper.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computingwithjasper.blogspot.com/feeds/6150244759228271225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1082280389519172718&amp;postID=6150244759228271225' title='28 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1082280389519172718/posts/default/6150244759228271225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1082280389519172718/posts/default/6150244759228271225'/><link rel='alternate' type='text/html' href='http://computingwithjasper.blogspot.com/2008/01/installing-glassfish-2-on-ubuntu-710.html' title='Installing Glassfish 2 on ubuntu 7.10'/><author><name>Jasper Kalkers</name><uri>http://www.blogger.com/profile/07517030554218383428</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>28</thr:total></entry></feed>
