Version migration templates tool - Java SE (Archived)

Just a thought, wouldn't it be great if, maybe when compiling (with a flag), that when the compiler finds some construct (deprecated stuff for instance) it could print some help information on [i]how to change the code[/i] to be more compatible with the current and future releases.
There is a strict flag for finding language problems but I was more thinking if stuff like usage of the old focus methods/framework, Thread.stop() and the like. Some links could be posted to information documents.
This would help migration I think since it's easier to change something when you can guide the developers on to a new path. It would also 'fells good' for the migrating developer.

Yes, we are thinking about adding something like that


source browsing in Studio 11

After installing Studio 11 and looking around a bit I've been wondering what has happened to source browsing (call graphs, C++ hierarchies). The compiler switches for generating source browsing information have been dropped and in looking at the release notes from Studio 10, 9, 8 I don't see any mention that this capability has been dropped. Is source browsing no longer a part of the developer tools? If so, any suggestions on what to use in its place?
The Source Browser was dropped 3 years ago because customer
feedback showed that very few customers used it and it did not
do a good job of meeting their needs.
Since then, we've considered writing a new one but until the last
few months, had absolutely no customer feedback showing an
interest in this. However, that has seemed to change in the last
6 months and we have started receiving input from customers that
they would like some kind of source browser.
Right now, I'd say we're considering what to do in this area. We
have not made up our minds to add one, nor have we decided not
to. The more customer feedback we get (especially if they tell us
what they want), the more likely we are to do something.
Thanks for the reponse.
It's been a very long time since I last upgraded (coming from Workshop 6).
Adding this in would be great. Tools like doxygen give me a pretty good view of things, but don't cover the call graphs. 
When I ask the developers here who work with Workshop/SunStudio compilers I almost always get the answer that not having a "state of the art" source browser is regarded as a definite weakness of the Sun products. Look at Microsoft, Borland, even Eclipse now has C++ browsing and even refactoring capabilities. Or look at the Netbeans IDE: it has all this for Java, and why should this only be appropriate for Java?
Developers here ask for code completion features, the ability to locate declarations from definitions and definitions from declarations and cross referencing capabilities as accurate as possible. The "old" source browser, BTW, was quite good at the latter, because it used compiler-generated information; even searches for calls of overloaded operators worked (something standalone browsers normally are unable to provide).
I think everywhere where the maintenance of large amounts of software is an important activity a decent browsing facility is a must. Now, having refactoring capabilities in addition, that would be great. 
Developers here ask for code completion features, the ability to
locate declarations from definitions and definitions from declarations
and cross referencing capabilities as accurate as possible.We've just completed a Sun-internal prototype of our next generation
IDE. Some of the features in this prototype were code completion,
code folding and hyperlinks from editor references which warp to
the definition. I think we're working on some of the things your looking
We also had project support and dynamic (context sensitive) help
as well as a much easier work-flow. We hope to get all of this into
our next release.
We have been looking at "modern" C/C++ IDEs and intend to be
competitive with them in future releases. 
Any word on when this will be released? Any beta releases available?
Will this be Sun Studio 12, or a whole new product line?
We are just now moving from forte to Sun Studio 11, and we keep getting frustrated at all the functionality that was removed. Replacing the Source Browser with something newer is one thing, but removing it altogether with nothing to replace it has led to a lot of grumbling among our developers. 
Watch the Sun Studio page
for announcements of new releases and beta programs.
We never announce planned release dates in advance. But don't delay moving up to Studio 11. it will be some time before anything newer is available. 
We very need ctags support at least...
We have a project with very large codebase, and we can't work without tags searching... 
Sun studio 11 is great, its the best way to develop I have found in linux. I really like the makefile building wizards. Debugging with DBX is much more stable than the gdb debugging. However it could be improved by including functionality that allows variable values to be seen by hovering the mouse over the variable name or at least by adding a right click menu item for adding variables to the watch window.
I would like to see source browsing included in the IDE I was reading the sunstudio 11 IDE help and it mentioned source browsing using alt-O key. This works fine on netbeans but not sunstudio 11. The find in files function should also work from a right click menu with a search being performed on the word under the mouse pointer. A code commenting menu button (like on netbeans editor) would also be a nice addition
I would also like to see some better fonts, there is nothing worse than looking at code with difficult to read font. The generic system fonts look ok, it would be good to be able to select them within sunstudio. 
The most important things I need in an IDE is code completion / code insight and a working class browser and a full screen debugger. I didn't get around to checking out the rest of the functionality so I'm withholding judgement on that but I just discovered to my dismay that SS11 doesn't have code completion. I need that, Sun, badly. I guess I'm not alone when I say it's no fun having to skip back and forth between source headers and documentation to lookup method signatures etc. 
I've been using CodeForge which has decent code completion features. It would be nice to have something like that for Studio. Basically, as I work, there are a few things I always need to do:
1) What's that method again? It's a pain to have to go back to some documentation or dig through headers to find a function you need.
2) Where is this method defined? In case I need to edit the definition.
3) Where is this method implemented? In case I need to see what it does.
In graduate school especially I seem to write code by the truckload. Source code management and autocompletion let me work 5-25% faster - depending if I know the APIs. I have pthread, for example, pretty much memorized, but have to crack a book for anything Gnome or Motif related. Mostly I look up the exact function name and the parameter list.
I generally don't browse object graphs, but call graphs are very useful. Code folding would be super-sweet, especially if I could fold #ifdef's. Not many tasks are more annoying than having to slog through conditional compiles.
This is just my humble opinion of what would be useful. As background I'm a professional developer on Linux and Windows and a PhD candidate at George Mason Univ. I basically program all day and then go home and code some more. Generally I use freely available tools, but am willing to shuck out the money to make coding less of a pain. For example, I purchased licenses for CodeForge to help with C/C++ and Allegro Common Lisp. 
Watch the Sun Studio Express page
for news about a new IDE featuring code completion and source browsing.

