JPFcore & JPF eclipse installations

280 views
Skip to first unread message

CD

unread,
Jan 29, 2014, 11:59:49 AM1/29/14
to java-pa...@googlegroups.com
Hi,

I have some problems with JPF install on ECLIPSE:

1: JPF-CORE:

I search to install JPF core on my ECLIPSE KEPLER version with a JDK 1.7 version.

In your JPF install instruction:

Eclipse Steps
(1) Get Mercurial
(1) Eclipse Update site: http://cbes.javaforge.com/update => OK
(2) Get jpf‐core
(1) File – Import – Mercurial - Clone repository => OK
using Mercurial - Next
(2) Specify http://babelfish.arc.nasa.gov/hg/jpf/jpf‐core => OK
(3) Check the box for 'Search for .project files in clone and use them to => OK
create projects'
(4) Finish => OK
(3) Build
(1) Project – Properties - Select Builders - Ant => OK
Builder - Click Edit
(2) Click JRE tab - Separate JREs - Installed JREs => OK
(3) Pick a JDK 1.6xxx…JRE will not find javac => OK but woth JDK 1.7

Build is successfull but, JPF doesn't work:

a run_JPF_launch returns:

[SEVERE] JPF configuration error: main class not a valid class name: C:\Eclipse\K2\W\jpf-core\eclipse\run-JPF.launch
> used within "vm.class" instantiation of class gov.nasa.jpf.vm.SingleProcessVM
[SEVERE] JPF terminated

a test_JPF_launch returns:




Can you help me to install JPF to be used in eclipse.

My final goal is to use JPF Junit extensions to define tests and verify MCDC coverage...

2: eclipse-jpf install

I clone with hg the eclipse-jpf packages in ECLIPSE.
All is OK
But when I try to build all, somes errors un SRC code of the plugin:

ERROR on "import gov.nasa.jpf.Config;" => this package doesn't exist in the project...
ERROR on "import gov.nasa.jpf.template.CreateProject;;" => this package doesn't exist in the project...

How to have a correct project?

Thanks for your help

Peter Mehlitz

unread,
Jan 29, 2014, 1:08:54 PM1/29/14
to java-pa...@googlegroups.com
how do you invoke JPF? If you use run-JPF.launch you have to select a *.jpf file in the package explorer view.

After cloning eclipse-jpf you should have a lib/RunJPF.jar (contains Config) and a lib/jpf-template.jar (CreateProject), which both should appear in the build class path of the export wizard. If you don't want to bother with building the plugin you can also install from the update site or the attachment section of http://babelfish.arc.nasa.gov/trac/jpf/wiki/install/eclipse-plugin

As always, it is a good idea to check proper build and configuration from the command line before trying to debug an Eclipse installation. Do a "bin/ant clean test" from within jpf-core, then create a site.properties (e.g. by running "bin/jpf -addproject" from within jpf-core)

-- Peter
> Can you help me to install JPF to be used in eclipse.
>
> My final goal is to use JPF Junit extensions to define tests and verify MCDC coverage...
>
> 2: eclipse-jpf install
>
> I clone with hg the eclipse-jpf packages in ECLIPSE.
> All is OK
> But when I try to build all, somes errors un SRC code of the plugin:
>
> ERROR on "import gov.nasa.jpf.Config;" => this package doesn't exist in the project...
> ERROR on "import gov.nasa.jpf.template.CreateProject;;" => this package doesn't exist in the project...
>
> How to have a correct project?
>
> Thanks for your help
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "Java™ Pathfinder" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to java-pathfind...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

CD

unread,
Jan 29, 2014, 1:31:56 PM1/29/14
to java-pa...@googlegroups.com

Yes I use run-JPF.launch you have to select a *.jpf file in the package explorer view => Ok I forget the jpf file
But when I start from scratch with only the jpf-core install, how to find a good *.jpf file?
Must I define it?

For the eclipse plugin, the install via install site doesn't work, this is why I try to follow a document found on JPF site to rebuid eclipse-jpf
=> I think the sources are not coherent, and it's should be better to be able to rebuild it to be sure...
=> But I don't have knowledge enought on application to repair build

Thanks for your answers
Cyril


2014-01-29 Peter Mehlitz <pcme...@gmail.com>
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/ixoC1z2G1Ws/unsubscribe.
To unsubscribe from this group and all its topics, send an email to java-pathfind...@googlegroups.com.

Willem Visser

unread,
Jan 29, 2014, 1:36:24 PM1/29/14
to java-pa...@googlegroups.com
Run oldclassic.jpf in the examples folder...should detect a deadlock.

CD

unread,
Jan 29, 2014, 1:49:06 PM1/29/14
to java-pa...@googlegroups.com
It's ok.
And for the ECLIPSE development have you tried to rebuild in your own works?
Have you ever seen src problems?


2014-01-29 Willem Visser <wil...@gmail.com>

Peter Mehlitz

