FLM Javac Wrapper
                   brew coffee on the go

About - Manual - Download/Installation - Release Notes - Contact/Report bugs
 
  Latest news
  27/8/2005 After a busy year and having not so much time for programming anymore, I think I will never be able to continue development of the Javacw Wrapper. Another reason why I stop development is the lack of free JREs for Pocket PCs.
When checking the links on this page I saw that Michael Krolls webpage no longer contains information about MIDLets, so this link is obsolete. The link to the ME4SE project has also changed. Information about the project can now be found under http://kobjects.sourceforge.net/me4se/pocketpc/

9/1/2004 Today I have some news for you. The first one isn't a good one. Sun has discontinued the distibution of the "PersonalJRE for Windows CE", so there is no free JRE for the Pocket PC at the moment (If someone knows one, please email me the URL)
I wanted to do a "redesign" of the Wrapper and fix some bugs, but before I will do that it would be nice if I could get some feedback about which runtimes you are using for running the wrapper on.
I also have a good news :-) You can develop midlets on your PDA! See me4se.org/pocketpc/ or www.kroll-mobile.de/

30/4/2003 Good News, Mad Max (Ygor) gave me some feedback and so I decided to do some bugfixing.
You can download a new version from here. The bugfixes reach from the missing ScrollBars in the FileDialog, some display issues up to some optimizations of the wrapper. The wrapper shouldn't hang the pocket pc anymore and the panic alerts shouldn't pop up that often. (During compiling the wrapper on my iPAQ, running the wrapper the sophisticated way with 11Mb free RAM, I had no crash and no java panic).

