g3ek/smajava — Issue #1: Source doesn't compile with openjdk-6
Author: pvbiesen
Created: 2012-02-05 16:26:45+00:00
State: open

Java version:
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11pre) (6b24~pre2-1)
OpenJDK Server VM (build 20.0-b12, mixed mode)

OS:
Debian testing i386
Linux 3.1.0-1-686-pae #1 SMP Fri Dec 23 19:59:41 UTC 2011 i686 GNU/Linux

Trace :
javac -cp lib src/be/geek/smajava/*
Inverter.java:10: package javax.microedition.io does not exist
import javax.microedition.io.Connector;
^
Inverter.java:11: package javax.microedition.io does not exist
import javax.microedition.io.StreamConnection;
^
Inverter.java:112: cannot find symbol
symbol : class StreamConnection
location: class be.geek.smajava.Inverter
StreamConnection connection = (StreamConnection) Connector.open(getConnectionURL());
^
Inverter.java:112: cannot find symbol
symbol : class StreamConnection
location: class be.geek.smajava.Inverter
StreamConnection connection = (StreamConnection) Connector.open(getConnectionURL());
^
Inverter.java:112: cannot find symbol
symbol : variable Connector
location: class be.geek.smajava.Inverter
StreamConnection connection = (StreamConnection) Connector.open(getConnectionURL());
^
5 errors

Googling for the error brings me to following statement :

No javax.microedition.io in a J2SE compatible jvm/classpath environment.

Apparently javax.microedition is SUN Java specific and not included in the J2SE specification. Is this correct ?

Kindest regards,

Peter.