Self executing jar files

I personally always felt bad about the fact that we have to provide a shell script which runs the executable jar file. It would be nice if we could provide a self contained executable in a single file, right? I just discovered a trick which works on unix, but it can possibly be adapted on […]

Are you habit to have some configuration files packaged inside the jar of your application? If so, you can still have a look at those configuration files in the running environment using the unzip Unix utility. $ unzip -p /opt/myapp/lib/my-app.jar log4j.properties log4j.rootLogger=INFO,stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Threshold=INFO log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{dd-MMM hh:mm} [%-5p] %m%n The -p option uncompress and prints […]

I wrote in a previous article how easy it is to translate Java object to/from XML, without adding exotic library dependencies to your project; recently I’ve going through the code of one of my colleague and I discovered that the 3 line necessary to marshal and un-marshal the XML can be shortened to a single […]

Eclipse Save Actions

I recently started to use a feature in Eclipse 3.6.1 that I didn’t notice before: the “Save Actions”. Basically you can configure some actions that will be done automatically when you save a Java source. Some of them are really useful, like Organizing the imports, adding ‘final’ to private member instances, etc. Here the screen-shot […]




About

You are currently browsing the NewInstance weblog archives for tip.

Longer entries are truncated. Click the headline of an entry to read it in its entirety.

Calendar

February 2017
M T W T F S S
« Nov    
 12345
6789101112
13141516171819
20212223242526
2728  

Follow me

twitter flickr LinkedIn feed

Subscribe by email

Enter your email address:

Archives


Categories

Tag Cloud


Listening