Sure, here it is. Patch: http://fpotter_public.s3.amazonaws.com/thrift_j2me.patch
Modified Java Runtime: http://fpotter_public.s3.amazonaws.com/thrift_j2me_runtime.tar To get the version of Thrift I was using: svn co -r 684377 http://svn.apache.org/repos/asf/incubator/thrift/trunk thrift To apply the patch: cd thrift patch -p0 -i /path/to/thrift_j2me.patch To generate: thrift -gen java:j2me yourfile You'll probably want to throw out the TSocket in my modified runtime and just grab the original TSocket or THttpClient from under lib/java/src/com/facebook/thrift/transport Fred On Wed, Aug 11, 2010 at 6:32 AM, Ralf Kluthe <[email protected]> wrote: > Hello Fred. > > > > Thank you for the information. > > I'm interested in the patch. > > > > For my understanding > > The patch only works with the old thrift version > > of 2008. Is this right? > > Alternatively, I have the idea to map the C++ interface > of a thrift server/client to Java version 1.4 by using the > > JNI. > > > > > > Ralf > > -----Ursprüngliche Nachricht----- > Von: Fred Potter [mailto:[email protected]] > Gesendet: Dienstag, 10. August 2010 20:06 > An: [email protected] > Betreff: Re: Thrift and java 1.4 > > > > I have a patch against a very old version of Thrift (summer 2008, I > > think) that makes the generator output Java 1.0 compatible code (I > > needed to run on J2ME devices at the time). There's also a slightly > > modified runtime. The binary protocol then is the same as it is now, > > so it should run against current Thrift servers. > > > > I'm happy to send it to you if you like. You'll have to fiddle with > > the Transport part as what I was doing for J2ME probably won't work > > for you. Also, I never got around to supporting "set" types. > > > > Fred > > > > On Tue, Aug 10, 2010 at 2:29 AM, Ralf Kluthe <[email protected]> wrote: > >> Hello. > >> > >> We want to use thrift on an embedded device for communication > >> between C++ and java processes. But on the embedded device > >> only a java VM version 1.4 is available. In this version java generics > >> are not supported. > >> Is there any possibility to use Thrift with java 1.4? > >> > >> > >> > >> Thanks, > >> > >> Ralf > >> > >> > >
