Posted by
marlonj on Dec 17th, 2008 in
Cacharreos |
0 comments

A continuacion crearemos un modulo de prueba en Wonderland basados en el siguiente tutorial :
http://wiki.java.net/bin/view/Javadesktop/ProjectWonderlandWorkingWithModules
Requerimientos :
- Tener una copia de Wonderland 0.5
Crear Archivos Modulo :
- Abrir una terminal
- Crear un directorio de trabajo :
mkdir modulo
cd modulo
- Descargar el modulo de ejemplo :
wget http://wonderland.dev.java.net/wiki/modules/example-module.tar.gz
- Descomprimir el archivo :
tar -zxvf example-module.tar.gz
- Cambiar al directorio recien creado :
cd example-module
Configuracion :
- Abrir el archivo de configuracion del modulo :
vi my.module.properties
- Buscar la propiedad wonderland.dir y cambiar por el directorio donde tenemos instalado el wonderland, por ejemplo :
wonderland.dir=/home/<usuario>/projects/wonderland
Modificar los Fuentes : Al parecer por cambios en la version se deben modificar los fuentes
- Abrir el archivo del servidor :
vi src/classes/org/jdesktop/wonderland/modules/example/server/ExampleCellMO.java
- Buscar la linea
import com.sun.sgs.app.ClientSession;
Reemplazar por
import org.jdesktop.wonderland.server.comms.WonderlandClientID;
- Buscar (aparece dos veces)
ClientSession clientSession
Reemplazar por
WonderlandClientID clientID
Compilacion y Emplazamiento :
- Compilamos utilizando ANT :
ant
- Ejecutar el servidor una vez
ant run-server
- Verifique que el siguiente directorio exista :
/home/<usuario>/.wonderland-server/0.5-dev/wfs/worlds/default-wfs
- Si no existe crearlo
- Crear el archivo para alojar la celda
vi /home/marlonj/.wonderland-server/0.5-dev/wfs/wordls/default-wfs/cell1-wlc.xml
- Adicionar la siguiente informacion :
<example-cell>
<origin>
<x>0.0</x>
<y>5.0</y>
<z>-5.0</z>
</origin>
<bounds>
<type>BOX</type>
<radius>3.0</radius>
</bounds>
<scale>
<x>1.0</x>
<y>1.0</y>
<z>1.0</z>
</scale>
<rotation>
<x>0.0</x>
<y>0.0</y>
<z>0.0</z>
<angle>0.0</angle>
</rotation>
</example-cell>
- Detener el servidor y lanzarlo de nuevo
- Abrir el administrador de modulos web
http://192.168.1.3:8080/wonderland-web-front/admin?pageURL=/wonderland-web-modules
- Instalar el modulo, buscando el archivo example.jar en el directorio dist del modulo
- Reiniciar el servidor utilizando la interface web, seleccionar Restart All
http://192.168.1.3:8080/wonderland-web-front/admin?pageURL=/wonderland-web-runner
- Abrir la pagina principal y lanzar el cliente
http://192.168.1.3:8080/wonderland-web-front/
o lanzarlo desde linea de comando
javaws http://192.168.1.3:8080/wonderland-web-front/app/Wonderland.jnlp
No hay entradas relacionadas.
Leave a Reply