practices for maintaining source code patches for branch of OSS project?

There is this open source project I use and modify for my personal, private use...
I would like some best-practice/practical experience suggestions on methodology/tools to maintain a growing number of source code patches I have created for said software. (FYI It is generally not mandatory that I upgrade to new version of the software when it comes out. Sometimes I will use the version I have for several versions before getting the new one, and re-implementing my changes. And sometimes I don't even implement the changes; I just run it vanilla.)
Currently, I download the latest code from SVN, make my changes to the original code files, and keep track of my changes in a text file, which I then dutifully reference to re-create them when I feel like re-synching with the official version. What I would like to have instead is a separate base of code that contains just my modifications, and somehow include/import it as painlessly as possible whenever I get a new version of the official code from SVN.
What's the best way to go about it? That's why I'm here.
I realize these situations rarely, if ever, work out perfectly, and I can deal with that. I just want to improve on how things are, now, in anticipation of where I can see them going!
I have some ideas about how to implement this, but they are of the "naive" variety and I think any tips I could get on method or tools to use would go far. I mean ... is it as simple as declaring new versions of affected methods in my patch code and marking them "overrides"? Also, probably a dumb question but will SVN that will help me do this?
Thanks for reading, and any response.
PS - Sorry if this is the wrong forum, but I am just looking for general, tip-of-the-iceberg type tips/links, so I figured folks could drop a quick answer here. TY! 
The patch program on *nix or Cygwin does exactly what you want, and you can create the patchfile using either Subversion or CVS (and any other source control system that provides a diff).
Here's the article that I always turn to to create a CVS Patch (I have to relearn patching every time I do it):
And here's the equivalent from the Subversion FAQ:
When I've worked for companies that did local patches, we kept a separate source-control repository/module that held our patches for the various OS libraries that we used. When we'd upgrade, we'd apply the patches and verify they made sense (if you have a lot of patchfiles, this can be a royal pain). And most important, once we had a patched upgrade, we generated a new patchfile from it (because, again, patchfiles become obsolete, and trying to apply a patch from several versions back can sometimes be impossible).
And of course we submitted any bugfixes back to the projects... 
JavaRebel has a very cool way to avoid patching, IMO: 
Hi Levi?
I read ur previous post about Re: sms 7 bit encoding ..
I would like to know the reverse process of the same what u have posted.. If u have the readymade code could u please forward it to me You can post to the same email thread as well and cc to my email address.
thanks in advance
Hi Levi..
I was referring to ur answer for the post
I just want exact the reverse process of the same. Hope u would help me out with the code snippet.

don't use JAXB! it's buggy and no one cares!

There are several reasons why JAXB is not a good candidate for your development.
1. It is not yet officially published. It could drop dead any minute.
2. JAXB has been dragging forever. No real progress in their effort to make it offically work.
3. It has stopped to support DTD! if you are using a 3rd party software that only provides DTD, you are sc**wed. (yes, you can convert DTD to XML schema, but what a pain if this 3rd party changes their DTD!) I understand they are trying to push XML Schema, but this is not the right way to do it. Isn't this JCP, don't we have a say in this?
4. There is not bug report system for this thing, at least I couldn't find it.
5. Any bug related post on this forum will be ignored. Easy questions get a lot attention, but as soon as the problem starts looking more like a bug, the thread drops off. I posted a problem which I can prove is a bug in JAXB 0.9 Impl, and no one responded. I doubt there is any Sun JAXB developer monitoring this forum at all.
Anyway, for serious development, my advice is use something else!
1.) It is not yet officially published. It could drop dead any minute
True, thats the risk with EVERY beta. But there are many statements from persons involved in the JAXB project that tell us that we will see a the released version very soon. (If you would take the time to search this forum you would find a few)
2.) JAXB has been dragging forever.
I also would have loved to see a beta2, but they decided not to do it. Again: don't use beta when you need production quality
3.) It has stopped to support DTD!
DTD has no future. It's a painful fact for everyone who uses it heavily, but thats life (especially when you make a living from developing software). And: the W3C-SChema spec is final for almost two years now, so this does not come as a surprise.
4.) There is not bug report system for this thing, at least I couldn't find it.
Quote from the JAXB beta download page:
If you find bugs, please check the known problems list first, in the online Release Notes. This is kept current. If you do not find your bug or request for enhancement (RFE) listed there, please submit it to the bug submittal page
-- end quote --
5. Any bug related post on this forum will be ignored.
This forum is not the place to report bugs. You probably will get better responses from the XML mailing list (archive can be found here:
I guess you better should not give advice to anybody! 
Good. I finally got someone's attention. Thanks for those two links, but besides them, you didn't provide anything that I don't already know. Your arguement about XML Schema vs. DTD almosts sounds like what Microsoft would say, but only worse -- Microsoft would at least attempt to make their stuff backward compatible. XML Schema has been out for two years doesn't mean everyone should adopt it. People only make the change if they see some real advantages, not because of coercion. (no need to list the pros of XML Schema, I know them all) Let's drop that arrogance and make it better and easier for everyone.
I remember that there was a notice in the very first version of JAXB that said that XML-Schemas will be supported on a future version and the the API may change substantially.
Well, that's exactly what happened (and that's the reason why I never touched the very first version)
Honestly I think that it's not really possible that both DTD and XML-Schema are supported by JAXB. The features of both meta languages are simply too different.
I also fail to see the big problem. Most DTDs can automatically be translated to a XML schema (for eample XMLspy and XML writer can do this). A free java implementation can be found here (incl source so you can fine tune your special cases):
This should allow a transition with reasonable amount of work
I know you can convert DTD to Schema with a few clicks in Spy, but I just can't trust it and have to check it over. For small and simple DTD, it is ok. But for more complex ones which happen to change themself and I don't have control over, it not only tedious but error prone. Since they have already done it for DTD in the previous release, I don't see it a major burden to carry it over to the new release, oh, maybe with some redundant logic/code. But hey, software isn't supposed to make the developers' life easier, but to make it easier for the users..

