Saturday, October 30, 2010
Thursday, October 28, 2010
Saturday, October 23, 2010
A Java developer feels this pain in a couple of ways:
- Compile time, manifested with errors such as "(ClassName) cannot be resolved to a Type" or "The import some.class.SoughtFor cannot be resolved".
- Runtime, where the errors will show themselves with messages like the all-time favorite "java.lang.ClassNotFoundException".
But what if you had a report like this? Wouldn't that be nice?
So what do you do then? Many coders start by trying to guess which .jars hold the missing classes, then add them to the classpath one by one. This can be an exercise in frustration, as often times .jar names give you little clue as to which classes are inside.
A second methodology developers sometimes use is the 'throw everything but the kitchen sink at it' approach, where they build huge classpaths loaded with every .jar they can find. This inexact coping mechanism obviously leads to bloat.
But wait! There is an exact way to cure the problem, and it's easy and open sourced! Here's how to do it:
1) Download and unzip JBoss Tattletale. It can be found here.
2) Make a run script for Tattletale.
3) Run the run script.
4) Read the report Tattletale makes for you. It's that easy!
The script is easy to write. It takes the form 'java -jar tattletale.jar DIRECTORY_TO_RECURSIVELY_SEARCH DIRECTORY_FOR_REPORTS.
Here's an example:
java -jar tattletale.jar /home/rick/Tools/JBoss/jboss-5.1.0.GA /home/rick/rpts
Then you just go to the reports directory and view the index. To find your classes in .jars, have a look at the 'Class Location' report. It'll tell you which jar holds the missing classes!
Tattletale has many more capabilities, which are well documented in the packaged docs. I hope you'll find this tool useful in your day-to-day development work.
Saturday, October 9, 2010
Use the following to easily use Byteman on AS7, using the HelloWorld quickstart:
-- Script to attach, check, and submit rule -----
# Only install once.....
# $BYTEMAN_BIN/bminstall.sh -b -Dorg.jboss.byteman.transform.all $JBOSS_HOME/jboss-modules.jar
# check it
$BYTEMAN_BIN/bmcheck.sh -cp $QS_HELLOWORLD_TGT RicksScript.btm
# add the rule
-------The Rule. Check the arbitrary Java code used! --------------
RULE trace main entry
#DO traceln("entering createHelloMessage")
#DO traceStack("found the caller!\n", 100)
DO System.out.println("Hey, I'm random java code!");
Have you heard of Byteman? It's sort of like AOP-lite. With a small script and a lightly doctored startup command, you can have x-ray vision into your Java applications. You don't even have to alter your source code, and it's easy to use.
- Make your application into a jar (using jar -cvf someJar.jar *.class, perhaps). This is done as a convenience to make it easier to put on a classpath.
- Make a Byteman script, telling it what you want to see.
- Make a command-line script to invoke your application.
java -javaagent:/home/rick/Tools/Examples/Byteman/byteman-1.3.0/lib/byteman.jar=script:clue_script.txt -classpath clue.jar Clue
Saturday, October 2, 2010
Every Content Management System (CMS) that is based on one of the Open Source licenses is eligible to participate for this category. Vote for your favorite Open Source CMS here.
- CMS Made Simple
This category is reserved for those CMSes that have won the Overall Open Source CMS Award at least once in the past. Since the launch of the award in 2006, only Joomla!, Drupal and WordPress have won the Overall Open Source CMS Award, therefore, this category will feature only those three participants in 2010. Vote for your favorite Hall of Fame CMS here.
This category is for all Open Source projects, whose first release date is less than two years from 9 August, 2010. Vote for your favorite Most Promising Open Source Project here.
- LiveStreet CMS
- Tomato CMS
This category is reserved for the type of web applications that simplify buying and selling of products on the Internet. This will include complete e-commerce applications or frameworks designed for e-commerce. E-commerce modules or extensions to other systems can also be nominated. If a system is general purpose (like a CMS such as Drupal or Joomla!) the specific e-commerce functionality should be nominated, not the base system.Vote for your favorite Open Source E-Commerce Applications here.
- Dojo ToolKit
- Ext JS
This category, as the name suggests, is for all Graphic Application Software that is used for graphic design, multimedia development, specialized image development, general image editing, or simply to access graphic files. It can also include graphics libraries, which use command line references or programming language inputs to design or edit graphics.Vote for your favorite Open Source Graphics Software here.