# Thursday, 21 November 2002
« map.xml | Main | Swamp »
ikvmc

Inspired by Stuart's comment to yesterday's post, I decided to clean up ikvmc a little to make it possible to compile executables.

Other changes:

  • it's now possible to specify an IL implementation of a native method in map.xml. At the moment this is used only for System.identityHashCode() to solve this issue.
  • map.xml is now parsed using the XmlSerializer (see yesterday's post on why this is not a good idea)
  • implemented a work-around for the stack overflow that occurred when the compiler couldn't find java.lang.ClassNotFoundException
  • ikvm now supports -classpath switch (thanks dIon)

I've only compiled a simple Hello World type executable with ikvmc and here are some things to look out for:

  • all classes (or jars) that are referenced by the application must be specified (except for the Classpath classes)
  • a reference (-reference:<path>) to the classpath.dll must be specified
  • when compiling an executable the class containing the main method must be specified
  • code that expects to be loaded by the system classloader will probably not work. Statically compiled code will be loaded by the bootstrap (aka null) classloader.

Example:
    ikvmc -out:hello.exe -reference:bin/classpath.dll -main:Hello Hello.class

Updated the binaries and source snaphots.

Thursday, 21 November 2002 12:53:45 (W. Europe Standard Time, UTC+01:00)  #    Comments [0]
Name
E-mail
Home page

I apologize for the lameness of this, but the comment spam was driving me nuts. In order to be able to post a comment, you need to answer a simple question. Hopefully this question is easy enough not to annoy serious commenters, but hard enough to keep the spammers away.

Anti-Spam Question: What method on java.lang.System returns an object's original hashcode (i.e. the one that would be returned by java.lang.Object.hashCode() if it wasn't overridden)? (case is significant)

Answer:  
Comment (HTML not allowed)  

Live Comment Preview