Quote:> Hi,
> Have you considered Jeode from www.insigina.com? It offers a Java VM for
> the Pocket PC.
Actually, I just figured it out! I can't believe it. It actually works. I'm
editing .java files in Tillanosoft's notepad, compiling them using Personal
Java and running the .class files using the ChaiVM. This is so cool and
unbelievable. Obviously this is very rough, though. And it's going to need
some refinement, but at least I can test examples, etc. I need some help,
though, from anyone who wants to give it a whack, with some refinements.
First of all, here (in brief) is what I did. I'm not promising this will
work for anyone, just telling you (general you) what I did so you can take a
stab at it if you want.
I read and read and read online. Found a good site at
(http://www.hasiland.com/javaonepoc/javac.html) that helped with giving me a
jump start into what one should do. I followed these directions (sort of)
and modified them to fit my needs.
#1 - First of all, I installed Personal Java beta at "\Storage Card\Program
Files\Java\"
#2 - Created a directory at the root of my HP 720 called "\Classes"
#3 - Followed the directions on the site to create two .jar files named
javac.jar and missing.jar. Nothing scientific about this, I just followed
the directions.
So these classes....
sun/tools/asm/*.class
sun/tools/java/*.class
sun/tools/javac/*.class
sun/tools/javac/resources/javac.properties
sun/tools/tree/*.class
from the Java base source for the 1.1.8 JDK got wrapped into javac.jar. And
these classes...
java/awt/*.class
java/io/*.class
java/lang/*.class
java/net/*.class
java/security/*.class
java/text/*.class
java/util/*.class
got wrapped up into missing.jar.
#4 - Contrary to the directions I dropped both of these .jar files in
"\Storage Card\Program Files\Java\lib"
#5 - Worked a bit with a wrapper class similar to the one Frank (from the
site above) devised. What I came up with after a bit of trial and error is
really simple....
----------------------------------------------
public class Javac {
public static void main(String argv[]) {
String[] newargv = new String[1];
newargv[0]=argv[0];
sun.tools.javac.Main.main(newargv);
}
Quote:}
-----------------------------------------------
#6 - Using the 1.1.8 JDK I compiled this into javac.class and dropped this
file under "\Classes"
#7 - Went to the command line of my Jornada 720 and used the following
command to run the class against a file also in the "\Classes" directory
entitled HelloWorld.java...
From the classes directory I typed....
"\Storage Card\Program Files\Java\bin\pjava.exe" -classpath "\Storage
Card\Program Files\Java\lib\missing.jar;\Storage Card\Program
Files\Java\lib\javac.jar" -file "\Classes\Javac.class" HelloWorld.java
#8 - Went into ChaiVM and ran "\Classes\HelloWorld.class" and it worked.
For some reason this compiled class doesn't run in Personal Java, or maybe
it's just that Personal Java's console doesn't work right and I can't see
the print out. Either way, ChaiVM showed me that my journey was complete.
Now obviously you can see above that this isn't perfect. I need to find out
how to dynamically set the classpaths and it would be nice if I could get
Personal Java to show the System.out.println()s but all the same I'm able to
compile and run java from under Windows CE. Pretty strange, pretty cool and
it's going to be fun using this for my class. If anyone wants further help,
is curious to try or runs into problems feel free to email me. I can't
promise anything, since I just did it, but I'll try.
Preston