Question

Are there any solutions or tools that transform java 5 code that uses all the new java 5 features(generics, autoboxing, varargs, static imports) into code that can run on a J2ME device? I am particularly interested in handling generics - the other features are nice to have but not mandatory.

I need source code as the result of this conversion as this will be compiled using a custom compiler. (I cannot use bytecode manipulation(ala retroweaver))

Was it helpful?

Solution

Compiling with the regular javac and targeting an older JVM will give you proper bytecode for generics at least.

If you really need source it's probably possible, though strange, to compile to bytecode and then decompile back to source.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top