Firstly, please allow me to say sorry to my unexpected update to one of my blog entry in the last weekend. This caused an very old blog entry re-posted to the planet again.
Because I am planning to start new round of posts in the community, so I do a little tweaking to the blog. I do a update to that blog entry in that several readers asked the status of my SEED project[1] in its release-following period. Unfortunately I must say it has been dead for many reasons.
After the SEED project M0, I have done a more deep investigation and reflection to the current languages on JVM. Like Scala, Kotlin(Ceylon, althoug I've forgot it, but not including the Groovy and Xtend), the basic conclusion is that the complexity much outweights the advantages of the language after the advanced features coming right before your eyes. Some adopters likes to keep to use a subset of the language to keep a good taste. But, if we only limits us to a subset, why we choose this language?
For example, recently, our Xtender Sebastian addressed an exception checking codes in Xtend v.s. Java 8[2]. His favorate Xtend codes like this:
"
import static extension Throwables.*
val uri = [| new URI(requestURI) ].onException [
new IllegalArgumentException(it)
]
"
This codes, IMHO, just uncovers one big problem(or fault) which is much popular in the current mainstreaming JVM languages: that is, "Symbol Hell".
Who knows what " [| new URI(requestURI) ]" stands for when one man meets these codes firstly? In some language, the operator could be mostly arbitrarily customized(to encourage the flow controlling). The result is that, you would regularly sees the in “clever” coders 's DSL library or framework:
~[...] ... ^ ... -|| ... <- -="-" ...="..."> ...->
Are this codes happy to see by us?... I am afraid that, it is not the right direction that for the future of language...
Now, back to the topic of this post:)
Recently, IDEA 12 re-introduce a darkula theme[3], which makes our community a little nervous. The chronon boy posted one solution in the planet[3].
Recently, I start to migrate to the Eclipse 4.3 from old 3.8 platform. As I point out in my preious post[1] , the biggest problem to Eclipse Juno is that, the UI is ugly. The color is not harmony with native platform. The default Sash separation is too large. The worst thing is that, we always hate the round-corner tab[4]!
Not it is the time to eat our dog food!
In the weekend, I hack a simplest dark theme implemenation for the community: eclipse.themes.darker[5], which is based the style schema of eclipse-color-theme[6].
As you can see, the dark theme still has some not-dark elements in fact. Some of these is from the limitation of the SWT, like the button background color. But the css style engine still leaves the contribution space for us. After a little more work, I got this:
Yes, it is darker than that of the dark:)
The big fun is that, the codes are minimized by using Eclipse4 platform technologies like dependency injection[7]. It proves that again, the concise codes and advanced features could be achieved by contributing or extending with the external form(like library, framework). New language is not necessary just for this kind of purpose.
"Java Is Dead, Long Live Java!"
[1] https://github.com/jinmingjian/seed
[2] http://zarnekow.blogspot.jp/2012/12/fixed-checked-exceptions-xtend-way.html
[3] http://eblog.chrononsystems.com/dark-eclipse-theme
[4] https://bugs.eclipse.org/bugs/show_bug.cgi?id=367691
[5] https://github.com/jinmingjian/eclipse.themes.darker
[6] https://github.com/eclipse-color-theme
[7] http://wiki.eclipse.org/Eclipse4/RCP/Dependency_Injection
Showing posts with label bugzilla. Show all posts
Showing posts with label bugzilla. Show all posts
Tuesday, December 18, 2012
Wednesday, July 15, 2009
When the PDE(JDT) met the Jar-in-Jar bundle
When the PDE(JDT) met the Jar-in-Jar bundle
"Jar-in-Jar" is a word using in the 3.5M5 new and noteworthy page. A Jar-in-Jar bundle is just the jarred bundle which contains other jars. (sometimes, called "nested Jar".)
Recently, when I use the db4o osgi bundle, I met a compilation problem. It said,
"the type com.db4o.ObjectContainer cannot be resolved. It is indirectly referenced from required .class files".
From one entry in its forum, I know that, it is an old problem after the db4o get into the world of osgi.
After a simple inspection, I find the reason. That is, the PDE can not resolve the Jar-in-Jar bundle. The old Bug157375(and Bug 111238 as well) addressed this problem. As Jeff suggested in the comments, the best practice for this is "packaging each JAR as a bundle and not nesting JARs at all".
However, as Jeff said as well, "Equionx(and other OSGi implementation?) will run JAR'd bundles with nested bundles just fine". So, this just causes a compilation error, but not a runtime problem. I think this bug is still a bug.
As Thomas Watson said, this bug "well actually is JDT" bug. Jeff simply suggested a bug-fixing idea: "basically if the bundle has JARs on the classpath then unzip in a temp spot and us the temp location for classpath computations". But the Bug 111238 seemly said more problems with extraction method. I have one idea, like using some detecting codes just to check the correct dependency of the jar-in-jar on the fly and to avoid the compilation blocking. In the other aspects, we can still use the original bundle.
Lastly, two workaround for this bug: 1. using the best practice pointed by Jeff; 2. unzipping the jar, then using the directory-style bundle.
Warning: If you are the man responsible for building your osgi bundle, please keep the best practice. "nested jars are evil"(zx^_^).
Subscribe to:
Posts (Atom)

