Hui WANG's Blog

One will, One way

Tag: eclipse

Add Javadoc to Sip Servelt 1.1 API in Sailfin

This can be a generci methode to associate JAVADOCs to APIs. In my situation, I managed to add sip servlet 1.1 (jsr 289) javadoc under Sailfin in Eclipse IDE.

Suppose that you’ve created a sip serlvet, and it is set to work under the default Sailfin run-time environment. Since jsr289 is supported in Sailfin, the class javax.servlet.sip is included in the default library.

1.Go go the library folder under you servlet project, in which you can find Salfin1.1.

2.Expand it and  right click on the file named ssa-api.jar to configure its propertity.

3. In the following window, switch to javadoc location. Choose the first option javadoc url and then hit this url

http://download.oracle.com/docs/cd/E13153_01/wlcp/wlss40/javadoc/jsr289/

Install PDT 2.0.1 and Eclipse 3.4.1 in ubuntu 9.04

What is PDT?

The PDT is working towards providing a fully functional PHP Integrated Development Environment framework for the Eclipse platform. This project will encompass all development components necessary to develop PHP-based Web Applications and will facilitate extensibility. It will leverage the existing Eclipse WTP Project in providing developers with PHP capabilities. The main components in this project are: Editor (syntax highlighting, code assist and code folding), Inspection (file / project outline and PHP explorer view) and Debug (PHP script and web page methods).

Step 1 Install JDK

At the moment of writing, Ubuntu repositories contain Eclipse 3.2.2 while latest release is version 3.4.1. If one wants to stay current with Eclipse version, it has to be installed manually.

When installing from distributable archives, Eclipse has only dependency – Java JDK. In this example I will use Sun JDK. To verify which Java has been installed, type in terminal:

java -version

To install it Sun’s JDK ver 6, issue the following command:

apt-get install sun-java6-jdk

Step 2 Install PDT Eclipse all-in-one

In this example, we’ll install All-In-One Linux x86/GTK 2. The package can be downloaded here.

When download finishes, we’ll uncompress the archive. Here I suppose that archive is saved in user’s home directory.

cd

tar -zxvf pdt-all-in-one-linux-gtk-2.0.1.tar.gz

This will create directory /home/[USER_NAME]/eclipse

Now you can start eclipse by type the following command in a terminal

~/eclipse/.eclipse

This way is not very efficient, in the next step I will show you how to creat a excutable and a menu item.

Creat Eclipse executable and menu item

Move the eclipse directory to /opt and rename it on adding the current version.

sudo mv ~/eclipse /opt/eclipse-3.4.1

Then create an eclipse executable in your path
sudo gedit /usr/local/bin/eclipse

with this content

#!/bin/bash
export JAVA_HOME=”/usr/lib/jvm/java-6-sun”
export ECLIPSE_HOME=”/opt/eclipse-3.4.1″

$ECLIPSE_HOME/eclipse

To make it executable, use this command

sudo chmod 755 /usr/local/bin/eclipse

Then create a gnome menu item

sudo gedit /usr/share/applications/eclipse.desktop

With this contents

[Desktop Entry]
Encoding=UTF-8
Name=Eclipse
Comment=Eclipse IDE
Exec=eclipse
Icon=eclipse
Terminal=false
Type=Application
Categories=GNOME;Application;Development;
StartupNotify=true

After executing this command, you can run from the menu item
applications/programming/eclipse

Conclusion

Voila, it’s PDT, To install the newer version, it  will be the same method.