version management question

I was wondering what version management software people recommend/use for their java projects. I am currently using CVS and JBuilder3 (although I may upgrade to 6, or change to code warrior), but I've had MS Visual Source Safe recommended recently, as well as, I think it was, Clear Case. As it stands now, I'm a team of one, but this will be changing in the near future, and I would like to know what other people out there use. Please suggest anything, regardless of price, as long as you find it useful (meaning you would use it yourself). The only experience I have is with CVS.
One of the things to consider is whether or not you'll be developing in or for a cross platform environment. There are CVS clients and servers for Windows and Unix so if you're doing any Linux work (for example) then cvs is probably a good choice.
I use cvs with JCVS as the graphical front end. It can be found a Since jcvs is written in Java it looks and works the same in Linux and Windows.
The other thing to consider is where do you want the pain. What I mean by that is this: Versin control is awesome, but there's always pain associated with it. With cvs anyone can check files out, but if 2 people make changes to the same method of the same file then you have to worry about merging the code back together. In this case the pain occurs upon commiting the code back to the repository.
Source Safe allows the user to check out a file and that file is "locked" so that nobody else can check it out. This avoid merge trouble but it keeps people from working in the same areas of the code. That shifts the pain the the point of check out rather than the point of check in. Some teams have policies like "Check everything in every night" but that leads to more pain as you get to the end of the evening and your code doesn't compile or there is a new major bug or so on. You certainly don't want to check in code that doesn't compile just to avoid file lockouts.
The big thing that makes cvs my choice is that it's free, it's stable, it works cross platform and lots of people already know how to use it.
I hope my opinions help you with your decision.
I really like Rational ClearCase as it supports refactoring quite well since it version controls directories, renaming of files, removal (really hiding) of files, etc. But the administration of it is not for the timid.
My second choice (oh, and its free) is CVS.
I've used these plus SourceSafe, PVCS, SCCS and RCS for version control of Java systems.
Greg, Thanks for the detailed reply. I'm just downloading jcvs. I had never found a good gui for cvs, so I've always just used the command line, which can sometimes be annoying. That's a good point about the 'pain'. I didn't know that about Source Safe. My brother, who recommended SS, said he only uses it for himself, and they use AccuRev for their team development, which I need to check into as well.
Chuck, what's refactoring? I am unfamiliar with that term. I'll check into some of those others you mentioned as well.
If looking for an enterprise-quality software configuration management system, I would highly recommend Perforce (
Perforce supports branching code lines, concurrent checkouts with enhanced merging capabilities, plus many other very useful features that a good SCM system requires. If you want a full overview of features, just go to their website.
However, it is a bit expensive (especially for enterprise licensing, since it is per seat) when compared to lower-end solutions, and requires your developers to encounter a short learning curve. The end result is worth it. 
Chuck, what's refactoring? I am unfamiliar with that
term. I'll check into some of those others you
mentioned as well.Refactoring is a technique used to improve existing programs by redistributing logic based on a set of guidelines meant to improve maintainability and to prevent code rot in the presence of maintenance.
Martin Fowler has the seminal work on the subject. See
The problem refactoring throws at SCM systems is that it tends to cause classes to come and go, get renamed, etc over time. Most SCM system cannot handle those kinds of changes directly. Of course there are many, many folks using CVS and Refactoring, so the two are not completely at odds. ClearCase simply makes it a bit easier.
Thanks to all for replying. I now understand what refactoring is, although I'd never heard the term before. Does anyone have any experience with AccuRev? That's looked the most promising so far. Perforce looks great, but it is expensive. I've pretty much ruled out SourceSafe, so the short list for me is CVS, AccuRev, and ClearCase.
You won't like the cost of ClearCase either...
Never heard of AccuRev 
I had a lot of trouble finding costs at Rational's website. Hmmm..... Maybe that's why.

What will most likely happen to JavaFX when Oracle drops it?

Will JavaFX be unmaintained completely (even if it still is supported in netbeans)? Or, will it become like Groovy such that it is maintained by a community only?
Any input would be greatly appreciated!
If someone knows the specifics about JavaFX "going into" Java's syntax, I'd appreciate a detailed explanation. 
Well, official support for the JavaFX scripting language will be dropped by Oracle and open sourced. That way, any members of the community that still prefer JavaFX Script over Java can continue to develop on it. Looks like they have decided to rename it Visage. You can learn more about that here:
As to Oracle's plans to decouple JavaFX's graphics engine from the scripting language and convert it to a Java API, you might find this blog interesting. Specifics are still unknown, but ideas on how they might do it are viewable inside a Flash/PDF presentation. 
So JavaFX is not open source right now? Might be obvious to you but, I just wanted to confirm if Visage's syntax will be exactly the same as JavaFX's. (at least in the start). Also, is Visage already in existence or will it exist (or be ready) as soon as JavaFX dies? 
Well, some of that info is right on the page. One of the downloads is called "", which means no official release is available, but there is something for you to try out. It currently contains a single jar file containing what I presume to be the JavaFX compiler.
What code is shown on the page looks to have the same syntax as JavaFX, and I see no reason that it wouldn't be pretty much the same as that seems to be the entire point of the project.
As to the code being open sourced, it looks like it if you check the repository: