1

こちらのチュートリアルを使用して、Red5サーバーのサンプルを作成しようとしています。red5.jar追加を含むすべてのことを実行commons-logging-1.1.1.jarしましたが、を使用して独自のjarファイルを作成しようとするとant、次のエラーが発生します。

Buildfile: C:\Users\MediaStudio\workspace\Sample\build.xml
clean:
compile:
    [javac] C:\Users\MediaStudio\workspace\Sample\build.xml:8: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 1 source file to C:\Users\MediaStudio\workspace\Sample\classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.5
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:4: error: package org.apache.commons.logging does not exist
    [javac] import org.apache.commons.logging.Log;
    [javac]                                  ^
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:5: error: package org.apache.commons.logging does not exist
    [javac] import org.apache.commons.logging.LogFactory;
    [javac]                                  ^
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:6: error: package org.red5.server.adapter does not exist
    [javac] import org.red5.server.adapter.ApplicationAdapter;
    [javac]                               ^
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:7: error: package org.red5.server.api does not exist
    [javac] import org.red5.server.api.IConnection;
    [javac]                           ^
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:8: error: package org.red5.server.api does not exist
    [javac] import org.red5.server.api.IScope;
    [javac]                           ^
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:12: error: cannot find symbol
    [javac] public class Application extends ApplicationAdapter{
    [javac]                                  ^
    [javac]   symbol: class ApplicationAdapter
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:14: error: cannot find symbol
    [javac] private static final Log log = LogFactory.getLog(Application.class);
    [javac]                      ^
    [javac]   symbol:   class Log
    [javac]   location: class Application
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:17: error: cannot find symbol
    [javac] public boolean appStart(IScope app){
    [javac]                         ^
    [javac]   symbol:   class IScope
    [javac]   location: class Application
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:26: error: cannot find symbol
    [javac] public boolean roomStart(IScope room){
    [javac]                          ^
    [javac]   symbol:   class IScope
    [javac]   location: class Application
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:35: error: cannot find symbol
    [javac] public boolean roomConnect(IConnection conn, Object params[]){
    [javac]                            ^
    [javac]   symbol:   class IConnection
    [javac]   location: class Application
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:44: error: cannot find symbol
    [javac] public void roomDisconnect(IConnection conn){
    [javac]                            ^
    [javac]   symbol:   class IConnection
    [javac]   location: class Application
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:50: error: cannot find symbol
    [javac] public void appDisconnect(IConnection conn){
    [javac]                           ^
    [javac]   symbol:   class IConnection
    [javac]   location: class Application
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:14: error: cannot find symbol
    [javac] private static final Log log = LogFactory.getLog(Application.class);
    [javac]                                ^
    [javac]   symbol:   variable LogFactory
    [javac]   location: class Application
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:18: error: cannot find symbol
    [javac] if(super.appStart(app) == false){
    [javac]    ^
    [javac]   symbol:   variable super
    [javac]   location: class Application
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:27: error: cannot find symbol
    [javac] if(super.roomStart(room) == false){
    [javac]    ^
    [javac]   symbol:   variable super
    [javac]   location: class Application
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:36: error: cannot find symbol
    [javac] if(super.roomConnect(conn, params) == false){
    [javac]    ^
    [javac]   symbol:   variable super
    [javac]   location: class Application
    [javac] C:\Users\MediaStudio\workspace\Sample\src\org\xyz\Application.java:45: error: cannot find symbol
    [javac] super.roomDisconnect(conn);
    [javac] ^
    [javac]   symbol:   variable super
    [javac]   location: class Application
    [javac] 17 errors
    [javac] 1 warning

BUILD FAILED
C:\Users\MediaStudio\workspace\Sample\build.xml:8: Compile failed; see the compiler error output for details.

私はEclipseのクラシックバージョンを使用しています(それが重要かどうかはわかりませんが!)

4

1 に答える 1

0

以下の行のように、正しいjarファイルを指すビルドファイル内classpathのコマンドに属性を追加することで、この問題を解決しました。javac

classpath="${lib.dir}/red5.jar:${lib.dir}/commons-logging-1.1.1.jar"
于 2012-04-19T13:07:06.387 に答える