标题:error in opening zip file
只看楼主
liyyfeng
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2008-10-24
 问题点数:0 回复次数:1 
error in opening zip file
高手帮忙看看这个是什么问题?谢谢!
import *;
public class AA
{
    public static void main (String args[]) //throws IOException
    {
        String s[] = {"aaa\n","bbb\n","ccc\n"};
        try
        {
            RandomAccessFile rf = new RandomAccessFile ("AA.txt","rw");
            System.out.println (rf.getFilePointer ());
            System.out.println (rf.length());
            rf.seek (rf.length);
            for (int i=0; i < 3; ++i)
            {
                rf.writeBytes (s[i]);
            }
            rf.seek (0);
            String st;
            while ((st=rf.readLine()) != nul)
            {
                System.out.println (st);
            }
            rf.close ();
        }
        catch (FileNotFoundException e)
        {

        }
        catch (IOException g)
        {
        }
    }
}

---------- ᅫ ----------
error: error reading c:\jdk1.5.0\lib\ir.idl; java.util.zip.ZipException: error in opening zip file
AA.java:12: cannot find symbol
symbol  : variable length
location: class
            rf.seek (rf.length);
                                   ^
AA.java:19: cannot find symbol
symbol  : variable nul
location: class AA
            while ((st=rf.readLine()) != nul)
                                                     ^
3 errors

输出完成 (耗时: 0 秒)
搜索更多相关主题的帖子: opening zip file 
2008-10-24 19:04
nuciewth
Rank: 14Rank: 14Rank: 14Rank: 14
来 自:我爱龙龙
等 级:贵宾
威 望:104
帖 子:9786
专家分:208
注 册:2006-5-23
得分:0 
1.打开文件失败
2.或许是.length
3.拼写错误null

倚天照海花无数,流水高山心自知。
2008-10-25 10:33



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-240368-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.244716 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved