String inputFileName = "c:\\test.rdf";是不会有问题的
但是你可能在哪里new File才出问题
你贴其它代码出来

解决方案 »

  1.   

    你的C;\下有没有test.rdf?
    可以把"c:\\test.rdf"改成"c:/test.rdf"
      

  2.   

    OK,/*********************************************************/
    Vector  subject= new Vector();
    Vector  predicate= new Vector();   
    Vector  object= new Vector();   

    int i=0;sp = new SICStus(argv,null);
    //qiang.pl complies qiang.sav
    sp.restore("qiang.sav");
    HashMap varMap = new HashMap();

    //x is prolog output
    x = new SPTerm(sp).putVariable();
    y = new SPTerm(sp).putVariable();// use the class loader to find the input file
    InputStream in = search_rdf.class
    .getClassLoader()
             .getResourceAsStream(inputFileName);/*********************************************************/
      

  3.   

    i update my java with c:\test.rdf,but it does not work.
    i suppose the error comes from "InputStream",it can not read file in full path like this format.these classes provider is from HP.the better way is to ask them.
    thanks