Matt RaibleMatt Raible is a writer with a passion for software. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.
You searched this site for "os". 118 entries found.

You can also try this same search on Google.

How much CPU Power does a Java/Tomcat app need?

I tried posting the following to the tomcat-user list, but after not seeing it show up for 2 days, I'll just try it here.
----

I have developed a webapp that uses basic open source stuff (struts, hibernate,
etc.).  I've been developing/testing it on the following platforms - where it
works fine and runs lickedy-split:

OS X 10.3, 1.33 GHz, 1 GB RAM
Windows XP, 2.6 GHz, 1.5 GB RAM
Windows 2000 Server, 1 GHz, 512 MB RAM
Windows 2000 Server, 1.5 GHz, 256 MB RAM

All of these are running Tomcat 4.1.29 or 4.1.12.  I recently tried to deploy
it to the "test web server" (Windows 2000 Server) at my client and it runs 
dreadfully slow.  It takes almost 30 seconds to load a page.  The main difference
is that the test web server has a 667 MHz CPU.  It has 512 MB RAM, and we 
upgraded it to 1 GB, but that didn't help at all.  

I've recommended we get a faster CPU for the test web server, but I wanted to
confirm that this could be the source of the problem.  On this server, and the
1.5 GHz/256 MB RAM machine, IIS is integrated with Tomcat.  All machines are
running JDK 1.4.0 or above.

Any help is appreciated.

Posted in Java at Feb 05 2004, 07:38:05 AM MST 13 Comments

AppFuse 1.3 Released!

This release fixes a few compatibility issues with Resin and other databases - specifically PostgreSQL and DB2. The major new functionality in this release is Easy Database Switching. Basically, you can very easily switch from using MySQL to PostgreSQL by only changing a few properties in your build.properties. I implemented this on my current project last week because I do most of my development (at the client) on a PowerBook. The client wants to deploy onto a DB2 database - and there is not DB2 install for the Mac. Since Hibernate allows you to easily switch between databases, I figured I could develop using MySQL on the Mac, but have the default (CVS version) use DB2. One of the things I didn't want to do was to have a build.properties.sample, because I love projects that "just work" when you type "ant". So I changed the the build process so that database.properties is generated from default settings (MySQL) or the settings in build.properties (if specified). As part of the build process, Ant looks for the following build.properties files:

  • ${user.home}/.${ant.project.name}-build.properties
  • ${user.home}/.build.properties
  • build.properties

What this allows you to do is to take your customized database settings and put them in ~/.build.properties and they'll be applied to any AppFuse-derived project. This makes it easy to keep the CVS version of your project tied to one database and a developer's local version tied to a different database.

While it's true that you'll most likely only talk to one database during the duration of your project, this exercise proves that it's easy to migrate from MySQL to another database. It also proves that AppFuse can easily integrate with other database (at least as of this release). Slick stuff IMO.

One of the best parts about developing AppFuse is that it's not a library. As a developer, I don't really have to concern myself with backwards compatibility. This means that new functionality can be added quickly and easily and old stuff can be ripped out. It's too bad all OS "products" can be this easy.

What about AppFuse's future? Check out the AppFuse Roadmap to see what I'm thinking about.

Posted in Java at Jan 16 2004, 04:28:47 PM MST 1 Comment

DB2 JDBC Driver

Since most folks come to this site from Googling errors, here's a new one for you - complete with a solution! When I tried to connect from OS X to a DB2 database today, I received the following error:

java.sql.SQLException: java.lang.UnsatisfiedLinkError: no db2jdbc in java.library.path
        at COM.ibm.db2.jdbc.app.DB2Driver.<init>(Unknown Source)

The reason this happens is because there are two JDBC Drivers for DB2 - the first is a native type-2 driver (signified by app in the classname) and the 2nd is a type-4 driver (signified by net in the classname). This page describes the difference between the DB2 JDBC Drivers.

To solve this issue, I changed my JDBC classname to be COM.ibm.db2.jdbc.net.DB2Driver and the error went away. Of course, the type-2 driver is faster, but since there is no client for DB2 that I can install on OS X, I'll still with .net. on the Mac, and .app. with the DB2 client on Windows. Of course, I prefer no client install - it just seems cleaner and easier to me.

The Next Day: I also discovered that it's very important that your db2java.jar file is really the db2java.zip file from the server. If the versions don't match (i.e. trying to connect to a 7.2 db with an 8.1 driver), it actually kills the JDBC Listener! What a pile of...

