password
username
Sponsored by CakeMail, an email marketing software
Newsletter preview

EclipseZone logo image
Thursday, May 03, 2007 

Oracle Develop - The Premier Conference for Developers

"Open Source and Oracle in Action: Proven Techniques for using Eclipse and Spring in Web and Database Applications." This is just one of the 30 sessions (and there are 10 hands on labs too) in which you can advance your development skills and learn how to simplify application and database development.

Register for an Oracle Develop event in Asia or Europe today

 EZ News Corner
dzoneMost-clicked links this week
 
 EZ News Corner
 Next section
Alex is off for a curry this week. Fancy joining him?

Alex BlewittScripting and Eclipse

I've said it before, and I'll say it again, competition is good. It's what moves companies ahead of each other by offering more innovative solutions. Unfortunately,software patents don't help since they're preventative more than enabling... but that's the subject of a future editorial.

Competition doesn't just apply to IDEs. Languages also evolve, and ideas from one language can migrate to ideas in another. Java was seen by many as a stagnant language until C# came along. In response, we've seen Java been get features like generics, autoboxing and even closures (even if most people can't tell the difference between a lambda expression and a lambda expression which is also a closure). Closures may even make it into a JSR sometime this century.

Let's peek further under the hood shall we? Java sits on top of the JVM, whilst C# runs on top of the CLR. Any innovation happening there? Actually, yes, quite a lot. Hotspot (JIT-on-demand) and parallel garbage collection are two advances that have arrived in the JVM world recently. But there's one key difference between Microsoft and Sun here; the CLR has seen a lot more work in making it a good place for other languages. Alternatively, Sun are only concerned with Java. In this case, we've got the tail wagging the dog. The proposal for super packages and module system are going to require changes at the byte-code level (even though OSGi already does this without messing with the bytecode).

Microsoft recently announced support for dynamic language support via the DLR, which runs on top of the CLR. In addition, Microsoft are looking at pushing this out to the browser via Silverlight, primarily to counter the threat of Flash and Flex-type technologies. The CLR (and its byte-code layer IL) has been designed from the start to allow objects from different languages to participate.

So, what's happening in the Sun and JVM world? Well, frankly, not much. Although there's no reason why other languages can't be compiled to byte-code – and indeed, languages like Groovy already do (the beta release of 1.1 described by Elliotte Rusty Harold as "a JVM hosted scripting language that combines the blazing speed of GW-Basic with the sparkling clarity of Perl"). But Sun aren't really interested; in an earlier comparison of Java and C#, Dare wrote in 2001:

Currently, Sun Microsystems (creators of the Java language and platform) seems to be uninterested in this level of cross language interoperability and has decided to leave this to independent developers and researchers.

In fact, Sun have never released a JVM that's just a JVM. It always comes bundled with the Java libraries, and Sun don't want to let a platform be called Java if any subsets of it are cut down. This prevents other JVM-hosted languages from supplying a trimmed-down runtime without the multi-megabyte Java libraries. There's several langauges – Scala, for example – that would benefit from having a language-agnostic JVM to run on top of. Instead, we've got languages like Python and Erlang that have their own runtimes and can't interoperate well with other Java-based systems.

How does all of this fit in with Eclipse? Well, as Donald writes, the Eclipse ecosystem is very healthy, and in fact, it's difficult to gain a new language without having the associated IDE support; something that Eclipse enables. But what about enabling scripting of Eclipse in other languages? Eclipse Monkey tried to do this, but wouldn't it be cool if you could write plugins in, say, Python or Ruby instead? Or enable your customers to script particular behaviours with these kind of plug-ins in the same way that Mac applications can be scripted with AppleScript or F-Script? Neil Bartlett already demonstrated how to write a bundle in Scala, and the Eclipse Monkey code used Mozilla's Rhino JavaScript engine. Both of these worked because the languages have JVM-based runtimes.

So, will this improve in the future? Well, JSR 223 – scripting for the Java platform – might be the saviour. But Sun still need to get over the difference between the VM and the supporting libraries, such as Harmony which provides a modularised JVM which you can opt-out of the anchor of dead-weight libraries if you don't need them. But as it stands, Microsoft's in a much better position than Sun are, and are doing more into research of other languages like Spec# and F#, and you'll be able to mix-and-match implementations in a variety of languages in the future. If Sun wants the JVM – and by extension, Java – to survive, then they should be focussing on making the JVM an inclusive, not exclusive runtime.

Until Next Time,
Alex Blewitt
alex@eclipsezone.com

 Tips and Tricks
 
 Tips and Tricks
 Next section
 Back to top
Nearly every day, RJ and others, bring you the hottest tips and tricks from around the Eclipse universe. Have a hot tip? E-mail the editors at editors@eclipsezone.com.
Synchronizing Views with a GEF Editor

View synchronizing is one of the fundamental features for most Eclipse workbench apps. When using a GEF editor, you can use additional views to provide more targeted information about the selection, or even allow editing. There is a lot of good information about this topic - both in the eclipse docs and in the newsgroups. However, I think I can augment that with a concise set of steps for getting this task done quickly.

Full DiscussionPosted By: Adam Cabler - (0 Replies)

Starting Equinox from a Java application

It's possible to bring up Equinox from an existing Java application. This tip shows you how.

Full DiscussionPosted By: Alex Blewitt - (2 Replies)

Run multiple bundle activators in a single bundle

The OSGi spec only allows for a single bundle activator to be executed, but you can chain several together. This tip shows you how it's done, and how you can reuse code by configuration data in the manifest.

Full DiscussionPosted By: Alex Blewitt - (7 Replies)

Configure your projects to use UTF-8 by default

For a cross-platform language, Java does some silly things in using the local character set of the operating system. Unfortunately, Eclipse uses this default for writing source files of most kinds; fortunately, there's an easy way of configuring it to use UTF-8 by default.

Full DiscussionPosted By: Alex Blewitt - (12 Replies)

Add logging with indirection

Ever wanted to add logging or validation to an existing method that you don't have source to? You can easily introduce indirection in Eclipse, re-writing your calls to that method with your own method, and the add the logging to your method call.

Full DiscussionPosted By: Alex Blewitt - (4 Replies)

Join two lines together

Buried in the new-and-noteworthy is a line that simply says "Joining lines in text editors'. A new keystroke, Control+Alt+J, allows you to join lines together in much the same way that J would work in vi, or equivalent text editors.

Full DiscussionPosted By: Alex Blewitt - (8 Replies)

Generate incorrect equals methods with instanceof

Eclipse 3.3M6 allows you to generate equals methods either using the correct getClass() form, or now also an incorrect instanceof form. The choice is yours.

Full DiscussionPosted By: Alex Blewitt - (11 Replies)

Wrapping selected code in a block

An oldie but a goodie -- you can create a selection with Ctrl+Shift+Arrows, and then use Control+Space to insert a multi-line template such as surrounding with try/catch or becoming the body of a while loop.

Full DiscussionPosted By: Alex Blewitt - (4 Replies)

Running 'tail' inside Eclipse

A recent question on Ask EZ about how to tail a file's output in Eclipse prompted me to answer; but in the spirit of sharing the idea with others, I'm posting the reply to the Tips and Tricks page.

Full DiscussionPosted By: Alex Blewitt - (9 Replies)

Trying out a bugfix in Eclipse, without redeploying your application.

Apply simple code-changes to the application you're debugging in eclipse, without needing to restart it. This can be a lifesaver if your application takes forever to build and restart and you just want to see the effect of a minor code change.

Full DiscussionPosted By: Daniel Bray - (7 Replies)

 Ask EZ
 
 Ask EZ
 Next section
 Back to top
Everyone has questions, especially about a platform such as Eclipse that has so much potential to be customized. EclipseZone comes to the rescue as our editors answer nearly any question you can think of in our Ask EZ forum.
printing the content of TabItem in a TabFolder

I am not able to print the content of non-editor tabitem in a tabfolder.Currently the print action is enabled only when the control is in an editor.

Full DiscussionPosted By: Jayaraj G - (0 Replies)

Open / Close Project

Open / Close Project menus are disabled in Eclipse IDE. What a nuisance this minimum of characters in the summary field.

Full DiscussionPosted By: Guillermo Uriarte - (1 Replies)

Can I get the VM arguments of eclipse at runtime

I want to get the Virtual machine arguments at run time. I have a plug-in and it start at the startup of eclipse(Extends startup extension point).

Full DiscussionPosted By: karthik - (1 Replies)

Is it possible to customize an existing Wizard in Eclipse 3.2

I want to customise the 'Managed Make C project' wizard in eclipse, to enable the 'Finish' button as soon as I enter the project name.

Full DiscussionPosted By: Shweta - (0 Replies)

How to hide project in Eclipse?

I need to hide the project in Eclipse after it is closed. How can I go about it? The default behavior is that project remains there after you close it

Full DiscussionPosted By: sunny - (6 Replies)

setting up a common devlopment enviorments

questions on recommendtions and practices on setting up a common working enviorments amongst a team of java devoplpers

Full DiscussionPosted By: Elhanan Maayan - (3 Replies)

Eclipse unstable

Hi, actual i work with eclipse 3.2.2 on an large J2EE Application. It happen so often that Eclipse crash while development ....

Full DiscussionPosted By: Jens Hohl - (4 Replies)

Do not want to deploy one of the 3 projects when I say "build all"

Opting one or more projects out of deployment. Separation of building and deployment. Exluding one of the workspace projects from getting deployed.

Full DiscussionPosted By: Gnanasekaran Sakthivel - (0 Replies)

Firefox-like GUI

I am trying to create a rcp with a static part (like a coolbar) containing textboxes, comboboxes and buttons.

Full DiscussionPosted By: Knoxx - (0 Replies)

plugin - creating a window

i am trying to create a window with three labels and its corresponding text boxes and a submit button.and i need a icon in the tool bar to display

Full DiscussionPosted By: kdcosta - (1 Replies)

I need a way to resize image into a image.

I need a way to resize image. The reason is i want to write part of an image. At present i know how to write into GC. But writing one image data and s

Full DiscussionPosted By: Alexk - (1 Replies)

Looking for experience with plug-in adoption rate

I'm looking for adoption rate (number of users over time) for existing plug-ins, especially free or free/commercial.

Full DiscussionPosted By: Zviki Cohen - (2 Replies)

jar file in plug-ins

when i did the hellow world plug-in there was a jar file specified there in the xml file. i want to knw why it is used.

Full DiscussionPosted By: kdcosta - (2 Replies)

plugin-why no main method

i am a beginner in java plug0in. when i wrote simple hello program i didnt find any main method in tht although its a .java program.

Full DiscussionPosted By: kdcosta - (2 Replies)

log4j property file

I develop one rcp plugin application and implement the log4j plugin for logging, but when I export the plugin as a eclipse product the log file did no

Full DiscussionPosted By: rajan - (1 Replies)

Problem with Eclipse with servlet

DEPLOYMENT PROBLEM WITH ECLIPSE-3.2.2 / TOMCAT 5.5 (SERVLET) / JRE1.6.0_01 (servlet-api.jar is used).

Full DiscussionPosted By: Gandalf - (5 Replies)

Why in Eclipse methods dont show correct arguments names ?

when i use eclipse and i want to call some method from standard jdk when i see its argument they are called arg0 arg1 etc..

Full DiscussionPosted By: Naiden Gochev - (2 Replies)

how to add log4j plugin for RCP application

I have develop a Plugin application using RCP, now I want to implement log4j plugin for logging my application,so help how toimplement log4j in rcp

Full DiscussionPosted By: antony - (1 Replies)

Retrieve the results from testrunner

how can i get the values from the testrunner.i have to display how many failures and errors are there in my program. is there any spl function for it.

Full DiscussionPosted By: Shunmugam - (1 Replies)

How to deploy using eclipse?

In a single server, with several developers. What is the best way to have automatic deploy to the test server?

Full DiscussionPosted By: Yaron - (0 Replies)

Suggestions for profiling and diagonising memory leak problems

What options do I have to profile and diagnose memory issues in Eclipse RCP/ EMF based product. JVM used is Sun 1.5.

Full DiscussionPosted By: Aarati - (2 Replies)

Need an example of custom Table Item with image

I need a table with image as tableItem. Anyone hjave custom SWT Table with images as table item? I am creating set of Custom views.

Full DiscussionPosted By: Alexk - (2 Replies)

Remote Debugging / Eclipse / Swing application

Breakspoints not "installed" (active) when trying to remotely debug event handling methods in swing application.

Full DiscussionPosted By: glh - (2 Replies)

export source file (.java) to PDF document

Trying to write a source file (.java) to a PDF document with the Eclipse 3.2 Workbench : Is it possible to do so and how ?

Full DiscussionPosted By: Yvan RIOU - (0 Replies)

toggle JSP comments?

When i do a CTRL+SHIFT+C inside of a JSP file, it throws HTML comments in. i need to have JSP comments...

Full DiscussionPosted By: pyroblue - (0 Replies)

 Popular at EZ
 
 Popular at EclipseZone
 Next section
 Back to top
A recap of some of the most popular and active EclipseZone discussions this week.
Dynamic languages: JVM or CLR?

Eclipse and other tools are supporting a broader range of dynamic programming languages than their original use cases of compiling Java code. However, Microsoft seems to be making more strides in making those languages run on the CLR, whilst Java's creators are more focussed on extending the Java language rather than supporting the JVM. Is this the start of a shift away from the JVM?

Full DiscussionPosted By: Alex Blewitt - (12 Replies)

Eclipse Articles feed changed

The Eclipse Articles feed has changed. No, I didn't know about it either. Oh well, if you've got http://www.eclipse.org/articles/articles.rss bookmarked, now's a good a time as any to change it to http://www.eclipse.org/resources/resources.rss?type=article&title=Eclipse%20Corner%20Articles instead, because if you've got the former, it's no longer a valid XML document.

Full DiscussionPosted By: Alex Blewitt - (2 Replies)

Eclipse 3.3 to support console-variant for Windows

Bug 173862 says "Investigate the creation of a console friendly eclipse.exe, which when started from within a console, would act like any other console app (redirect of in/out/err)." and has been marked as fixed in 3.3

Full DiscussionPosted By: Alex Blewitt - (1 Replies)

RESOLVED LATER Controversy RESOLVED

Looks like the Eclipse Foundation is finally taking Alex's energetic lobbying against the RESOLVED LATER state to heart. They've now taken the first step towards Bugzilla structure that's more encouraging to the community.

Full DiscussionPosted By: Daniel Spiewak - (6 Replies)

Subversive now has its own page

Hot on the heels of the withdrawal of the subclipse proposal, the subversive project has made its homepage available at http://www.eclipse.org/subversive/

Full DiscussionPosted By: Alex Blewitt - (1 Replies)

 Your Account
 
 Your Account
 Next section
 Back to top
Manage your account info for this and other DeveloperZone publications.
Manage your DeveloperZone membership details

Click on the following links to:


 Contact Info
 Next section
 Back to top
Here's how to reach us, we love to hear from you.
Email us
Send news items to editors@eclipsezone.com
Send questions, complaints, or suggestions to feedback@javalobby.org
Send advertising inquiries to advertise@javalobby.org
 
Call us
Our number is (919) 678-0300. We'd love to hear from you!

 Legal
 Back to top
The fine print we'd rather avoid completely.
Feel free to redistribute this newsletter in part or in full to your friends.

EclipseZone News is a service mark of DeveloperZone, Inc.
Copyright ©2001-2006 DeveloperZone, Inc.

Thank you for your continued support of DeveloperZone. If you prefer not to receive the EclipseZone weekly newsletter, send an e-mail to ***-eznews@javalobby.org and please ensure the actual email address to be removed is present.
DeveloperZone Inc., 113 Legault Drive, Cary NC 27513 USA