<?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>Benjamin Sherman &#187; java</title>
	<atom:link href="http://holyarmy.org/tag/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://holyarmy.org</link>
	<description>I have to have a tagline?</description>
	<lastBuildDate>Wed, 02 Jun 2010 06:06:06 +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>Have fun RESTing!</title>
		<link>http://holyarmy.org/2010/01/have-fun-resting/</link>
		<comments>http://holyarmy.org/2010/01/have-fun-resting/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 10:46:59 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[dev]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://holyarmy.org/?p=416</guid>
		<description><![CDATA[Cheesy post titles aside&#8230;
I just discovered the very simple but incredibly useful RESTClient at: http://code.google.com/p/rest-client/ .
It&#8217;s a simple Java GUI app for testing out one&#8217;s REST services. You can choose your: URL, HTTP method, add any custom headers, add a body for PUT/POST, set auth info, SSL info, and do simple scripting.
This is an incredibly [...]]]></description>
			<content:encoded><![CDATA[<p>Cheesy post titles aside&#8230;</p>
<p>I just discovered the very simple but incredibly useful <strong>RESTClient</strong> at: <a href="http://code.google.com/p/rest-client/">http://code.google.com/p/rest-client/</a> .</p>
<p>It&#8217;s a simple Java GUI app for testing out one&#8217;s REST services. You can choose your: URL, HTTP method, add any custom headers, add a body for PUT/POST, set auth info, SSL info, and do simple scripting.</p>
<p>This is an incredibly useful tool, AND a far cry better than doing it all on the command line with curl.</p>
<p>Thanks @subwiz (the project owner)!</p>
]]></content:encoded>
			<wfw:commentRss>http://holyarmy.org/2010/01/have-fun-resting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VPN on Ubuntu Linux with Juniper Network Connect</title>
		<link>http://holyarmy.org/2009/06/vpn-on-ubuntu-linux-with-juniper-network-connect/</link>
		<comments>http://holyarmy.org/2009/06/vpn-on-ubuntu-linux-with-juniper-network-connect/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 23:13:25 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networks]]></category>
		<category><![CDATA[64 bit]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[juniper]]></category>
		<category><![CDATA[network connect]]></category>
		<category><![CDATA[VPN]]></category>

		<guid isPermaLink="false">http://holyarmy.org/?p=399</guid>
		<description><![CDATA[There&#8217;s one standard document on HOWTO get Network Connect working on Ubuntu Linux. It&#8217;s mad scientist&#8217;s doc: http://mad-scientist.us/juniper.html . However, there are a few things not covered. I&#8217;ll assume that you&#8217;ve followed mad scientist&#8217;s excellent guide before going any further.
Issue #1: 64-bit Ubuntu
By default, when you install java on your 64-bit system, you get a 64-bit [...]]]></description>
			<content:encoded><![CDATA[<p>There&#8217;s one standard document on HOWTO get Network Connect working on Ubuntu Linux. It&#8217;s mad scientist&#8217;s doc: <a href="http://mad-scientist.us/juniper.html">http://mad-scientist.us/juniper.html</a> . However, there are a few things not covered. I&#8217;ll assume that you&#8217;ve followed mad scientist&#8217;s excellent guide before going any further.</p>
<h3>Issue #1: 64-bit Ubuntu</h3>
<p>By default, when you install java on your 64-bit system, you get a 64-bit java. No surprise there, right? Well, Juniper&#8217;s tools don&#8217;t play nice with 64-bit java. If you attempt to start the <strong>junipernc</strong> script you&#8217;ll promptly see the &#8220;VPN has failed!&#8221; error message.</p>
<div id="attachment_400" class="wp-caption alignnone" style="width: 214px"><img class="size-full wp-image-400" src="http://holyarmy.org/files/2009/06/screenshot-network-connect-vpn.png" alt="VPN has failed!" width="204" height="168" /><p class="wp-caption-text">VPN has failed!</p></div>
<p>Also if you look closely in your Terminal you&#8217;ll see the text error:</p>
<blockquote>
<pre>Failed to load the ncui library.</pre>
</blockquote>
<p>This is the clue that we are dealing with the 64-bit issue.</p>
<p>The work around for this is to install a 32-bit java on your system. Type the following into your Terminal:</p>
<blockquote>
<pre>sudo apt-get install ia32-sun-java6-bin</pre>
</blockquote>
<p>After typing your password, a 32-bit copy of java will be installed at: <em>/usr/lib/jvm/ia32-java-6-sun </em>.</p>
<p>Now, you need to convince Juniper Network Connect to use the 32-bit java. If you don&#8217;t use java for much besides your new VPN, you may just want to make the 32-bit java your default. This can be done by typing the following into your Terminal:</p>
<blockquote>
<pre>update-alternatives --set java /usr/lib/jvm/ia32-java-6-sun/jre/bin/java</pre>
</blockquote>
<p>If you DO use java and just want to tell the VPN to use the 32-bit java, you should modify the <strong>junipernc</strong> by adding the following line right after the block of lines that start with &#8220;#&#8221;:</p>
<blockquote>
<pre>export JDK_HOME=/usr/lib/jvm/ia32-java-6-sun</pre>
</blockquote>
<p>Now, when you run <strong>junipernc</strong>, it will use 32-bit java and you should no longer have the failure due to ncui.</p>
<h3>Issue #2: Determining Your Realm</h3>
<p>The scripting for Network Connect asks a few questions that may not make sense to a typical user. Even a networking savvy programmer may not be certain what values to use for the &#8220;Realm&#8221; or &#8220;PIN + SecureID Code&#8221;.</p>
<p>Finding your realm is fairly straight forward if you don&#8217;t mind diving into some HTML. Point your web browser to your company&#8217;s VPN website: https://vpn.mycompany.com or https://connect.mycompany.com .   View the source of that page and look for a line like:</p>
<blockquote>
<pre>&lt;input type="hidden" name="realm" value="REALMNAME"&gt;</pre>
</blockquote>
<p>The value of REALMNAME is what you&#8217;ll need to enter when prompted.  Your IT department may or may not know what this is if you ask them.</p>
<p>If you don&#8217;t know your &#8220;PIN + SecureID Code&#8221;, it&#8217;s simply the password you type along with your username on the VPN website to gain access. As mad scientist says, some companies use &#8220;SecurID so [they] enter a personal PIN plus the value provided by the SecurID fob,&#8221; which explains why he coded that as the prompt for the password input.</p>
<p>If you need help, there&#8217;s a long running thread over at the ubuntu forums where this continues to be discussed a lot: http://ubuntuforums.org/showthread.php?t=232607 . I gathered my info from both mad scientist&#8217;s page above and the thread itself.</p>
<p>One further note, I&#8217;ve tested this on Ubuntu 9.04 64-bit as well as 8.10 32-bit. Hope this is helpful to all you who need Juniper VPN access on 64-bit Ubuntu Linux.</p>
]]></content:encoded>
			<wfw:commentRss>http://holyarmy.org/2009/06/vpn-on-ubuntu-linux-with-juniper-network-connect/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Fixing Binary File Corruption from Ant Copies</title>
		<link>http://holyarmy.org/2007/10/fixing-binary-file-corruption-from-ant-copies/</link>
		<comments>http://holyarmy.org/2007/10/fixing-binary-file-corruption-from-ant-copies/#comments</comments>
		<pubDate>Thu, 01 Nov 2007 02:44:09 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[binary]]></category>
		<category><![CDATA[corrupt_file]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://sherman.bz/2007/10/31/fixing-binary-file-corruption-from-ant-copies/</guid>
		<description><![CDATA[So there I was, poking around in some java / j2ee code, trying to learn how it all works. I did some testing on a Linux server and realized, something is broken. It seemed something was corrupting ALL the Jar files in WEB-INF/lib/.
A co-worker guessed that the token filtering Ant was doing might be the [...]]]></description>
			<content:encoded><![CDATA[<p>So there I was, poking around in some java / j2ee code, trying to learn how it all works. I did some testing on a Linux server and realized, something is broken. It seemed something was corrupting ALL the Jar files in WEB-INF/lib/.</p>
<p>A co-worker guessed that the token filtering Ant was doing might be the culprit. He was right. It seems Ant has issues with detecting whether files are binary or not, given that it uses a Reader class which runs the files through a character decoder. This is specifically a problem on Unix systems since they commonly use UTF8 character set, and in that case Ant hasn&#8217;t a clue if its looking at UTF8 text or binary data.</p>
<p>So, I used a trick suggested in the Ant docs:</p>
<blockquote><p><em>Another trick is to change the LANG environment variable from something like &#8220;us.utf8&#8243; to &#8220;us&#8221;.</em></p></blockquote>
<p>On the Linux box, this meant we had a default character set of <em>en_US.UTF-8</em> and it needed to be <em>en_US</em>. In this case we already had a bash shell script that runs ant, so adding a line <em><strong>export LANG=en_US</strong></em> to that script before Ant ran solved the problem.</p>
<p>Reference:<br />
<a href="http://ant.apache.org/manual/CoreTasks/copy.html#encoding" target="_blank">http://ant.apache.org/manual/CoreTasks/copy.html#encoding</a></p>
]]></content:encoded>
			<wfw:commentRss>http://holyarmy.org/2007/10/fixing-binary-file-corruption-from-ant-copies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
