1

As you may see from the title, for some reason I need to make running .class files on Minix possible (a compiler is not necessary). So could somebody point me in any direction, suggest some literature or give some advice? Generally, how would you do it?

Until now I found OpenJDK (but it's not exactly what I am looking for). I have also read Tanenbaum's "operating systems design and implementation". It gave me a lot of insight of minix internals.

user1902247
  • 123
  • 12

2 Answers2

1

If you just want to run .class files without much concern for performance, you could create a bytecode interpreter, which might be simpler than porting / creating a full compiler. You can find the format of these class files detailed here, and the behavior of the VM specified here.

You'll also need to pick a runtime -- OpenJDK and GNU Classpath are probably the best bets -- and port it to MINIX by implementing its native methods in C. native methods are usually concerned with platform-specific stuff, like calls to file I/O, and therefore cannot be implemented in the platform-independent Java language.

There are a number of other links and resources that you might find useful on this wiki page.

int3
  • 12,861
  • 8
  • 51
  • 80
  • Great, thank you, I thought about interpreter just didn't know if it were possible. – user1902247 Dec 14 '12 at 12:32
  • Also, if its possible can you give me some rough estimation of time needed for this project? I'm not totally sure what am I getting into :) – user1902247 Dec 14 '12 at 12:44
  • Well, it depends on your skill level and prior experience, and how complete of a port you want it to be :) I have been working on porting the OpenJDK to the browser (see the wiki page I linked), and it took 2-3 of us about 1.5 months to get `javac` running. We weren't doing it full-time, however. – int3 Dec 14 '12 at 20:33
  • Just one more question, what do you think about porting jamVM to MINIX instead of openJDK? And do you think it would be faster? The porting not execution, performance is not relevant. – user1902247 Dec 15 '12 at 13:49
  • I don't have any experience with JamVM, so it's hard for me to say. – int3 Dec 15 '12 at 19:42
0

The Jainja JVM (I'm the author) can work on Minix 3.2 (not tested with 3.3). It's an interpreter (i.e. no JIT) with Java 5 standard library. There is limited support of AWT/Swing using a X11 backend.

glegris
  • 1
  • 1