From: Erez D <ere...@gm...> - 2011-03-29 07:38:43
|
thanks for replying, I am an N900 user, a goal of mine is to have many more applications for me and any other N900 users. As I saw XMLVM can be used to translate android apps to iphone, i thought i could use XMLVM to translate android apps to the N900 as well. The N900 runs on a pseudo debian system, so making a native c+gtk or c+qt app will probably suffice. as a first step, i wanted to see if i could translate an application ( and took xokoban as an example ) to run under ubuntu, and later the N900. I read the XMLVM documentation, I got the idea, but some examples/tutorials could have helped me. i did 'ant clean' and then 'ant' and everything was built ok, then i did: cd xmlvm/trunk/xmlvm/demo/android/xokoban/src/org/xmlvm/demo/xokoban javac Ball.java and got: Ball.java:27: cannot find symbol symbol: class MovableGamePiece public class Ball extends MovableGamePiece { ^ Ball.java:28: cannot find symbol symbol : class GameView location: class org.xmlvm.demo.xokoban.Ball public Ball(GameView view, int tileSize, int x, int y) { ^ Ball.java:34: package R does not exist return R.drawable.ball_20; ^ Ball.java:36: package R does not exist return R.drawable.ball_30; ^ Ball.java:38: package R does not exist return R.drawable.ball_100; still need help getting started here. thanks, erez. On Mon, Mar 28, 2011 at 5:59 PM, Paul Poley <bay...@gm...> wrote: > XMLVM will translate Java code to Objective-C or C, but not C++. This is > good though since C++ is an extension of C. > > As you say you are a C++ programmer looking to translate Xokoban to C++, > I'm not sure XMLVM is what you're looking for. I.e. the idea is to write > code in Java & it will work the same running as Objective-C or C++, but you > shouldn't have to look at the Objective-C or C++ code, barring some > exceptions. If you do look at the generated code, you can easily tell a > human didn't write it, although with some XMLVM knowledge, you can read & > understand it. > > That to say, if you are interested in writing C++, XMLVM is probably not > the solution. If however, you are interested in writing Java, you've come > to the right place. > > To answer your question, Java source files are *.java. When you compile > them using "javac", they are converted into *.class. Those byte code files > (think of them in some ways similar to *.exe) are what the JVM executes in > Java proper & what XMLVM uses to translate to another language. > > So if you are interested in XMLVM, I recommend first acquainting yourself > with Java proper. > > Possibly to get you started though, run "ant clean" first to get rid of > some old files that may be causing 'package R does not exist'. > > Thanks, > Paul > > > On Mon, Mar 28, 2011 at 4:16 AM, Erez D <ere...@gm...> wrote: > >> I have just checked out xmlvm, and want to use it to compile android app >> to c++ >> I read the documentation, but still have problems understanding what to >> do. >> >> i have generated dist/xmlvm.jar using ant and openjdk >> >> BTW, I'm a c++ programmer, with small experiance in java. >> >> For example, i need help compiling xokoban (from xmlvm demo) to c++ >> 1. according to the docs, xmlvm's input is *.class, but xokoban files are >> *.java. do i just use javac to compile xokoban.java to xokoban.class (this >> will make java bytcode. is it ok or dex is needed ? (if so, how do i >> generate dex ?) ) >> 2. trying 'javac Ball.java' from xokoban's directory: i get many error >> messages of missing stuff, like 'package R does not exist'. is this because >> of the order i am compiling or am i missing somthing. >> >> >> can someone give me a small tutorials of how to generate c/cpp from >> xokoban (ubuntu 10.10 64 bit). >> >> thanks, >> erez. >> >> >> ------------------------------------------------------------------------------ >> Enable your software for Intel(R) Active Management Technology to meet the >> growing manageability and security demands of your customers. Businesses >> are taking advantage of Intel(R) vPro (TM) technology - will your software >> be a part of the solution? Download the Intel(R) Manageability Checker >> today! http://p.sf.net/sfu/intel-dev2devmar >> _______________________________________________ >> xmlvm-users mailing list >> xml...@li... >> https://lists.sourceforge.net/lists/listinfo/xmlvm-users >> >> > |