unread,
Jan 29, 2014, 2:01:29 PM1/29/14
to java-pa...@googlegroups.com
I just did a build&install of eclipse-jpf on Kepler SR1. Which Eclipse version do you use? Have you checked if you got the eclipse-jpf/lib/* jars I mentioned and if they are properly listed in the plugin manifest class path?

-- Peter

CD

unread,
Jan 29, 2014, 2:12:21 PM1/29/14
to java-pa...@googlegroups.com
I use eclipse kepler SR1 too.

Have you checked if you got the eclipse-jpf/lib/* jars I mentioned => yes
And if they are properly listed in the plugin manifest class path?

There is the folowing list in manifest:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Eclipse-jpf
Bundle-SymbolicName: eclipse-jpf;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: lib/antlr-runtime-3.4.jar,
 lib/ST-4.0.4.jar,
 lib/jpf-template.jar,
 lib/RunJPF.jar,
 .
Bundle-Activator: gov.nasa.runjpf.EclipseJPF
Export-Package: gov.nasa.runjpf,
 gov.nasa.runjpf.options,
 gov.nasa.runjpf.util,
 gov.nasa.runjpf.wizard
Require-Bundle: org.eclipse.ui,
 org.eclipse.core.runtime,
 org.eclipse.ui,
 org.eclipse.core.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Import-Package: org.eclipse.core.filesystem,
 org.eclipse.core.resources,
 org.eclipse.core.runtime;version="3.4.0",
 org.eclipse.core.runtime.jobs,
 org.eclipse.core.runtime.preferences;version="3.3.0",
 org.eclipse.jdt.core,
 org.eclipse.jface.action,
 org.eclipse.jface.dialogs,
 org.eclipse.jface.preference,
 org.eclipse.jface.text,
 org.eclipse.jface.viewers,
 org.eclipse.jface.wizard,
 org.eclipse.osgi.util;version="1.1.0",
 org.eclipse.swt,
 org.eclipse.swt.events,
 org.eclipse.swt.graphics,
 org.eclipse.swt.layout,
 org.eclipse.swt.widgets,
 org.eclipse.ui,
 org.eclipse.ui.console,
 org.eclipse.ui.dialogs,
 org.eclipse.ui.ide,
 org.eclipse.ui.internal.ide,
 org.eclipse.ui.internal.ide.dialogs,
 org.eclipse.ui.internal.ide.filesystem,
 org.eclipse.ui.part,
 org.eclipse.ui.plugin,
 org.eclipse.ui.texteditor,
 org.osgi.framework;version="1.6.0"

source.. = src/
output.. = bin/
bin.includes = META-INF/,\
               .,\
               plugin.xml,\
               preferences.ini,\
               lib/RunJPF.jar,\
               lib/jpf-template.jar,\
               lib/antlr-runtime-3.4.jar,\
               lib/ST-4.0.4.jar
src.includes = preferences.ini


And in lib directory:

RunJPF.jar,
jpf-template.jar,
antlr-runtime-3.4.jar,
ST-4.0.4.jar

=> jpf-template.jar is not present but HG GIT tell me my repository is ok....

Strange




2014-01-29 Peter Mehlitz <pcme...@gmail.com>
--

---
You received this message because you are subscribed to a topic in the Google Groups "Java(tm) Pathfinder" group.

CD

unread,
Jan 30, 2014, 2:56:50 AM1/30/14
to java-pa...@googlegroups.com
Hello,

I don't succeed in finding error source.
So If I take the problem from the beginning:

How is the best way to install JPF in eclipse?
- Must I rebuild all modules (jpf-core, jpf-template, ....) and then eclipse-jpf?
- Or this is a document or kind of keys to be able to make this install?

In fact I search the 2 packages without link and I see the Config is in jpf-core without dependence in the eclipse-jpf MANIFEST to this module, and the template package used is in jpf-template.

So the way to import all JPF in eclipse could be a good help to succeed.

Regards
Cyril


2014-01-29 CD <cyril.d...@gmail.com>:

Stepan Vavra

unread,
Jan 30, 2014, 4:46:48 AM1/30/14
to java-pa...@googlegroups.com
The problem with official eclipse-jpf is imho it doesn't have dependencies on "jpf-core" and "jpf-template" specified in ".classpath" Eclipse config file:

<classpathentry combineaccessrules="false" kind="src" path="/jpf-template"/>
<classpathentry combineaccessrules="false" kind="src" path="/jpf-core"/>

If you add these entries and also import jpf-core and jpf-template to Eclipse you should be fine.
Another catch is that the official branch of eclipse-jpf doesn't come with the "eclipse feature" and "eclipse site" projects for Eclipse JPF. You need them in order to create proper Eclipse update site.

It is also fixed in the new version of Eclipse JPF which is still not merged back to the official Eclipse JPF branch: https://bitbucket.org/stepanv/eclipse-jpf/wiki/Home


Hope this helps,
Stepan


--
 
---
You received this message because you are subscribed to the Google Groups "Java™ Pathfinder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-pathfind...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.



--
Stepan Vavra

CD

unread,
Jan 30, 2014, 4:52:40 AM1/30/14
to java-pa...@googlegroups.com
Thanks for your answer, it's clear and conform with my analyse.
I will update my local
Regards


2014-01-30 Stepan Vavra <vavra....@gmail.com>:

--
 
---
You received this message because you are subscribed to a topic in the Google Groups "Java™ Pathfinder" group.
Reply all
Reply to author
Forward
0 new messages