Project Oberon Java

Project Oberon Java (poj) is a port of Project Oberon to the Java Virtual Machine (JVM). As compiler oberonc is being used. JVM does not allow SYSTEM.ADR and garbage collection as well as module loading is built in. So small changes to original code and interfaces are necessary.

Instructions for running the system

Download file most current poj23xxyy.tgz from files section here.
Extract it via "tar xzf poj23xxyy.tgz"
Download disk image e.g from and rename it to oberon.dsk.
From Linux or windows execute "java -cp poj/out Modules" add "-Dsun.java2d.uiScale=2 " if you have a hidpi display and Linux.
Source was compiled with openjdk 20.0.1. This version is also necessary for running.

For compiling programs, git clone , extract poj in current directory and add e.g. following Makefile:

    rm -rf poj/out/
    mkdir -p poj/out/
    javac -cp $(OBERON_BIN) -d poj/out poj/java/*.java
    OBERON_BIN=${OBERON_BIN} java -cp $(OBERON_BIN) oberonc poj/out \
      poj/mod/Display0.Mod poj/mod/Kernel.Mod \
      poj/mod/OFileDir.Mod poj/mod/OFiles.Mod \
      poj/mod/Modules.Mod poj/mod/Fonts.Mod \
      poj/mod/Input.Mod poj/mod/Display.Mod \
      poj/mod/Viewers.Mod poj/mod/Texts.Mod \
      poj/mod/Oberon.Mod poj/mod/MenuViewers.Mod \
      poj/mod/TextFrames.Mod poj/mod/System.Mod \
      poj/mod/Edit.Mod poj/mod/Test.Mod \
      poj/mod/Hennessy.Mod poj/mod/Sierpinski.Mod
    java -Dsun.java2d.uiScale=1 -cp $(OBERON_BIN):poj/out Modules

Main changes from original system:

  • char is 16 bit
  • Files and FileDir renamed to OFiles and OFileDir
  • Display.Pattern is an index to Fonts.raster
  • Modules uses Java classes
  • Source files, symbol files and object files currently are outside of oberon.dsk . Object files need to stay there as they are Java classes.

You can decompile Java classes to Java source code e.g. via using CFR decompiler.

I am not a Java programmer. If you improve the code, make it more Project Oberon compatible or get it run inside web browser or as an Android app, let me know ;-) Performance of the system is impressive. Oberonc turned out to be a stable and comfortable system for developing poj.

Poj is being published as it is. Use it at your own risk. My target is to use it as development system for Project Oberon on Webassembly and on RISC-V.

Files can be copied to oberon.dsk by:

java -cp ./bin:poj/out cp2o oberon.dsk name ...

Files can be copied to hosts filesystem by:

java -cp ./bin:poj/out cp2u oberon.dsk name ...
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License