Yu Sasaki's Blog



Eclipse WTP – progress

At the beginning of this week, I asked Darin Wright a question about how to locate the package that contains source lookup, and he replied to my email and posted a comment on the bug page.

I’m not familiar with the source locator used in web app’s. However, the issue is that a type with the same name (com.whatever.MyClass) exists in more than one application and the source locator finds one of them first. If there’s a way for the source locator to understand the context in which the source lookup is being performed (which module/web app?), then the source locator should be able to prioritize/order its search to look in the right place first.

This gave me a good insight of the cause of the bug.

I will try to figure out the source.


Filed under: open source

Release 0.1

Currently I’ve been working on the bug 173912, and with help of the comment at the bottom of the bug post, I tried locating the package which seemed related to the bug.

org.eclipse.debug.core.sourcelookup includes methods for source lookup, and one said this was the place where the bug might be located. However I was unable to find the source regarding the debug.core in CVS Repository.

Here’s my assumption of the cause of this bug.

There must be some locator method that mistakenly determines the app by only app’s project title.

Anyway I’ll try to locate the source code and analyze the bug more tomorrow.

See you!

Filed under: open source

Release 0.0 – Bug#173912

For the release 0.0 for OSD600, I’d like to work on the bug #173912 Debugger shows source from wrong web app

The bug seems a bit too difficult for me now, but I think it’s worth a try.

See you!

Filed under: Java, open source

Eclipse WTP – Bug#173912

Today Jordan told me to reproduce some bugs in here. There are lots of bugs that need to be fixed, and I started browsing them. However, each bug has a different difficulty level, which is unknown to me, so a bug that seems easy at first glance might be actually a difficult bug, and vice versa. I have no idea. For the time being, I picked up one bug from the list and tried reproducing it.

Here’s the steps that I followed in order to reproduce the bug # 173912.

