[Exception Error on Java: Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpgf in java.library.path]

17 views
Skip to first unread message

Wilson Junior

unread,
Nov 10, 2020, 1:39:04 AM11/10/20
to Grammatical Framework
Hi all,

I am starting my study on grammatical framework integrated with JAVA, but I am not getting run application using jpgf.jar. Anyone know about this ?

The screenshot was attached below.
Screen Shot 2020-11-09 at 22.16.02.png

Krasimir Angelov

unread,
Nov 10, 2020, 4:40:58 AM11/10/20
to Grammatical Framework
When running your Java application run it like this:

java -Djava.library.path=<your path to libpgf> YourClass

Here libpgf is the shared library for the C runtime for GF.

Best Regards,
Krasimir


--

---
You received this message because you are subscribed to the Google Groups "Grammatical Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gf-dev+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gf-dev/3ec2b2ec-87ef-4271-8e63-8a1e3f4b45ean%40googlegroups.com.

Wilson Junior

unread,
Nov 10, 2020, 6:14:17 AM11/10/20
to gf-...@googlegroups.com
I am using macosx operational system, do you have any idea about how can I get the path of libpgf library ?

Thanks,
Francisco Wilson



--
Francisco Wilson Rodrigues Júnior
Engenheiro de Computação - CREA 33349
(88) 999241492 | (88)992879654

Krasimir Angelov

unread,
Nov 11, 2020, 4:54:15 AM11/11/20
to Grammatical Framework
When you do "make install" for the C runtime, the install path is printed at the end. On Linux the path is "/usr/local/lib", but I don't know if it is the same on Mac.

Krasimir Angelov

unread,
Nov 11, 2020, 4:57:33 AM11/11/20
to Grammatical Framework
Sorry, the last answer was wrong. What you actually need is the path to libjpgf which is always in /usr/local/lib. You can see that path hardcoded at the beginning of src/runtime/java/Makefile. You can change it if there is a better path on Mac.

Wilson Junior

unread,
Nov 11, 2020, 6:33:38 AM11/11/20
to gf-...@googlegroups.com
Thanks to Krasimir Angelov, my problem was partially solved with your suggestion. I needed add only one more arguments for run the application properly.

java -cp /path/jpgf.jar -Djava.library.path=/path/usr/local/lib Class.java

Best regards



Reply all
Reply to author
Forward
0 new messages