On 03/26/2012 05:01 PM, Jacob Nordfalk wrote: > The easiest way to get it to run on Android would be to bundle the > compiled apertium_eo_en_eo_en_t1x.java together with lttoolbox-java in > the same Jar file. > I.e., to add it to the source code and load the class from classpath > instead of loading it from an external file. > That might also be the best long-term solution, but it is also 'ugly'. > > Another solution would be to look into how to convert a java JVM > .class file into a Dalwik class file (can they exist outside .dex > files?). Also not that pretty. > > A third solution would be to change transfer. Instead of making Java > source code which is compiled (requiring the Java compiler and thus > that JDK is installed on the user's machine) perhaps bytecode could be > generated directly and saved for subsequent use. > This would require use of a bytecode generator (there's a lot of them > out there, but I havent looked into this area). > > The bytecode that needs to be generated is not that complicated, as > can be seen from the generated apertium_eo_en_eo_en_t1x.java. It > consists of some variables, some methods (the macros), some > if-statements and method invocations. > Please also see http://wiki.apertium.org/wiki/Bytecode_for_transfer
Yes, the easiest way has been working for me, but ugly as Jacob said, I will commit my source code after make it a little more beautiful. And it do need more efforts to figure the other two methods, especially the third one - almost totally deprecated origin codes. -- cheers, echo ------------------------------------------------------------------------------ This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure _______________________________________________ Apertium-stuff mailing list Apertium-stuff@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/apertium-stuff