Java GUI on IPhone (example)
During Java instalation there was sample programm installed. It is called HelloJava. It is a bit more complicated than basic console HelloWorld-type application, that we tried to compile and run during this tutorial. HelloJava uses gui and SQLite. It uses several classes, that are bridges to IPhone's functionality (GUI, sound, SQL, etc). But all that it does is it reads contacts' first and last names from IPhone's database (throught SQL select statement) and shows them on the screen in GUI mode. It also produses simple sound in the end.
Here is a screenshot of the icon and application itself:
The application consists of several files:
This file that actually runs the application. It is simple bash script:
# XXX: Java is symlink'd to here so the home button works
exec "$(dirname "$0")"/Java -Xmx8M -Xss256K -cp /usr/share/java/sqlite.jar:/usr/share/java/jocstrap.jar:/usr/share/java/uicaboodle.jar:"$(dirname "$0")" com.saurik.uicaboodle.Main HelloJava "$@"
These are compiled java class files.
This is a xml description file, contains info about executable and etc.
That's it. Quite simple.
Using this example it is easy to create your own GUI Java application
Follow us on