[fpc-pascal] Re: ppcjvm linking jar

Andrew Haines AndrewD207 at aol.com
Tue Apr 23 00:39:41 CEST 2013

On 04/22/13 05:22, leledumbo wrote:
> Just create jar file the usual way. However, you'll need to give FPC-JVM RTL
> classes as well (those in org.freepascal namespace)

Ok, I'm not sure of the usual way but here's what I've tried:

andrew at localhost ~/downloads $ jar cf trange1.jar trange1.class 
andrew at localhost ~/downloads $ java -jar ./trange1.jar
Failed to load Main-Class manifest attribute from


andrew at localhost ~/downloads $ jar cfm trange1.jar manifest.txt 
trange1.class /usr/local/lib/fpc/2.7.1/units/jvm-java/rtl/.
andrew at localhost ~/downloads $ java -jar ./trange1.jar
Exception in thread "main" java.lang.NoClassDefFoundError: 
Caused by: java.lang.ClassNotFoundException: org.freepascal.rtl.TObject
	at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: trange1. Program will exit.

where manifest.txt is
Main-Class: trange1

I've played around with MainClass: trange1.class MainClass Main main

Any hints?


Andrew Haines

More information about the fpc-pascal mailing list