February 10, 2009
Just a tip about java command.
It seems the -cp option is not compatible with the -jar option …
A colleague asked me how to launch a Main class within a jar AND having an other jar in the classpasth. According to java -help it seems possible to write something like:
java -cp lib.jar -jar app.jar
But it doesn’t work and results in NoClassDefFoundErrors … the way to do that we found is :
java -cp lib.jar;app.jar app.Main
May be we missed something here ….
4 Comments |
Java |
Permalink
Posted by Manuel
February 6, 2009
I usually don’t start new (hard) technical tasks on Friday’s afternoons. Thus, I decided to review the Javadoc of the exported packages of one of my plug-in.
I am building my help plug-in using Ant and generally I take the output of the ant scripts in order to check if my Javadoc is complete and well formed. It’s not friendly at all, not efficiency at all and not INTEGRATED inside Eclipse
>>>> I decided to look for a Javadoc “helper/checker/builder … ” plug-in on the web.
After few minutes of Googling I remembered something called JDT/PDE (French people, at least me, are generally slower on Friday’s afternoons) and reached the following preferences page :

No more needs to look anywhere else, all is there in the Java > Compiler > Javadoc Preferences Page expected may be the possibility to ignore “internal” packages (packages which name contains “internal” string ) … ???
Once again thanks to JDT, my productivity and the quality of my product grew a little bit more. See you at next tip !!
Leave a Comment » |
Eclipse Tools |
Permalink
Posted by Manuel
February 3, 2009
Ever wonder how to recursively delete Files AND Folders matching a given name with-in an Ant task ??
After reading delete task doc here is my (the ??) default first attempt for deleting recursively Files AND Folders which name contains “org.junit” from the src directory:
<delete verbose="true" includeemptydirs="true">
<fileset dir="src" includes="**/org.junit*" />
</delete>
This will only deletes Files containing “org.junit” but not folders !!!
The solution to also delete folders :
<delete verbose="true" includeemptydirs="true">
<fileset dir="src" includes="**/org.junit*/**" />
</delete>
The only difference is in the includes value where */** was added at the end of the “path”.
Hope this tip will avoid others to waste half an hour to do this
2 Comments |
Java |
Permalink
Posted by Manuel