After reading this blog by Gregg Wonderly and some of the comments posted at the blog I decided to write this blog entry.
For a long time I used to think directories are not Java source file package names because Chapter 7 of Java language specification said so. Also many a times(For any product that you work on for long time) maintaining directories as Java source file package names is a pain. Imagine you are developing a product called javamagic. You are working for a oraganization which has several suborganizations and with several products for each sub organization. If your java source files must be in a directory tree mirroring the package name, your source directory would typically look something like this:
Having this structure is pain and sounds dumb because you know com/javaswamy/jone/javamagic is always constant and there is absolutely no need to maintian this filesystem hierarchy as you know what you are working on. If possible a simple hierarchy like this would be what everyone likes to have:
This is easy to navigate and presents developer view of the code.
Now lets get back to reality. Though Java Language Specification doesn't impose the restiction of Directories are Java source file package names, JavaDoc does. JavaDoc tool faq states "If your classes do not all belong to the unnamed package, you must put them in directories named after the packages.". So if you need to generate javadocs for your project and use JavaDoc tool to generate the documentation, Directories are Java source file package names.
Like many other java programmers, I would love to see JavaDoc team solve these problems that exist since JDK1.1 days:
1. Directories are Java source file package names.
2. Deprecation warning is suppressed if the compilation unit containing the deprecation is being compiled at the same time as the compilation unit using the deprecated class or member.
Saturday, October 04, 2003
Directories are Java source file package names
Posted by Kumar at 10:17 AM 0 comments
Wednesday, October 01, 2003
Office: OpenOffice.org 1.1 released
OpenOffice.org announced first major update to OpenOffice. 1.1 is now final and English version is available for download on Windows, Solaris and Linux. I have been using 1.0.x versions and 1.1 RC's for a while. With every update OpenOffice is getting better and better and better compatability with M$ Office. OpenOffice is now the only office suite on my home machine.
The two new major features for me in 1.1 update are export to PDF format from OpenOffice.org Writer and export to Macromedia Flash format (.swf) from OpenOffice.org Impress. Support for export to PDF got better with every update.
Checkout my blog archive for the month 2003_09 exported to PDF from Writer:Kumar Mettu's Blog.pdf. The only data lost from saved html file is Hyperlinks.
Here is a simple presentation exported to Macromedia Flash format (.swf):
Check out OpenOffice.org XML Essentials book online.
Posted by Kumar at 7:25 PM 0 comments
Tuesday, September 30, 2003
J2ME: Get Weather Forecasts Free
Weather on Demand is one of the most common applications of SMS. Few of weather service examples are:
1. Weather alerts from Verizon .
2. Weather Network and TELUS Mobility's On Demand Weather service and
3. Weather.com's Radar on Mobile Phones.
With a simple MIDlet you can get Weather forcasts free on your phone. US government provides free weather forecasts here. Note that the weather forecasts are not as high quality as commercial services. The simple MIDlet here displays weather at SF(modify the URL to point to your city):
001 import java.io.IOException;
|
You can download Weather.jar and Weather.jad directly. Tested on my i88s. Here is the screen snapshot of Motorola i88s simulator:
This can be further extended to support features like:
1. Select the city where you want weather forcast(using kxml)
2. If your phone supports GPS( like my Motorola i88s), you can display weather forecasts for your current location.
Posted by Kumar at 12:09 AM 0 comments
Monday, September 29, 2003
M$: MSBuild - M$ version of ANT
Microsoft is coming up with a build tool(MSBuild). MSBuild is the next generation build engine and platform for Visual Studio .NET. Microsoft has a session about the new build system during Microsoft Professional Developers Conference 2003.
From introduction it looks like it will ship with the .NET redistributable and not Visual Studio. Also it appears that MSBuild will be an XML based Ant like tool with XML files to drive the build. Of course a similar build tool exist as Nant.
This is yet another block that has been missing in .NET (compared to J2EE) that Microsoft decided to fill.
Posted by Kumar at 6:20 PM 0 comments