diff --git a/src/runtime/java/.classpath b/src/runtime/java/.classpath
deleted file mode 100644
index 348eb9a2e..000000000
--- a/src/runtime/java/.classpath
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/src/runtime/java/.cproject b/src/runtime/java/.cproject
deleted file mode 100644
index 2e167b3b0..000000000
--- a/src/runtime/java/.cproject
+++ /dev/null
@@ -1,167 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/runtime/java/.project b/src/runtime/java/.project
deleted file mode 100644
index ee427e472..000000000
--- a/src/runtime/java/.project
+++ /dev/null
@@ -1,89 +0,0 @@
-
-
- jpgf
-
-
-
-
-
- org.eclipse.cdt.managedbuilder.core.genmakebuilder
- clean,full,incremental,
-
-
- ?name?
-
-
-
- org.eclipse.cdt.make.core.append_environment
- true
-
-
- org.eclipse.cdt.make.core.autoBuildTarget
- all
-
-
- org.eclipse.cdt.make.core.buildArguments
-
-
-
- org.eclipse.cdt.make.core.buildCommand
- make
-
-
- org.eclipse.cdt.make.core.buildLocation
- ${workspace_loc:/jpgf/Debug}
-
-
- org.eclipse.cdt.make.core.cleanBuildTarget
- clean
-
-
- org.eclipse.cdt.make.core.contents
- org.eclipse.cdt.make.core.activeConfigSettings
-
-
- org.eclipse.cdt.make.core.enableAutoBuild
- false
-
-
- org.eclipse.cdt.make.core.enableCleanBuild
- true
-
-
- org.eclipse.cdt.make.core.enableFullBuild
- true
-
-
- org.eclipse.cdt.make.core.fullBuildTarget
- all
-
-
- org.eclipse.cdt.make.core.stopOnError
- true
-
-
- org.eclipse.cdt.make.core.useDefaultBuildCmd
- true
-
-
-
-
- org.eclipse.jdt.core.javabuilder
-
-
-
-
- org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
- full,incremental,
-
-
-
-
-
- org.eclipse.jdt.core.javanature
- org.eclipse.cdt.core.cnature
- org.eclipse.cdt.core.ccnature
- org.eclipse.cdt.managedbuilder.core.managedBuildNature
- org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
-
-
diff --git a/src/runtime/java/.settings/org.eclipse.jdt.core.prefs b/src/runtime/java/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 8000cd6ca..000000000
--- a/src/runtime/java/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,11 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/src/runtime/java/INSTALL b/src/runtime/java/INSTALL
index b5be636fa..6d97dd279 100644
--- a/src/runtime/java/INSTALL
+++ b/src/runtime/java/INSTALL
@@ -1,22 +1,10 @@
-Before compiling Java binding you first need to have the C runtime
-compiled and installed. In order to compile the binding itself you need
-Eclipse plus the plugin for compiling C projects in
-Eclipse (https://www.eclipse.org/cdt). Follow the instructions on
-the web site.
+Before compiling the Java binding you first need to have the C runtime
+compiled and installed. You also need to find where your jni.h header
+is installed. It is part of the Java JDK, but it might be placed
+in different places on different platforms. The path to the jni.h
+header should be assigned to the JNI_PATH variable in the beginning
+of the Makefile that you will find in the root directory of
+the binding. Once this is done type:
-After you have done the above, import the directory where you have found
-this INSTALL file as an existing project in Eclipse. The project has
-two configurations one for Posix (Linux) systems and one for Windows.
-You can change the configuration by right clicking on the project
-and choosing "Properties" from the menu. Then go to C/C++ Build
-and click on the button "Manage Configurations". Change the active
-configuration from there. Now go to "C/C++ Build / Tool Chain Editor"
-and check whether the current tool chain is the one for your platform.
-
-Build the project by selecting the menu "Project / Build Project".
-
-On Windows you might also have to change the following directories
-from the "Properties" dialog:
-
-C/C++ Build / Settings / GCC C Compiler / Includes / Include paths
-C/C++ Build / Settings / MinGW C++ Linker / Libraries / Library search paths
+$ make
+$ make install
diff --git a/src/runtime/java/JPGFJar.jardesc b/src/runtime/java/JPGFJar.jardesc
deleted file mode 100644
index 1c35491fb..000000000
--- a/src/runtime/java/JPGFJar.jardesc
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/runtime/java/Makefile b/src/runtime/java/Makefile
new file mode 100644
index 000000000..cb8000fd2
--- /dev/null
+++ b/src/runtime/java/Makefile
@@ -0,0 +1,30 @@
+C_SOURCES = jpgf.c jsg.c
+JAVA_SOURCES = $(wildcard org/grammaticalframework/pgf/*.java) \
+ $(wildcard org/grammaticalframework/sg/*.java)
+
+JNI_PATH = /usr/lib/jvm/default-java/include
+INSTALL_PATH = /usr/local/lib
+
+all: libjpgf.la jpgf.jar
+
+libjpgf.la: $(patsubst %.c, %.lo, $(C_SOURCES))
+ libtool --mode=link gcc -g -O -o libjpgf.la -shared $^ -rpath $(INSTALL_PATH) -lgu -lpgf -lsg
+
+%.lo : %.c
+ libtool --mode=compile gcc -g -O -c -I$(JNI_PATH) -std=c99 -shared $< -o $@
+
+jpgf.jar: $(patsubst %.java, %.class, $(JAVA_SOURCES))
+ jar -cf $@ $^
+
+%.class : %.java
+ javac $<
+
+install: libjpgf.la jpgf.jar
+ libtool --mode=install install -s libjpgf.la $(INSTALL_PATH)
+
+clean:
+ rm -f *.lo
+ rm -f *.la
+ rm -f -r .libs
+ rm -f *.jar
+ rm -f org/grammaticalframework/*/*.class