Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

Friday, June 19, 2015

How to find a Java class file in your Maven repository (or any other directory full of jar files)


find . -name "*.jar" | xargs grep -r [CLASS NAME]

In case you are ever wondering why your builds aren't working.

Friday, February 28, 2014

DevNexus 2014

Earlier this week I attended AJUG's DevNexus conference.

I get the impression that JavaScript is hot again. There were many  sessions on JavaScript testing, frameworks and especially Node.js.  Atlanta is heavy in the web development space so maybe that is just regional, but there was talk of one Fortune 50 company having moved their online backend to Node.js.

I caught several really good presentations (in alphabetical order by speaker's last name):

  • Aaron Bedra's talk on Web Security was something everyone writing webapps should attend
  • Ted Neward's introduction to Node.js
  • Grant Shipley made me want to try out Titanium (I already use OpenShift, the other thing he talked about)
  • Burr Sutter's presentation on Vert.x was eye opening.  I work for Red Hat, but I don't get to spend much time with the community projects
  • Stephen Thomas' presentation on testing JavaScript
  • Andrew Trice gave a great overview of PhoneGap
The DevNexus site should be updated with slides and recordings soon.


If you are in the Southeast keep this conference in mind next year.  The sessions are high quality and the price is an absolute bargain.

Wednesday, September 16, 2009

jRecruiter presentation at AJUG

Gunnar Hillert gave an excellent presentation on his jRecruiter project at AJUG last night.

I will soon be downloading jRecruiter to check it out in more depth. Gunnar mentioned that the Maven build is a little wonky at the moment. He said he would fix it in the next week or two.

He has a lot of really cool stuff in the app:
  • Struts 2.1, which I have not used. I spent years using the Struts 1.* releases, but have been in the JSF camp for a while now.
  • Twitter integration, which I've wanting to check out.
  • GZip and minification.
Check out the project or his blog for a complete list.


Tuesday, November 25, 2008

OSX and JAVA_HOME

Trying to use seam-gen on my new MacBook Pro I got the following error :

The JAVA_HOME environment variable is not set
Please point it to a valid JDK installation

So I ran :

JAVA_HOME=/Library/Java/Home

This article from Apple's site suggested that the home should always point to that symlink. Unfortunately I got the same error.

Running :

java -version

showed only a JRE :

java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)

Running :

$JAVA_HOME/bin/java -version

showed the same thing. So where is this JDK that Apple speaks of?  Its there.  The only thing that I was missing was :

export JAVA_HOME

Oops.

Calendar and date ranges

I hate Java's Calendar and Date apis.  Hopefully JSR 310 will improve things.  

In the meantime, here's a trick for selecting based on a date range :

Calendar cal = Calendar.getInstance();
cal.set(Calendar.HOUR, (cal.get(Calendar.HOUR) - 1));
beforeDate = cal.getTime();
cal.set(Calendar.DATE, (cal.get(Calendar.DATE) - 1));
cal.set(Calendar.HOUR_OF_DAY, 00);
cal.set(Calendar.MINUTE, 00);
cal.set(Calendar.SECOND, 00);
afterDate = cal.getTime();
The beforeDate member variable is set to the current date minus one hour.  Then the cal Calendar instance is set to 12:00 AM the day before.

Wednesday, July 16, 2008

Terracotta at July's AJUG

Last Tuesday's AJUG (that's the Atlanta Java User's Group) presentation by Kunal Bhasin, a field engineer at Terracotta, ruled.  First of all, Kunal did a bang up job of fielding a ton of questions, and most of crowd stayed around an extra half hour for his presentation.  Second, Terracotta has a seriously cool app.  

I've attend AJUG regularly (meaning most of them) for the past few years.  Burr Sutter who runs AJUG and is the product manager for JBoss ESB does a great job with the speakers, but there have been a few that really stand out.  I got introduced to both Hibernate and Spring (although I had read about Hibernate previously) a few years back at AJUG meetings, and on both occasions got the feeling that those technologies were not only worth using but would be really big.  I got a similar impression about Terracotta; although, its nothing like either Hibernate or Spring.  Its actually pretty invisible to developers, which is the point.

In a nutshell (echoes of O'Reilly?) Terracotta's server(s) controls the objects for numerous JVMs allowing applications from each to access the same instances without any special apis.   I'm sure there's plenty of information on their site, and if you are an architect or have had to worry about clustering, caching or scaling then check it out.  They have separate sites for the commercial and open source versions (a lot like JBoss.com and JBoss.org - is this going to be the standard for oss business models now?)

Bill Sengstacken, who is in marketing, is going to post a video, and there should be a link on the AJUG site at some point.