Who said dynamic languages can't be fun to debug?
So here's the problem.
You have a webapp that packs two jars A.jar, and B.jar. A depends on C.v1.jar, but B depends on C.v2.jar. Both C jars include the same class with different signatures, because they are different, incompatible, versions.
I can hear you sighing from here.
There are actually a few solutions:
1. OSGI. If you can figure it out, it can actually do the classloader magic for you.
2. If you're like me you can use the WEB-INF/classes, since these classes are loaded in a classloader that has priority over WEB-INF/lib classes, and attempt to do via sources, or a decompiler (JD-GUI) a conflicting class that is compatible with both A and B. But that's error prone, and is a LOT of work, for more complex changes in API.
3. JarJar. With JarJar you can rename a package to another package, and it will also rename all the references in the classes. So you can just pick for example B and C.v2.jar, and rename the conflicting packages or classes (directly inside the jar themselves).
4. Project JigSaw, seems to be adressing just that, but this appears to be available only with Java 8 unfortunately.
Personally I used JarJar. Seemed by far the easiest to use, and worked flawlessly.
Turns out to be BZIP2.
Considering that most of it is actually already compressed ZIP data (the JRE), it's an outstanding performance.
Whenever I hear about Firefox, I cringe a bit.
Its news lately seem to be only scandal after scandal. If you don't follow the tech news, basically:
They lost the desktop battle to Chrome, and the enterprise world is still into IE.
On mobile it's even bleaker, and they are virtually non existent, since they lost the mobile market to Webkit as well, but this time really-really bad: Safari on the IPod, Chrome and the default WebKit browser on the Android, and even platforms like Cordova that allow publishing web apps as native apps, are rendering with the phone's webview, that is ... WebKit, or IE on Windows Mobile. Opera as well switched to WebKit and V8.
On the server side, node is all the buzz, and Mozilla or IE are not existing.
So, slowly but surely, Mozilla and their Firefox slide into obscurity and instead of fixing their products or strategies they go with random stuff like Firefox OS, dreaming that the future world is a world of web things, and people will switch to their no-real-apps-available platform, ignoring the elephant in the room (the fierce battle between Apple, Samsung and Microsoft into the mobile arena), and somehow in their parallel world aren't able to see that native apps are here to stay.
Yes, Web is becoming more prevalent, but people are not using their browser, and yes many mobile apps are now HTML5+JS powered, but they're not running on the Mozilla's stack, and yes the JS is permeating now even the server side world, but not using the JS engine from Firefox, but rather V8. So this is why all the talk from Mozilla regarding open web, remains just that, talk, talk that fails to materialize into a good product and strategy.
I surely hope, for your sake Mozilla, that you'll prove me wrong with time.
The one to rule them all. The browsers that is.
SharpKnight is an Android chess game.
MagicGroup is an eclipse plugin.