String inputFileName = "c:\\test.rdf";是不会有问题的
但是你可能在哪里new File才出问题
你贴其它代码出来
但是你可能在哪里new File才出问题
你贴其它代码出来
解决方案 »
- 关于Swing 滚动容器包装 JTextPane的问题 往高手解答
- 怎样统计一个字符串中哪个字符出现的频率最高
- 代理模式与EJB
- 在java application中怎么调用.chm文件?
- Java(TM) 插件致命错误 : 在同一进程中运行的几台Java虚拟机导致了错误
- 哪里有不停PING对方IP的代码???
- SQL SERVER数据库操作:cannot be saved.Specify TableName property on DataSet.
- 为什么我的程序编译后生成很多*$1.class文件?
- 看看程序错在那里?
- 问题:如何修改代码才可以找到5+2的结果?
- 用jdk对一个包内的java文件联编成class文件,怎么弄?
- 覆盖父类的方法中不能调用子类中对象吗?第一个java程序,请指教!
可以把"c:\\test.rdf"改成"c:/test.rdf"
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);/*********************************************************/
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