0

hereから SMSLib マスター ソースをビルドしようとしています。インストール手順に従って、次の jar ファイルを jre の \lib\ext フォルダーにコピーしました。

comm.jar
commons-net-3.3.jar
jsmpp-2.1.0.jar

win32com.dll を \jre\bin にコピーしました。javax.comm.properties \jre\lib ディレクトリも配置しました。ANTを使用してソースをコンパイルしようとすると. smslib ソース自体に多くのエラーが表示されます

Buildfile: C:\Users\Keerthi\Downloads\smslib-v3-master\build.xml

compile.smslib:
    [javac] Compiling 2 source files to C:\Users\Keerthi\Downloads\smslib-v3-master\dist\classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] C:\Users\Keerthi\Downloads\smslib-v3-master\src\java\org\smslib\smpp\jsmpp\JSMPPGateway.java:282: error: method does not override or implement a method from a supertype
    [javac]         @Override
    [javac]         ^
    [javac] C:\Users\Keerthi\Downloads\smslib-v3-master\src\java\org\smslib\smpp\jsmpp\JSMPPGateway.java:302: error: cannot find symbol
    [javac]                 encoding = Alphabet.ALPHA_UNSPECIFIED_2;
    [javac]                                    ^
    [javac]   symbol:   variable ALPHA_UNSPECIFIED_2
    [javac]   location: class Alphabet
    [javac] C:\Users\Keerthi\Downloads\smslib-v3-master\src\java\org\smslib\smpp\jsmpp\JSMPPGateway.java:309: error: no suitable constructor found for GeneralDataCoding(Alphabet,MessageClass,boolean)
    [javac]                 dataCoding = new GeneralDataCoding(encoding, MessageClass.CLASS0, true);
    [javac]                              ^
    [javac]     constructor GeneralDataCoding.GeneralDataCoding(boolean,boolean,MessageClass,Alphabet) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor GeneralDataCoding.GeneralDataCoding(int) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor GeneralDataCoding.GeneralDataCoding(byte) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor GeneralDataCoding.GeneralDataCoding() is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac] C:\Users\Keerthi\Downloads\smslib-v3-master\src\java\org\smslib\smpp\jsmpp\JSMPPGateway.java:312: error: no suitable constructor found for GeneralDataCoding(Alphabet,MessageClass,boolean)
    [javac]                 dataCoding = new GeneralDataCoding(encoding, MessageClass.CLASS1, true);
    [javac]                              ^
    [javac]     constructor GeneralDataCoding.GeneralDataCoding(boolean,boolean,MessageClass,Alphabet) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor GeneralDataCoding.GeneralDataCoding(int) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor GeneralDataCoding.GeneralDataCoding(byte) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor GeneralDataCoding.GeneralDataCoding() is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac] C:\Users\Keerthi\Downloads\smslib-v3-master\src\java\org\smslib\smpp\jsmpp\JSMPPGateway.java:315: error: no suitable constructor found for GeneralDataCoding(Alphabet,MessageClass,boolean)
    [javac]                 dataCoding = new GeneralDataCoding(encoding, MessageClass.CLASS2, true);
    [javac]                              ^
    [javac]     constructor GeneralDataCoding.GeneralDataCoding(boolean,boolean,MessageClass,Alphabet) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor GeneralDataCoding.GeneralDataCoding(int) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor GeneralDataCoding.GeneralDataCoding(byte) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor GeneralDataCoding.GeneralDataCoding() is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac] C:\Users\Keerthi\Downloads\smslib-v3-master\src\java\org\smslib\smpp\jsmpp\JSMPPGateway.java:318: error: no suitable constructor found for GeneralDataCoding(Alphabet,MessageClass,boolean)
    [javac]                 dataCoding = new GeneralDataCoding(encoding, MessageClass.CLASS3, true);
    [javac]                              ^
    [javac]     constructor GeneralDataCoding.GeneralDataCoding(boolean,boolean,MessageClass,Alphabet) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor GeneralDataCoding.GeneralDataCoding(int) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor GeneralDataCoding.GeneralDataCoding(byte) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor GeneralDataCoding.GeneralDataCoding() is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac] C:\Users\Keerthi\Downloads\smslib-v3-master\src\java\org\smslib\smpp\jsmpp\JSMPPGateway.java:321: error: no suitable constructor found for GeneralDataCoding(Alphabet,MessageClass,boolean)
    [javac]                 dataCoding = new GeneralDataCoding(encoding, MessageClass.CLASS1, true);
    [javac]                              ^
    [javac]     constructor GeneralDataCoding.GeneralDataCoding(boolean,boolean,MessageClass,Alphabet) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor GeneralDataCoding.GeneralDataCoding(int) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor GeneralDataCoding.GeneralDataCoding(byte) is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac]     constructor GeneralDataCoding.GeneralDataCoding() is not applicable
    [javac]       (actual and formal argument lists differ in length)
    [javac] 7 errors
    [javac] 1 warning

これを理解するのを手伝ってください。

4

1 に答える 1

0

JSMPPjar バージョンが問題でした。v2.2.1にアップデートしたら。それは魅力のように機能しました。

注: github からソースをビルドする場合、上記の jar ファイルを \lib\ext ディレクトリにコピーする必要はありません。これらの jar は、ソースの lib ディレクトリに既に存在します。

于 2015-10-16T06:48:20.803 に答える