Friday 23 May 2008

Eclipse 3.3 + WTP 2.0

Some weeks ago I tried to install Eclipse 3.3 with WTP 2.0 (All in one) and JDK 6 in my notebook with Windows Vista.
The problem I had was really bothering, but easy to solve when I realized why I was getting the weird behaviour in the application.


The problem:
I unzipped Eclipse in a directory and when I executed it ev
erything worked fine but all the parts of the application related to dynamic web projects. I realized about this because creating a new Dynamic Web project was what I wanted to do. I didn't have the option in the File-> New menu, neither I had the JEE perspective.

The cause:
Apparently, after installing the JDK 6 I installed a JDK 1.4 for some reason. The environment variables were updated with the 1.4 JDK and so, Eclipse
tried to work with that one instead of the JRE 6.

The really weird and bothering behaviour was that when Eclipse started working, it didn't show any warning or error related of the incorrect JRE being used. The bad thing is that I spent more time than what I would have wanted in reaching to the real cause of the problem. As usual, I realized about the possible cause of my problem while doing something else... (this time while cleaning my teeth :P)



Spanish version...

Hace un tiempo intenté instalar en mi notebook con Windows Vista un Eclipse 3.3 con WTP 2.0 que viene en un paquete todo junto (All in one) junto con la JDK 6.
El problema que me surgió fue bastante molesto, pero fácil de solucionar cuando me dí cuenta por qué sucedía.

El problema:
Descomprimí el Eclipse en un directorio y al ejecutarlo, levantaba perfecto salvo por el hecho de que varias opciones no aparecían en los menúes. Me dí cuenta de esto porque por ejemplo no tenía las opciones de creación de proyecto web dinámico (ni las vistas relacionadas con proyectos web). El resto de la aplicación andaba bien.

La causa:

Aparentemente por alguna razón, en algún momento instalé una JDK 1.4 y las variables de entorno del sistema quedaron apuntando a esa JDK. Por lo que el Eclipse intentaba levantar con la JRE 1.4 y esta versión del Eclipse sólo funciona con JREs de 5 para arriba. Lo que me llamó mucho la atención es que al levantar el Eclipse no me tiró ningún error o warning que me indicara que el problema era ése.

Bastante molesto, porque llegar a la raíz del problema me llevó más tiempo del que hubiera esperado. Como de costumbre, me dí cuenta de qué era lo que pasaba cuando dejé de tratar de resolverlo y me puse a hacer otra cosa... (cepillándome los dientes...)

4 comments:

Hernán said...

Que raro lo que contas. WTP funciona con jdk 1.4. Podria ser que las variables no solo cambiaron por la jdk 1.6 a 1.4, sino que apuntaron a la jre 1.4 ? Igual te recomendaría que te lleves la notebook al baño y labures desde allá.

Daniel Zuazaga said...

Por lo ví, WTP 2.0 funciona como mínimo con Java 5.
En el link del post dice: "Note that WTP requires Java 5 or higher (and, for some things, actually requires a JDK rather than only a JRE)"
El problema fue que el Eclipse estaba levantando con la JRE 1.4 porque las variables de entorno le pegaban a esa JRE.
La opción del baño es buena, pero no tengo Wi-fi jeje...

Unknown said...

Es necesaria alguna versión específica de eclipse?
Estoy intentando hacer la instalación del WTP con JDK 1.5 y eclipse 3.4.0 y me falla.

El fallo al intentar instalar el paquete es : "An error ocurred during provisioning. Error with signed content.
Either the manifest file or the file has been tampered in this jar: c:\...."

Alguna idea...?¿?

Gracias y saludos!

Daniel Zuazaga said...

Depende de la versión de WTP que quieras usar. Si estás usando las últimas versiones debería funcionar bien. Fijate acá:
http://download.eclipse.org/webtools/downloads/drops/R3.0/R-3.0.5-20090521045405/

¿Ese error te lo tira cuando lo querés inestalar con el Update Manager?
Un abrazo