Well, the sad thing is, that there where over 80 downloads during the last two month and only one guy was giving feedback :-(. I hope you all do better now.

Other news:
  • I have decided to offer a modular version of the wrapper, so that you don't have to download all that compiler stuff everytime there is a new version.
  • After using the wrapper a little bit more often, I have installed it into the start menu on my iPAQ and I have written some instructions how you can do this also
  • The last thing that is new is the guide on how to set up your Pocket PC for running and compiling Swing applications
  • btw. I still haven't updated the documentation :-(

14/3/2003 SORRY guys, I have discovered that I had the wrong link to the jar file on my page, so a lot people must have downloaded the old crappy version. Get the new version now.
I have also discovered, that my ISP wasn't forwarding the emails correctly, but now they will.

28/2/2003 I released an updated version of the wrapper which fixes some problems. This version isn't tested very much, so please report bugs! Sorry that I hadn't the time for updating the documentation, but this will be done soon.

New features are:
1. A new FileDialog which should be smaller and therefore faster than the older version.
2. Now you can create projects
3. You can open a project by calling java -jar Javacw.jar yourproject.jwp so that you can register the .jwp file type with the wrapper for opening a project by simply clicking on it.

Old features are:
1. Compile java applications on Pocket PC
2. Run the compiled application from within the compiler (experimental)
3. Dialogs for setting the detailed options for compiling
 
  What is the FLM Javac Wrapper?
  FLM Javac Wrapper is a wrapper program for Sun's sun.tools.javac package and allows you to compile Java classes on systems that don't have a command line like Pocket PC 2002. You also can use it as a GUI on systems that have a command line, if you like. This program is written in Java and requires an installed Java 1.1 runtime (or later) for execution.
It is based on the great work of Yani Ioannou (Java development on the Pocket PC (esp. iPaq)) and Frank Bodmann (Compiling Java on EPOC) and wouldn't exist without these guys. Thanx a lot!
 
  How to use it?
    Animation of the wrapper On the right you see an animation of the wrapper running on the iPAQ.

At the top of the screen is the toolbar with its Buttons:
-Add File...: Opens a FileDialog where you can select the file that should be added to the compiler.
-Compile: Calls sun.tools.javac.main with all added files and the options selected in the options menu
-Run: Tries to run the compiled class if it is an application with a main method
-New: Removes all files from the compiler

Below the toolbar is a TextArea which displays the output of the compiler or your running program. It is also used to display errors occuring during the execution of the wrapper.

Then there is a status bar which informs you about what the wrapper is doing at the moment.

At the bottom of the Screen you'll find the Menu which contains the following sub menus:
File
-New: Removes all files from the compiler
-Open Project: Opens an existing Javac Wrapper Project (.jwp)
-Save Project: Saves the current project
-Save Project as ...: Allows you to save the current project into another file
-Add File: Opens a FileDialog where you can select the file that should be added to the compiler.
-Add Directory: Opens a FileDialog where you can select a file or directory that should be added to the compiler.
If you choose a file, this file will be added as first file to the compiler and after that all other .java-files will be added to the compiler
If you choose a directory all .java-files from this directory will be added to the compiler. The first file to be added is the first .java-file in the directory.
-Remove file(s): Opens a Dialog where you can choose the files to be removed from the compiler.
-Compile: Calls sun.tools.javac.Main.compile(String[]) with all added files and the options selected in the Options menu
-Exit

Options
-Compiler Options: Opens a Dialog where you can select the options that should be used when the files are compiled
-Run Options: Opens a Dialog where you can select the options that should be used when the compiled application is started

The Compiler Options:
-g: Generate all debugging info
-O: Optimize; may hinder debugging or enlarge class file
-nowarn: Generate no warnings
-verbose: Output messages about what the compiler is doing
-deprecation: Output source locations where deprecated APIs are used
-classpath <path>: Specify where to find user class files
-Autobuild classpath: If this option is enabled, the paths of the added files will be added to the classpath automatically
-d <directory>: Specify where to place generated class files
-depend: Recompilation of class files on which the source files given as arguments recursively depend
-J<javaoption>: Passes through the string javaoption as a single argument to the Java interpreter which runs the compiler. The argument should not contain spaces. Multiple argument words must all begin with the prefix -J, to the first argument -J is added automatically

The Run Options:
-Allow run by invoke: If this is enabled, the runButton will be enabled although the System doesn't support the Runtime.exec() command.
In this case, the application is started by invoking it's main method from within the wrapper. This sounds easy, but it causes some substantial problems which should be solved in this release, but I can't guarantee that there are no bugs. One still existing problem is that if your compiled application calls System.exit(int) it will cause the wrapper to close too. This problem is solved for Java 1.2, so if you want to run the wrapper with a Java 1.2 runtime take the sources, remove the comments in SecurityManager part in Javacw.java and recompile it.
(For iPAQ Users: The JVM for the iPAQ has a bug which causes the JVM to crash, whenever you hide a frame that was created from your application.)
-Autobuild classpath: If this option is enabled, the paths of the added files will be added to the classpath automatically. This may cause some problems if you are trying to run a class which is part of a package
-classpath <path>: Specify where to find user class files
-Class name to run: Enter a class file which should be executed when the runButton is pressed

Java Panic NOTE for User of handheld devices:
Don't panic if you see a message like that when opening a FileDialog, just press ok :-)
 
  How to install?
easy or sophisticated or install Swing
 
    Easy installation

1. Make sure that you have a Java Runtime Environment installed on your system
If you don't have one get it from Sun (PocketPC Users: PersonalJRE for Windows CE) or somewhere else and install it.

2. Read and accept the license agreement.

3. Download the wrapper from here:
By downloading software from this server you indicate your acceptance of the license agreement. If you don't accept the license agreement you're not allowed to download anything from this page.

The source code is a little bit messy, because I have developed the main parts of the application on my iPAQ and you do not really have a good overview over your classes in this rudimental environment, so be prepared.

4. Copy the files to your system and run it
You can run the program by clicking on the jar file (if your system is setup to execute executable jars) or by typing java -jar yourinstallationdirectory/Javacw.jar on the command line of your system (if there is one).

5. Optional:
If you want to develop some extensions for the wrapper or if you need for some other reasons multiple installations of the wrapper you should extract the directories java, javaw and sun from the executable jar file and put them somewhere else in your classpath.
You also could follow the sophisticated instructions.
 
    Sophisticated installation

The advantages of this installation type are that the wrapper is running faster and you don't have to to download the whole compiler stuff everytime an update is available.

1. Make sure that you have a Java Runtime Environment installed on your system
If you don't have one get it from Sun (Pocket PC Users: PersonalJRE for Windows CE) or somewhere else and install it.

2. Read and accept the license agreement.

3. Download the wrapper parts from here:
By downloading software from this server you indicate your acceptance of the license agreement. If you don't accept the license agreement you're not allowed to download anything from this page.


4. Copy the compiler.jar and the wrapper.jar onto your pocket device. I have choosen \Program Files\Java\lib for the compiler.jar and \Program Files\Javacw for wrapper.jar.

5. Now take the FLMJavacWrapper.lnk and open it with any text editor you like. You will see one single line of code. That line should look like this:
151#"\Program Files\Java\bin\pjava.exe" -classpath "\Program Files\Java\lib\compiler.jar" -setcwd "\My Documents" -file "\Program Files\Javacw\wrapper.jar"

The number at the beginning is representing the total size, in characters (including spaces) in the line of text following the # (pound) sign. So if you change something in the line, you should adjust this value too. (I haven't noticed any problems if this value is wrong, but who knows).

The next part is also easy, it's the program you want to run (which is pjava.exe in this case). So nothing to change here.
Now you have to set the classpath. Here you should enter the path to the compiler.jar on your system.
the -setcwd option set the current working dir for the Wrapper. In my case this is the \My Documents where I store all my java projects.
The last element is the file that should be executed. this should be the wrapper.jar.

6. The last step is to copy the edited FLMJavacWrapper.lnk to the \Windows\Start Menu folder or to whatever folder you want.
 
    Install Swing

1. Download the TAR/ZIP Version of the "JavaTM Foundation Classes (JFC) 1.1 with Swing 1.1.1 Release" from http://java.sun.com/products/archive/jfc/1.1.1/index.html

2a. Extract the swingall.jar from the downloaded file.
2b. I havn't heard of it before, but ther shall be a bug in the swingall.jar. How to fix it is reported at http://forum.java.sun.com/thread.jsp?forum=56&thread=280486.

3. Copy it onto your pocket pc into any directory, i.e. \Program Files\Java\lib.

4. Add the JAR file to the classpath in the registry. Take a registry editor and change the key \My Device\HKEY_CLASSES_ROOT\Java Class File\Shell\Open\Command to something like "\Program Files\Java\bin\pjava.exe" -classpath ".;\Program Files\Java\lib\swingall.jar;" -file "%1".
NOTE: I encountered some trouble when the classpath in the registry was too long. This caused the JVM to ignore the classpath completely. So if you have more files which should be in the classpath you should try to put them into a single jar, or to call your program via a shortcut (see sophisticated installation of the wrapper)
 
  What's missing, what will be added?
    First at all, this release is not final, it still has some problems that will be solved in the final release. So please check regular (once a year ;-)) for a new release.
I don't like version numbers because I belive that a program has reached version 1.0 when I consider to stop developing it. So this release is "FLM Javac Wrapper preview 20030430". I think the next releases will only be bugfixes, but when I have the time I will try to add a functionality to produce jar files from projects. But this is just a vision at the moment.
 
  How to report bugs and good ideas?
    This program is a work in progress and works as designed ;-)
To make it working better it would be really nice to know what problems other people have using this software. It would also be nice to know what features other people dream of.
Therefore I'd really appreciate it if you could mail me every bug you discover or idea you have. Please contact me using .

Step by step bug report
1. Make sure that the bug is reproduceable
2. Create a simple scenario for the bug
3. Write a bug report to and don't forget to attach your scenario.