Posted in Java at Jan 12 2004, 05:57:34 PM MST 1 Comment

A little EL Lovin' for the DisplayTag

Tim McCune submitted a patch for the Display Tag Library to add Expression Language support. I committed it today, along with a few other enhancements. You can read more on the displaytag-devel mailing list. Tim's patch was a nice clean approach to adding EL support. He just subclassed the existing tags and then evaluated the expressions. All I did to integrate was to create an "el" package under "tags" and added an additional .tld file. So there's really nothing that's taken away from the original tag library, and if you want EL support, you simply need to use the "*-el.tld" in your web.xml or change your URI to "http://jakarta.apache.org/taglibs/display-el". Of course, you'll need to include JSTL's JARs (standard.jar and jstl.jar) in your WEB-INF/lib to make this work. This patch included the ability to specify a titleKey attribute - a much asked-for feature.

I like Tim's approach so much, I might have to use it for Struts Menu. It's a slick way of supporting JSP 1.1 containers, and adding optional EL support for JSP 1.2 containers. I haven't had any feedback from the dev team, but hopefully this will make it into the next release.

Posted in Java at Jan 02 2004, 10:52:46 PM MST 10 Comments

Jalopy source code formatter no longer free

I love the Jalopy Source Code Formatter. I hope it continues to be developed on SF (though it hasn't had a release in over a year). My issue? It doesn't work on Eclipse 3.0 Mx on OS X. Why am I worried development will stop? Because the original author has a non-free version (at www.triemax.com).

I can't blame the guy - developing Open Source projects is fun, supporting them is a pain. You get rewards for developing: personal milestones, discovery, knowledge enhancement. For supporting, you get to use your precious non-paid hours to try to disseminate your knowledge. This can also be rewarding, it's just not as immediate, leading to the frustration and pain of support. Good documentation reduces support, but that's a pain too.

We have test-first methodologies, will we ever get to document-first? Write the help files, then write the tests, and then the actual code. I'm willing to bet you'd get even higher quality software going this route.

Posted in Java at Dec 31 2003, 08:49:54 AM MST 4 Comments

Back in Denver

We arrived back in Denver last night after a nice winter-weather week at the cabin. It's nice to be home and sleep in our own bed. Julie agrees and would add that it's nice to have indoor plumbing again. I hate the fact that I have all this e-mail to plow through and respond to. I like the fact that I'm super motivated to learn new stuff. So motivated that I ordered a few books from Amazon. I hope I can suppress my desire to play on the computer (i.e. blogging, open source) and just learn for the next month or so. On my agenda: Spring, WebWork and a Java 1.4 Programmer Certification. 1 month, 2000 pages - if I can restrain my internet addiction, it should be a breeze.

In other news, I'm pumped to see that IDEA is available for $249. My question is - does that give me a license for both a Windows and OS X install?

Posted in Java at Dec 27 2003, 01:49:15 PM MST 7 Comments

Eclipse Plugins on OS X and 3.0 M5

I did a bit of tinkering yesterday and today and finally got the Colorer plugin to work on OS X. From the Colorer Forums, you can now see how to build the colorer plugin for OS X and how to get the plugin working with Eclipse M5. I also discovered that the Lomboz plugin now supports M5 too (even on OS X!).

So, you ask, "What happened to using IDEA?" I do use it, but not as much as Eclipse. The main problem I have with IDEA is that I can't have more than one project open at a time. I typically copy code from AppFuse and it's just easier in Eclipse - I can even copy a whole class and it renames the package for me. And now that I've discovered the Ant View in Eclipse, they're pretty much equal to me. Another reason for targeting Eclipse is there's more users. Most of the folks that download AppFuse use Eclipse - so being aligned with the my "users" (all 6 of them) makes things much easier.

Posted in Java at Dec 17 2003, 08:33:07 AM MST 3 Comments

My Favorite Eclipse Plugins (Download v1.0)

When I go to new clients, I either have to install Eclipse, or help others configure Eclipse with cool plugins. So I made my own download of my favorite Eclipse plugins. If you want it, download version 1.0 from SourceForge. It includes the following:

Installation: Unzip to where ever you have Eclipse installed. I use c:\Tools\eclipse on Windows.

I don't really use XMLBuddy because it doesn't allow spaces (only tabs), but I suppose it's better than nothing. The built-in Ant Editor has the same behavior (tabs only). I'd love to find a plugin that gives code-completion for XDoclet when typing JavaDocs, but I couldn't find one. Sure, there's JBoss-IDE (which is just a bunch of Eclipse plugins), but that only has jboss-specific tags - no @hibernate, no @struts.

NOTE: Many of these plugins didn't work on Eclipse 3.0 M5, so I reverted back to M4.

OS X Users: Jalopy and Colorer don't seem to work at all for me (M4). You'll need to change Easy Explorer from "explorer.exe {0}" to "open {0}" in Window > Preferences > Easy Explorer.

These are all the latest versions as of November 26, 2003.

Posted in Java at Nov 26 2003, 01:02:59 PM MST 13 Comments

User-Mode Linux ~ should I switch my ISP?

This User-Mode Linux sounds like a great opportunity for hosting this site. I currently pay around $50/month to host this site, and there's two things that are frustrating:

  • I only get 5 GB of bandwidth, and I pay the same as my provider for any extra - I usually pay $30 extra per month for bandwidth.
  • I get a max of 20 connections per mysql instance. While this should be plenty, it does seem to cause this site to crash, and I'm not motivated enough to dig into Roller/Tomcat and figure out why.

I do have a cable internet connection, so I could host this site myself, but my upload speed is only 241 KB. For you folks that do use UML, does anyone have experience with running Java (i.e. Tomcat or Roller) and MySQL?

Posted in Java at Nov 23 2003, 09:22:02 PM MST 9 Comments

AppFuse and all it's libraries

I received a question about AppFuse that I've been pondering every since. The question basically boils down to two things:

  • How do you manage Eclipse's .classpath file in conjunction with lib.properties (the file that manages it for Ant)?
  • When using AppFuse for multiple projects, do you put a "lib" folder in each project or use a central repository?

Quick Answers: I replace files in the appfuse/lib directory and update lib.properties. Then I update my project properties in Eclipse to reference the new jars. A pain, yes - but only a 2 minute process. I run all my tests before I bother changing the Eclipse classpath. As for multiple projects - the easiest thing to do is to move $yourProject/lib to a folder called "libs" in the same directory as $yourProject and change the ${lib.dir} property in properties.xml to point to the new folder.

Begins Rambling... I'm currently using AppFuse on 3 different projects. 1 is AppFuse itself, the 2nd is Struts Resume, and the third is for a client I created a webapp for in August. Right now, when I synch up Struts Resume with AppFuse, I copy paste from appfuse/lib to struts-resume/lib and update the lib.properties appropriately. I can't just copy lib.properties to struts-resume/lib because struts-resume uses libraries that appfuse doesn't. Yes, this is admittedly a pain in the arse. It's almost as bad as changing all the method signatures when moving the Hibernate Session from all method signatures into the constructors (can your IDE do that?!). I don't want to make people download appfuse to build struts-resume though, so I doubt I'll change this process.

The whole "massive lib folder" has been bouncing around in my head for quite some time. I'd like to use Maven or Greebo to download the dependencies for AppFuse, but at the same time, it's nice being able to download the whole thing at once and be up and running. I don't want to go the Maven route because I don't really want/need a website for AppFuse and it sounds tough to get it working with XDoclet (though WebShop looks like it might be a good template). KISS

The project.xml in AppFuse is my feeble 20-minute attempt to get it Mavenized (it's currently not used). I tried Greebo this morning, and it really does nothing for me. Especially since I've setup separate compile/test classpaths (read from lib.properties). It'd be a real pain with Greebo to separate out the classpath's for testing and building - it seems to only support one long classpath. Also, who wants to make their whole best-practices open-source app dependent on a 0.1 open-source app?

As for having my IDE (wether it be Eclipse or IDEA) reading the classpath from Ant - that would be the sweetest feature of the year! Currently in Eclipse and IDEA, I have to give an absolute path to j2ee.jar since I don't want to distribute it (it's 11 MB). When I switch b/w OS X and WinXP, I always have to change this classpath. I'm sure there's an easier way with setting variables in the IDE, I just haven't figured it out yet.

The other thing that is annoying is that IDEA doesn't seem to read my $ANT_HOME environment variable. Does it have it's own $ANT_HOME? It's annoying for me b/c I check for JUnit classes in the classpath in my "init" task, and IDEA doesn't find them. Don't worry Eclipse bashers - it doesn't work in Eclipse either. This is fine with me b/c I prefer the command line, but those "I use my IDE for everything" folks might not like it because they can't run AppFuse's build.xml file from w/in their IDE.

Posted in Java at Oct 23 2003, 06:21:59 PM MDT 7 Comments