leledumbo wroteJust 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:
~/downloads $ jar cf trange1.jar trange1.class
/usr/local/lib/fpc/2.7.1/units/jvm-java/rtl/.
~/downloads $ java -jar ./trange1.jar
Failed to load Main-Class manifest attribute from
./trange1.jar
also
~/downloads $ jar cfm trange1.jar manifest.txt
trange1.class /usr/local/lib/fpc/2.7.1/units/jvm-java/rtl/. ~/downloads $ java -jar ./trange1.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/freepascal/rtl/TObject
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?
Thanks,
Andrew Haines