Pathfinder for runnable jar

87 views
Skip to first unread message

Matthew Mah

unread,
Oct 23, 2014, 11:24:02 PM10/23/14
to java-pa...@googlegroups.com
I am trying to run Java Pathfinder from the command line for a Spring Boot runnable jar file built with Maven. Can Java Pathfinder test a runnable jar file directly? 

If not, I can unpack the jar. So far, I have managed to specify the classpath to include my code, but not the other jar dependencies. How does the libs directory need to be specified in the jpf application configuration file?

Thanks,
Matt

Matthew Mah

unread,
Oct 24, 2014, 9:53:01 AM10/24/14
to java-pa...@googlegroups.com

I have figured out how to include a handful of jars on the classpath by including path/to/example.jar on the classpath delimiting with a semicolon. I verify this by seeing that jpf has error messages for new classes. However, when I include all of the jar dependencies within the runnable jar (80), jpf can no longer find my class files. How do larger projects get setup with jpf?

Thanks,
Matt

--

---
You received this message because you are subscribed to a topic in the Google Groups "Java™ Pathfinder" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/java-pathfinder/NxLiQEO5GeU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to java-pathfind...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

João Matos

unread,
Nov 6, 2014, 9:36:00 AM11/6/14
to java-pa...@googlegroups.com
Hi,

this is what works for me:

/dir/to/java -Djava.library.path=dir/to/external/stuff:dir/to/more/external/stuff/:.  -jar dir/to/jpf-core/build/RunJPF.jar +shell.port=4242 systemUnderTest.jpf

If this does not work for you try the following two (individually or together) things:

1) edit systemUnderTest.jpf and add the external dirs to the classpath properties (classpath, native_classpath, etc). Also try to do the same to jpf.properties within the dir of the system under test.

2) in the command above, instead of -Djava.library.path=...dirs..., use -Xbootclasspath/a:...dirs...



I am just a jpf user, maybe the developers can give you a better answer. Hope it helps.
Reply all
Reply to author
Forward
0 new messages