1. Create a dynamic web app named app1. Aim it at an APP server.
2. Create a class, com.whatever.MyClass, add the following methid, and save and close.
public String getGreeting() {
return “Number one!”;
3. Create a nother dynamic web project named app2.
4. Create a jsp index.jsp in app2 and also create com.whatever.MyClass and change “Number one!” to “Number two!”.
5. Set a breakpoint on the bean expression in app2’s index.jsp.
6. Add both projects to the server.

Here’s the screenshots for MyClass (in app1 and app2)

MyClass.java (in app1 and app2)

MyClass.java (in app1 and app2)

index.jsp (in app1 and app2)

index.jsp (in app1 and app2)

Next steps are the following:

8. Restart the server in debug mode.
9. Run app2’s index.jsp on the server.
10. When the breakpoint is hit, select “bean” in the Variables view in the debugger. Do <context menu>–>Open declared type. The Java editor will open, but on app1’s com.whatever.MyClass.

Here’s the screenshots for the steps above.

Trying to debug "app2"

Trying to debug "app2"

At this point, I’m debugging app2, and when the debugger reaches the breakpoint that I made in the index.jsp (app2) it should display the debug perspective and all the debugging information regarding app2 MyClass.

Instead, it displayed app1 MyClass information.

MyClass in app1 is displayed instead of the one in app2

MyClass in app1 is displayed instead of the one in app2

So the point of this bug is, when you have different projects which have the same structures, the debugger mixes up one another and yields mixed up information. I’m not sure why this happens. Anyway it for sure happens and I successfully reproduced the bug.

I tried to locate the cause of the bug.



I assume this source look up thing relates to the bug, however it’s a bit hard to decipher this.

See you!

Filed under: Java, open source

Response to “Learning to be at the festival”

I saw the lecture video : Getting started in Open Source projects, or “Learning to be at the festival”: David Humphrey.

The video was very interesting. I like the way David described diving into an open source community as going to the festival.

As he told us last week, we do not need to be a main people who plays a significant role in the community, but I can be one of participants who enjoy the atmosphere – “because you are there, you are part of it.” The video encouraged me in a way I got an urge to learn and get most out of the involvement in the Eclipse WTP project.

I will try IRC to find some community formed for Eclipse development.

Filed under: open source

Running Eclipse using 32 bit JVM instead of 64 on Apple Mac

I decided to go for Eclipse WTP development, and Jordan asked me to read this tutorial to get a grasp of how to work on.

I’m going to make notes regarding the tutorial and problems that I faced.

Actually I am kinda new to Eclipse so I needed to learn a lot of terminologies relating to this tutorial.

Here’s the summary of some of key terminologies that I learned.

  • Eclipse WTP – WTP is a short for  Web Tools Platform. Eclipse WTP is one of top projects of Eclipse. Eclipse WTP’s goal is to become sort of a defact-standard in web-development by providing Web/J2EE development tools. WTP consists of two sub-projects: WST (Web Standard Tool), JST (J2EE Standard Tool).
  • WST basically covers non-Java development portion such as HTML, XML, SQL….
  • whereas JST covers Java-development portion such as JSP, JDBC, Servlet… WTP integrates these two portions and produces one powerful IDE for web development.
  • JRE – Java Runtime Engine, and JVM is an instance of this.

Let me start my first tutorial for Eclipse.

In this tutorial, we assume that current WTP has the following bug.

When a Web Application is running, in the server view the ToolTip window must display the date nd time when the window is created.

The following picture shows where the problem is.



In the picture above, we want tooltip area to display current system date and time instead of “Tomcat v6.0 Server at localhost”

So I started working on this pseudo-bug based on the tutorial. I did not encounter any problems until I reached the point where I was to deploy the change that I made for the target platform.

In the step 4 : Running your Eclipse Application, when I clicked on “Run” on my Development platform, it was supposed to launch the Target platform automatically.

Instead, I encountered the following errors.

java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM

This seems my Mac JVM is 64-bit and SWT (what is this?) needs 32-bit JVM in order to use.

I was a bit confused about the fact that I needed 32-bit JVM instead of 64-bit.

For the time being, I started looking for 32-bit version of JVM using google.

And I found terribly interesting thing here:

Apple is not supporting the 64-bit carbon API. SWT is written using carbon so it must be 32-bit. Apple won’t support 32-bit JDK 1.6. Therefore SWT won’t run on JDK 1.6 (along with any other Java program that had natives that made carbon calls).

Oh, I got it! In short, Apple doesn’t like Java.

At the moment, I could have moved to another platform to work on such as Windows / Linux…. but I wanted to persist with Mac because if I cannot solve this problem, I will be likely to end up mainly working with Windows / Linux platform most of the time during this semester, which is not good for me because I love Mac!

So I started further googling.

and I found a lot of websites attempting to install a lot of things to try to solve this problem.

and finally I found one comment at the end of the article in this blog which was the easiest and simplest way to solve this problem.

What I needed to do was just type in “-d32” in VM argument field

VM argument

VM argument

This forces Eclipse to use 32-bit JVM instead of 64-bit JVM. Very simple answer.

Now that I’m ready for using 32-bit JVM, I can apply changes that I made!

Here’s the result:

Now it displays the current date and time

Now it displays the current date and time

Now it’s working.


See you!


In this article, the author is talking about OS X 10.6 Snow Leopard:

There are some major news regarding Java in Snow Leoprad. First, it ships with Java 6 only. This includes 32-bit and 64-bit versions. The 32-bit is something which was unknown until the release of SL and it means Java 6 will be available on older intel machines which are not 64-bit capable (Intel Core Duo). Second, the 64-bit version is the default for users running 64-bit capable machines (Intel Core 2 Duo).

So since Snow Leoprad, which is the latest version of Mac OS, even though it has a capability of running both 32 and 64 bit JVM, Eclipse is defaulted to run 64-bit version of JVM.

Filed under: Java, open source

Hi there

Hi, my name is Yu Sasaki.

I am a CPAC student and currently enrolled in my 5th semester.

The reason I chose OSD600 course as one of my professional options is that I’m interested in how people all over the world get involved with one project and develop an application together.

I’m not sure how well I can contribute to the project surrounded by super programmers, but I’m thrilled to the prospect of my interaction and participation in a big cutting-edge project. I will try to learn and get knowledge out of this involvement.

The article are quite interesting in a way it gave me an insight of what the open source development all about was. Fixing bugs and implementing additional features like the author did in his mail client app by adding such as IMAP feature was very interesting (cathedral and bazaar).

I hope I can achieve something good through this course.

Filed under: open source,