java question

sunnyhym

新手上路
注册
2003-09-03
消息
175
荣誉分数
0
声望点数
0
I am compiling opengrok on Linux but failed.
I am not familiar with java, any hints:

Apache Ant version 1.7.0 compiled on August 29 2007
Apache Ant version 1.7.0 compiled on August 29 2007
Buildfile: build.xml
Detected Java version: 1.6 in: /usr/lib/jvm/java-1.5.0-gcj-4.2-1.5.0.0/jre
Detected OS: Linux
parsing buildfile /home/yao/workspace/opengrok/opengrok-0.5/build.xml with URI = file:/home/yao/workspace/opengrok/opengrok-0.5/build.xml
Project base dir set to: /home/yao/workspace/opengrok/opengrok-0.5
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
Build sequence for target(s) `build' is [jflex, compile, build]
Complete build sequence is [jflex, compile, build, polished, javadoc, os-webapp, rejar, package, dist-src, offwhite, svn-webapp, dist, svn-release, run, webapp, clean, release, ]

jflex:
[mkdir] Skipping /home/yao/workspace/opengrok/opengrok-0.5/build/src because it already exists.

compile:
[mkdir] Skipping /home/yao/workspace/opengrok/opengrok-0.5/build/classes because it already exists.
[javac] org/opensolaris/opengrok/analysis/AnalyzerGuru.java added as org/opensolaris/opengrok/analysis/AnalyzerGuru.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/CompatibleAnalyser.java omitted as /home/yao/workspace/opengrok/opengrok-0.5/build/classes/org/opensolaris/opengrok/analysis/CompatibleAnalyser.class is up to date.
[javac] org/opensolaris/opengrok/analysis/Ctags.java added as org/opensolaris/opengrok/analysis/Ctags.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/FileAnalyzer.java added as org/opensolaris/opengrok/analysis/FileAnalyzer.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/Hash2TokenStream.java added as org/opensolaris/opengrok/analysis/Hash2TokenStream.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/HistoryAnalyzer.java omitted as /home/yao/workspace/opengrok/opengrok-0.5/build/classes/org/opensolaris/opengrok/analysis/HistoryAnalyzer.class is up to date.
[javac] org/opensolaris/opengrok/analysis/List2TokenStream.java added as org/opensolaris/opengrok/analysis/List2TokenStream.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/PathAnalyzer.java omitted as /home/yao/workspace/opengrok/opengrok-0.5/build/classes/org/opensolaris/opengrok/analysis/PathAnalyzer.class is up to date.
[javac] org/opensolaris/opengrok/analysis/PathTokenizer.java omitted as /home/yao/workspace/opengrok/opengrok-0.5/build/classes/org/opensolaris/opengrok/analysis/PathTokenizer.class is up to date.
[javac] org/opensolaris/opengrok/analysis/TagFilter.java added as org/opensolaris/opengrok/analysis/TagFilter.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/archive/BZip2Analyzer.java added as org/opensolaris/opengrok/analysis/archive/BZip2Analyzer.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/archive/GZIPAnalyzer.java added as org/opensolaris/opengrok/analysis/archive/GZIPAnalyzer.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/archive/TarAnalyzer.java added as org/opensolaris/opengrok/analysis/archive/TarAnalyzer.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/archive/ZipAnalyzer.java added as org/opensolaris/opengrok/analysis/archive/ZipAnalyzer.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/c/CAnalyzer.java added as org/opensolaris/opengrok/analysis/c/CAnalyzer.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/c/CSymbolTokenizer.lex skipped - don't know how to handle it
[javac] org/opensolaris/opengrok/analysis/c/CXref.lex skipped - don't know how to handle it
[javac] org/opensolaris/opengrok/analysis/c/Consts.java added as org/opensolaris/opengrok/analysis/c/Consts.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/data/IgnorantAnalyzer.java added as org/opensolaris/opengrok/analysis/data/IgnorantAnalyzer.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/data/ImageAnalyzer.java added as org/opensolaris/opengrok/analysis/data/ImageAnalyzer.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/document/TroffAnalyzer.java added as org/opensolaris/opengrok/analysis/document/TroffAnalyzer.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/document/TroffFullTokenizer.lex skipped - don't know how to handle it
[javac] org/opensolaris/opengrok/analysis/document/TroffXref.lex skipped - don't know how to handle it
[javac] org/opensolaris/opengrok/analysis/executables/ELFAnalyzer.java added as org/opensolaris/opengrok/analysis/executables/ELFAnalyzer.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/executables/JarAnalyzer.java added as org/opensolaris/opengrok/analysis/executables/JarAnalyzer.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/executables/JavaClassAnalyzer.java added as org/opensolaris/opengrok/analysis/executables/JavaClassAnalyzer.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/java/Consts.java added as org/opensolaris/opengrok/analysis/java/Consts.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/java/JavaAnalyzer.java added as org/opensolaris/opengrok/analysis/java/JavaAnalyzer.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/java/JavaSymbolTokenizer.lex skipped - don't know how to handle it
[javac] org/opensolaris/opengrok/analysis/java/JavaXref.lex skipped - don't know how to handle it
[javac] org/opensolaris/opengrok/analysis/lisp/Consts.java added as org/opensolaris/opengrok/analysis/lisp/Consts.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/lisp/LispAnalyzer.java added as org/opensolaris/opengrok/analysis/lisp/LispAnalyzer.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/lisp/LispSymbolTokenizer.lex skipped - don't know how to handle it
[javac] org/opensolaris/opengrok/analysis/lisp/LispXref.lex skipped - don't know how to handle it
[javac] org/opensolaris/opengrok/analysis/plain/PlainAnalyzer.java added as org/opensolaris/opengrok/analysis/plain/PlainAnalyzer.class doesn't exist.
[javac] org/opensolaris/opengrok/analysis/plain/PlainFullTokenizer.lex skipped - don't know how to handle it
[javac] org/opensolaris/opengrok/analysis/plain/PlainSymbolTokenizer.lex skipped - don't know how to handle it
[javac] org/opensolaris/opengrok/analysis/plain/PlainXref.lex skipped - don't know how to handle it
[javac] org/opensolaris/opengrok/analysis/plain/XMLAnalyzer.java added as org/opensolaris/opengrok/analysis/plain/XMLAnalyzer.class doesn't exist.
 
[javac] Compiling 79 source files to /home/yao/workspace/opengrok/opengrok-0.5/build/classes
[javac] Using modern compiler
[javac] Compilation arguments:
[javac] '-deprecation'
[javac] '-d'
[javac] '/home/yao/workspace/opengrok/opengrok-0.5/build/classes'
[javac] '-classpath'
[javac] '/home/yao/workspace/opengrok/opengrok-0.5/build/classes:/home/yao/workspace/opengrok/opengrok-0.5/lib/JFlex.jar:/home/yao/workspace/opengrok/opengrok-0.5/lib/ant-tools.jar:/home/yao/workspace/opengrok/opengrok-0.5/lib/bcel-5.1.jar:/home/yao/workspace/opengrok/opengrok-0.5/lib/jakarta-oro-2.0.8.jar:/home/yao/workspace/opengrok/opengrok-0.5/lib/lucene-core-2.1.0.jar:/home/yao/workspace/opengrok/opengrok-0.5/lib/lucene-spellchecker-2.1.0.jar:/home/yao/workspace/opengrok/opengrok-0.5/lib/org.apache.commons.jrcs.diff.jar:/home/yao/workspace/opengrok/opengrok-0.5/lib/org.apache.commons.jrcs.rcs.jar:/home/yao/workspace/opengrok/opengrok-0.5/lib/servlet-api.jar:/home/yao/workspace/opengrok/opengrok-0.5/lib/svn-javahl.jar:/home/yao/workspace/opengrok/opengrok-0.5/lib/swing-layout-0.9.jar:/usr/share/ant/lib/ant-launcher.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/xercesImpl.jar:/home/yao/.ant/lib/JFlex.jar:/usr/share/ant/lib/tomcat5.5-jkstatus-ant.jar:/usr/share/ant/lib/catalina5.5-ant-jmx.jar:/usr/share/ant/lib/ant-bootstrap.jar:/usr/share/ant/lib/ant.jar:/usr/share/ant/lib/catalina5.5-ant.jar:/usr/lib/jvm/java-1.5.0-gcj-4.2-1.5.0.0/lib/tools.jar'
[javac] '-sourcepath'
[javac] '/home/yao/workspace/opengrok/opengrok-0.5/src:/home/yao/workspace/opengrok/opengrok-0.5/build/src'
[javac] '-g'
[javac] '-O'
[javac] '-Xlint:unchecked'
[javac]
[javac] The ' characters around the executable and arguments are
[javac] not part of the command.
[javac] Files to be compiled:
[javac] /home/yao/workspace/opengrok/opengrok-0.5/src/org/opensolaris/opengrok/analysis/AnalyzerGuru.java
[javac] /home/yao/workspace/opengrok/opengrok-0.5/src/org/opensolaris/opengrok/analysis/Ctags.java
[javac] /home/yao/workspace/opengrok/opengrok-0.5/src/org/opensolaris/opengrok/analysis/FileAnalyzer.java
[javac] /home/yao/workspace/opengrok/opengrok-0.5/src/org/opensolaris/opengrok/analysis/Hash2TokenStream.java
 
[javac] 1. ERROR in /home/yao/workspace/opengrok/opengrok-0.5/src/org/opensolaris/opengrok/analysis/AnalyzerGuru.java (at line 31)
[javac] import org.opensolaris.opengrok.analysis.FileAnalyzer.Genre;
[javac] ^^^^^^^
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] The import org.opensolaris.opengrok.analysis.FileAnalyzer.Genre cannot be resolved
[javac] ----------
[javac] 2. ERROR in /home/yao/workspace/opengrok/opengrok-0.5/src/org/opensolaris/opengrok/analysis/Analyzer
[javac] Guru.java (at line 58)
[javac] private static HashMap<String, Class<? extends FileAnalyzer>> ext;
[javac] ^^^^^^^^^^^^^
[javac] Syntax error, parameterized types are only available if source level is 5.0
[javac] ----------
 
how javac search the class Genre? I read the source under org/opensolaris/opengrok/analysis/FileAnalyzer.java, the class Genre is in this file, how javac search the import path? From /home/yao/workspace/opengrok/opengrok-0.5/src? why not can't find it?
[javac] Compilation arguments:
[javac] '-deprecation'
[javac] '-d'
[javac] '/home/yao/workspace/opengrok/opengrok-0.5/build/classes'
[javac] '-classpath'
[javac] '/home/yao/workspace/opengrok/opengrok-0.5/build/classes:
/home/yao/workspace/opengrok/opengrok-0.5/lib/JFlex.jar:
/home/yao/workspace/opengrok/opengrok-0.5/lib/ant-tools.jar
:/home/yao/workspace/opengrok/opengrok-0.5/lib/bcel-5.1.jar
:/home/yao/workspace/opengrok/opengrok-0.5/lib/jakarta-oro-2.0.8.jar
:/home/yao/workspace/opengrok/opengrok-0.5/lib/lucene-core-2.1.0.jar
:/home/yao/workspace/opengrok/opengrok-0.5/lib/lucene-spellchecker-2.1.0.jar
:/home/yao/workspace/opengrok/opengrok-0.5/lib/org.apache.commons.jrcs.diff.jar:/home/yao/workspace/opengrok/opengrok-0.5/lib/org.apache.commons.jrcs.rcs.jar:/home/yao/workspace/opengrok/opengrok-0.5/lib/servlet-api.jar:/home/yao/workspace/opengrok/opengrok-0.5/lib/svn-javahl.jar:/home/yao/workspace/opengrok/opengrok-0.5/lib/swing-layout-0.9.jar:/usr/share/ant/lib/ant-launcher.jar:/usr/share/java/xmlParserAPIs.jar:/usr/share/java/xercesImpl.jar:/home/yao/.ant/lib/JFlex.jar:/usr/share/ant/lib/tomcat5.5-jkstatus-ant.jar:/usr/share/ant/lib/catalina5.5-ant-jmx.jar:/usr/share/ant/lib/ant-bootstrap.jar:/usr/share/ant/lib/ant.jar:/usr/share/ant/lib/catalina5.5-ant.jar:/usr/lib/jvm/java-1.5.0-gcj-4.2-1.5.0.0/lib/tools.jar'
[javac] '-sourcepath'
[javac] '/home/yao/workspace/opengrok/opengrok-0.5/src:/home/yao/workspace/opengrok/opengrok-0.5/build/src'
[javac] '-g'
[javac] '-O'
[javac] '-Xlint:unchecked'
 
ok, finally successfully installed opengrok on Linux and now I can browse my source code through opengrok, pretty cool!
 
后退
顶部