Java PathFinder(一) Java PathFinder基于Eclipse的安装配置及使用

前言

在研究JPF时,发现存在两个版本的JPF,一个是在sourceforge上代码库,自2006后不再更新,但用svn签出;一个是NASA软件工程实验室自建的Mercurial版本库服务器上代码库,现在依然在开发更新,并且提供的完整的在线WIkI文档。我们使用的是NASA的.

准备材料:

  • eclipse
  • jpf-core
  • jdk 1.8或以上

安装过程

TortoiseHg

官网

  • 如果要下载JPF的相关组件,必须要使用一个名叫Mercurial的分布式版本控制系统。通过clone从JPF的官网上clone下jpf-core的源码,链接如下:jpf-core.
  • 精简版的jpf以及配置文件如下,可以直接在配置文件中修改路径使用即可下好的核心部分
  • 如果需要更加丰富的组件可以在如下链接clone,在配置文件中按照jpf-core的配置方法照猫画虎即可

Eclipse中JPF插件的安装

在Eclipse的菜单中

helpinstallnewsoftware

这里写图片描述
插件的链接如下:
eclipse jpf plugin

Location里面填这个:

http://babelfish.arc.nasa.gov/trac/jpf/raw-attachment/wiki/install/eclipse-plugin/update/

然后一路next……..

写好的那个配置文件site.properties:
JPF site cofiguration
#以下是路径,按照你自己的放置jpf-core的路径设置
jpf-core=E:\JPF\jpf-core
extensions=${jpf-core}
Eclipse插件的设置

菜单按如下路径一直点

windowpreferenceJPF preference

这里写图片描述

导入jpf path finder

菜单按如下路径一路点下去

Fileimportexitingproject

然后导入之前的jpf-core项目,我们来看它的构建的配置文件:

<?xml version="1.0" ?>

<!--
  build.xml - the JPF core build script
              using Ant (http://jakarta.apache.org/ant)
  public targets:

    build (default)   compile classes and build JPF jar files
    compile           compile JPF and its specific (modeled) environment libraries
    test              run all JPF tests
    clean             remove the files that have been generated by the build process
    buildinfo         create buildinfo properties file
-->

<project name="jpf-core" default="build" basedir=".">

  <!-- ===================== ===== COMMON SECTION ========================== -->

  <!-- 
    local props have to come first, because Ant properties are immutable
    NOTE: this file is local - it is never in the repository!
  -->
  <property file="local.properties"/>
  <property environment="env"/>

  <!-- compiler settings -->
  <property name="debug"         value="on"/>
  <property name="deprecation"   value="on"/>

  <uptodate property="build_uptodate" targetfile="build/main/gov/nasa/jpf/build.properties" srcfile="build.properties"/>


  <!-- generic classpath settings -->
  <path id="lib.path">
    <pathelement location="build/main"/>
    <pathelement location="build/peers"/>
    <pathelement location="build/annotations"/>
    <fileset dir=".">
      <include name="lib/*.jar"/>
    </fileset>
  </path>


  <!-- init: common initialization -->
  <target name="-init">
    <tstamp/>

    <mkdir dir="build"/>               <!-- the build root -->

    <!-- the things that have to be in the classpath of whatever runs Ant -->
    <available property="have_javac" classname="com.sun.tools.javac.Main"/>
    <fail unless="have_javac">no javac was found __or__ check http://babelfish.arc.nasa.gov/trac/jpf/wiki/install/build for possible solutions</fail>


    <available file="src/main"        type="dir" property="have_main"/>
    <available file="src/annotations" type="dir" 
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值