Environment Setup – Progress and Comments

I’m working through the First Sample Application from the Johns Hopkins Enterprise Java class that I referenced earlier. I got the development environment setup by following the excellent guide put together by the professor of the course, Jim Stafford. Everything worked great with very few issues. Once again if you’ve fumbled around the web looking for a decent overview of a Java Enterprise environment this site is a utopia.

One of the things I like about University course work is that it builds on itself.  Class 3 builds on Classes 1 and 2.  That is exactly the way this guide is written.  If you have a foundation in Java where you have a basic understanding of inheritance and packages, you’ll be able to follow along and troubleshoot your issues. A couple of comments from the setup guide.

  • If you are on Windows, you don’t need to install cygwin, just as Stafford notes.  However, be aware that you need to set your file paths correctly.  Unix uses ‘/’ as the directory separator.  Windows uses ‘\’.
  • Another gotcha between Windows and Unix: Windows uses %PATH_VAR% whereas Unix uses $PATH_VAR.  I think the environment setup covers this pretty well, I don’t recall any problems there.  But keep it in mind for Exercise One
  • The revisions of the software in the guide are older than the current revs of the software.  However I recommend sticking with the Revisions that he specifies.  I had some trouble when I tried to use the latest version of JBoss.

I’m not all the way through Exercise 1 but here is what I’ve found so far

  • Part A went pretty smoothly. Part B I had to adjust the path in build.properties to reflect Windows.  (“M2_REPO=C:\\jhu\\repository” and the subsequent paths)  You need to “escape” slashes ‘\’, that’s why you use the double \
  • In Part C the ‘ant test’ command wasn’t finding my ‘log4j.xml’ file so I had to move it out of my ex1\src\test\resources directory into ex1.  For some reason the resources directory was not being picked up by my classpath designation.  After moving the file the logging worked. Cool stuff by the way

Hopefully I’ll get through the rest of Exercise 1 this weekend and can get started connecting to my database using JDBC.

If the links above don’t work, check out the archive site for the Fall 2008 course


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s