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@localhost ~/downloads $ jar cf trange1.jar trange1.class /usr/local/lib/fpc/2.7.1/units/jvm-java/rtl/.
andrew@localhost ~/downloads $ java -jar ./trange1.jar
Failed to load Main-Class manifest attribute from
./trange1.jar

also

andrew@localhost ~/downloads $ jar cfm trange1.jar manifest.txt trange1.class /usr/local/lib/fpc/2.7.1/units/jvm-java/rtl/.
andrew@localhost ~/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

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to