|
First Look at Running a Java App on the OLPC XO LaptopInstalling a JREThis page says that Sun's regular x86 Linux JRE can be installed. I think the non-RPM self-extracting file option is the easiest:su cd /usr/local mkdir java cd java chmod a+x jre-1_5_0_11-linux-i586.bin ./jre-1_5_0_11-linux-i586.bin Test Your InstallCheck the JVM version from Terminal:java -version Run a Test AppJBook is a good test application. Download the latest version. Then start it from Terminal:java -jar jbook.jarIt should appear on screen. However, it currently shows up as a gray screen. Hitting tab a couple of times and then the spacebar will bring up a dialog, which looks correct, but the main book display doesn't appear. Update: If you press the "Rotate" button (on the left side of the screen), the app will resize to fill the screen and you can see it normally. JBook runs nicely full-screen in bright sunlight. AWT applications like OrderedLife show up correctly, albeit at their default resolution. The rotate trick makes them show up full-screen as well. The default font is somewhat small, however. Sugarizing a Java GUI -- A Quick DustingA well-behaved application on the XO Laptop interacts with the Sugar environment to support icon display in the ring, suspend and restart, and more. The act of taking a normal X11 app (like any Java AWT or Swing GUI) and making it a good citizen in the Sugar environment is known as Sugarizing.The easiest way to Sugarize an existing application appears to be to write a small python app that uses the Sugar library, and have that app launch the existing application. So for example with JBook the python app would run "java -jar jbook.jar". The python app is responsible for taking Sugar messages and forwarding them to the Java app. It should be possible with minimal effort to make a Python Activity which can run any GUI Java app with a tiny configuration change. The Java application would only be minimally Sugarized, but at least it would appear in the "Ring" and honor shutdown requests. Very Sweet Java -- The Future of Pure Java Sugar IntegrationThere is no reason the functionality of the python Sugar library couldn't be made available as a Java class library. Then a Java application would be Sugarized by making use of the Java library, no Python needed. This level of integration would make a Java app be a full-fledged Sugar citizen and indistinguishable from all of the Sugar apps shipping bundled with the XO.Other XO informationSome other sites with XO information: |
Copyright © 2024 Andrew Oliver