Instalando J2ME + NetBeans no Ubuntu

Problema
Instalar, configurar e testar J2ME no UBUNTU 9.10 - Karmic Coala

Downloads
[ Java JDK 6 ]

Download do NetBeans para J2ME
http://netbeans.c3sl.ufpr.br/6.8/bundles/netbeans-6.8-ml-java-linux.sh

Download do JWT 2.5.2
https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=sun_java_wireless_toolkit-2.5.2_01b-oth-JPR@CDS-CDS_Developer

Solução
Pelo terminal, dar permissões para executar o arquivo e executa-lo em seguida:

chmod 0777 ./sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin
sudo ./sun_java_wireless_toolkit-2.5.2_01-linuxi486.bin



Após ler toda o contrato devera aparecer

No suitable Java interpreter was detected

0) Specify a path to a Java interpreter directory.
1) Cancel this installation.
Select a choice [0-1]: 0

This application requires Java 2 SDK, Standard Edition (1.5 or later). Enter a path to a Java 2 SDK (For example: /user/jdk1.5/bin). You can type "exit" to cancel installation.
Enter a path to the Java 2 SDK: /usr/lib/jvm/java-6-openjdk/bin
/usr/lib/jvm/java-6-openjdk/bin/java
Testing /usr/lib/jvm/java-6-openjdk/bin/java...

Please enter a directory into which you would like to install the Sun Java(TM) Wireless Toolkit, 2.5.2 for CLDC.
[ default is /home/tarcisio/Área de Trabalho/WTK2.5.2 ]:/home/tarcisio/wtk
Installation directory is /home/tarcisio/wtk.

Check for Product Updates

Sun Java(TM) Wireless Toolkit for CLDC includes Check for Product Update feature.
This feature will be active every 7 days and will inform you about the new Product Updates.
No personally identifiable data such as name, address, or e-mail address will be collected. You can disable this feature later in Preferences.
The information collected by Product Update includes the following:

* Operating system
* Country and Language setting on your computer
* Date and version of the Wireless Toolkit that you are about to install
* Unique random user ID generated by the Wireless Toolkit

Collected data will be used for future improving of the product.
Please read Sun's Privacy Policy at http://www.sun.com/privacy/index.html

Check for Product Updates? [yes or no] yes

Setup has enough information to start copying the program files.
Current Settings:
Destination Directory
/home/tarcisio/wtk/
JVM Folder
/usr/lib/jvm/java-6-openjdk/bin/
Check for Program Updates
Enabled

Please choose one of the following options:
0) Begin copying files if you are satisfied with the settings .
1) Cancel the installation.
Select a choice [0-1]: 0
Checksumming...

Extracting the installation files...
Documentation for the Sun Java(TM) Wireless Toolkit
2.5.2 for CLDC is in the file
/home/tarcisio/wtk/index.html
In order to start using the Sun Java(TM) Wireless Toolkit 2.5.2 for CLDC, please run
/home/tarcisio/wtk/bin/ktoolbar

PARA TESTAR:

tarcisio@PASCAL:~/Área de Trabalho$ /home/tarcisio/wtk/bin/ktoolbar
OTA server emulation started ...
HTTPS server emulation started ...

Instalando o NetBeans

chmod 0777 ./netbeans-6.8-ml-java-linux.sh
sudo ./netbeans-6.8-ml-java-linux.sh



Testando tudo:

Abra o NetBeans ( ele deve ter feito um atalho em aplicativos > desenvolvimento > netbeans, se não, vá pelo terminal:

/bin/sh "/usr/local/netbeans-6.8/bin/netbeans"

Vá em Arquivo > Novo Projeto escolha Java Me e clique em Próximo
Pode deixar tudo padrão ( certificar que esteja checado em "criar midlet olá" )



Agora é só apertar no icone de "play" ou apertar F6 para ver o aplicativo rodando.

O arquivo JAR é gerado em /home/tarcisio/NetBeansProjects//dist

Um comentário: