当前位置: 首页 > 知识库问答 >
问题:

我的jar应用程序(SMSlib)只在命令行和netbeans中工作

长孙兴德
2023-03-14

我开发了一个发送SMS的应用程序(使用SMSlib),当我在netbeans上执行我的应用程序时,它运行良好,发送SMS没有问题。

使用相同的PC导出可运行Jar,停止发送短信。

但是当我在命令行执行jar时:

 comm.jar ==> C: \ Program Files \ Java \ jdk1.7.0_79 \ lib
 comm.jar ==> C: \ Program Files \ Java \ jdk1.7.0_79 \ jre \ lib \ ext
 win32com.dll ==> C: \ Program Files \ Java \ jdk1.7.0_79 \ bin
 win32com.dll ==> C: \ Program Files \ Java \ jdk1.7.0_79 \ jre \ bin
 win32com.dll ==> C: \ Windows \ System32
 javax.comm.properties ==> C: \ Program Files \ Java \ jdk1.7.0_79 \ lib
 javax.comm.properties ==> C: \ Program Files \ Java \ jdk1.7.0_79 \ jre \ lib
mars 30, 2016 12:32:11 PM Abs.AjouterAbs jBAbsSMSActionPerformed
INFOS: Entering application.

    0 [AWT-EventQueue-0] INFO smslib  - SMSLib: A Java API library for sending and receiving SMS via a GSM modem or other supported gateways.
    This software is distributed under the terms of the Apache v2.0 License.

    0 [AWT-EventQueue-0] INFO smslib  - Version: 3.5.1
    0 [AWT-EventQueue-0] INFO smslib  - JRE Version: 1.7.0_79
    0 [AWT-EventQueue-0] INFO smslib  - JRE Impl Version: 24.79-b02
    0 [AWT-EventQueue-0] INFO smslib  - O/S: Windows 7 / x86 / 6.1
    0 [AWT-EventQueue-0] DEBUG smslib  - Initialized.
    0 [AWT-EventQueue-0] INFO smslib  - Queue directory not defined. Queued messages will not be saved to filesystem.
    0 [AWT-EventQueue-0] DEBUG smslib  - Initialized.
    0 [NotifyQueueManager] DEBUG smslib  - Running...
    0 [NotifyQueueManager] DEBUG smslib  - NotifyQueueManager running...
    0 [AWT-EventQueue-0] DEBUG smslib  - Initialized.
    0 [DelayQueueManager] DEBUG smslib  - Running...
    0 [DelayQueueManager] DEBUG smslib  - DelayQueueManager running...
    0 [WatchDog] DEBUG smslib  - Running...
    0 [Thread-7] INFO smslib  - GTW: modem.com4: Starting gateway, using Generic AT Handler.
    0 [Thread-7] INFO smslib  - GTW: modem.com4: Opening: COM20 @9600
    47 [Thread-7] DEBUG smslib  - Initialized.
    47 [Thread-7] DEBUG smslib  - Initialized.
    47 [KeepAlive [modem.com4]] DEBUG smslib  - Running...
    47 [CNMIEmulatorProcessor [modem.com4]] DEBUG smslib  - ** disabled **
    47 [Thread-7] DEBUG smslib  - GTW: modem.com4: ModemReader thread started.
    47 [Thread-7] DEBUG smslib  - GTW: modem.com4: AsyncNotifier thread started.
    47 [Thread-7] DEBUG smslib  - GTW: modem.com4: AsyncMessageProcessor thread started.
    47 [Thread-7] DEBUG smslib  - GTW: modem.com4: clearBuffer() called.
    1061 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :(27)
    1264 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :+++
    1467 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :ATZ(cr)
    1670 [Thread-7] DEBUG smslib  - GTW: modem.com4: clearBuffer() called.
    2684 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :ATZ(cr)
    2886 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :ATE0(cr)
    3089 [Thread-7] DEBUG smslib  - GTW: modem.com4: clearBuffer() called.
    4103 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :AT+CPIN?(cr)
    4103 [Thread-7] DEBUG smslib  - GTW: modem.com4: BUFFER: +CPIN: READY
    4103 [Thread-7] DEBUG smslib  - GTW: modem.com4: RECV :+CPIN: READY(cr)
    4103 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :ATE0(cr)
    4306 [Thread-7] DEBUG smslib  - GTW: modem.com4: clearBuffer() called.
    5320 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :AT+CLIP=1(cr)
    5320 [Thread-7] DEBUG smslib  - GTW: modem.com4: BUFFER: OK
    5320 [Thread-7] DEBUG smslib  - GTW: modem.com4: RECV :OK(cr)
    5320 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :AT+COPS=0(cr)
    5320 [Thread-7] DEBUG smslib  - GTW: modem.com4: BUFFER: OK
    5320 [Thread-7] DEBUG smslib  - GTW: modem.com4: RECV :OK(cr)
    5320 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :ATE0(cr)
    5523 [Thread-7] DEBUG smslib  - GTW: modem.com4: clearBuffer() called.
    6537 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :AT+CREG=1(cr)
    6537 [Thread-7] DEBUG smslib  - GTW: modem.com4: BUFFER: OK
    6537 [Thread-7] DEBUG smslib  - GTW: modem.com4: RECV :OK(cr)
    6537 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :AT+CREG?(cr)
    6537 [Thread-7] DEBUG smslib  - GTW: modem.com4: BUFFER: +CREG: 1,1OK
    6537 [Thread-7] DEBUG smslib  - GTW: modem.com4: RECV :+CREG: 1,1(cr)OK(cr)
    6537 [Thread-7] INFO smslib  - GTW: modem.com4: GSM: Registered to home network.
    6537 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :AT+CMEE=1(cr)
    6552 [Thread-7] DEBUG smslib  - GTW: modem.com4: BUFFER: OK
    6552 [Thread-7] DEBUG smslib  - GTW: modem.com4: RECV :OK(cr)
    6552 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :AT+CPMS=?(cr)
    6552 [Thread-7] DEBUG smslib  - GTW: modem.com4: BUFFER: +CPMS: ("SM","ME"),("SM","ME"),("SM","ME")OK
    6552 [Thread-7] DEBUG smslib  - GTW: modem.com4: RECV :+CPMS: ("SM","ME"),("SM","ME"),("SM","ME")(cr)OK(cr)
    6552 [Thread-7] INFO smslib  - GTW: modem.com4: MEM: Storage Locations Found: SMME
    6552 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :AT+CNMI=?(cr)
    6568 [Thread-7] DEBUG smslib  - GTW: modem.com4: BUFFER: +CNMI: (0-2),(0-3),(0,2),(0-2),(0,1)OK
    6568 [Thread-7] DEBUG smslib  - GTW: modem.com4: RECV :+CNMI: (0-2),(0-3),(0,2),(0-2),(0,1)(cr)OK(cr)
    6568 [Thread-7] DEBUG smslib  - CNMI: Found best match: 2
    6568 [Thread-7] DEBUG smslib  - CNMI: Found best match: 1
    6568 [Thread-7] DEBUG smslib  - CNMI: Found best match: 0
    6568 [Thread-7] DEBUG smslib  - CNMI: Found best match: 2
    6568 [Thread-7] DEBUG smslib  - CNMI: Found best match: 0
    6568 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :AT+CNMI=2,1,0,2,0(cr)
    6568 [Thread-7] DEBUG smslib  - GTW: modem.com4: BUFFER: OK
    6568 [Thread-7] DEBUG smslib  - GTW: modem.com4: RECV :OK(cr)
    6568 [Thread-7] DEBUG smslib  - GTW: modem.com4: SEND :AT+CMGF=0(cr)
    6568 [Thread-7] DEBUG smslib  - GTW: modem.com4: BUFFER: OK
    6568 [Thread-7] DEBUG smslib  - GTW: modem.com4: RECV :OK(cr)
    6568 [NotifyQueueManager] DEBUG smslib  - NotifyQueueManager end...
    6568 [Thread-7] DEBUG smslib  - Initialized.
    6568 [Thread-7] INFO smslib  - GTW: modem.com4: Gateway started.
    6568 [QueueManager [modem.com4]] DEBUG smslib  - Running...
    6677 [NotifyQueueManager] DEBUG smslib  - Running...
    6677 [NotifyQueueManager] DEBUG smslib  - NotifyQueueManager running...
    6677 [NotifyQueueManager] DEBUG smslib  - NotifyQueueManager end...
    6786 [NotifyQueueManager] DEBUG smslib  - Running...
    6786 [NotifyQueueManager] DEBUG smslib  - NotifyQueueManager running...
    11576 [QueueManager [modem.com4]] DEBUG smslib  - Running...
    11576 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: SEND :AT+CMMS=2(cr)
    11576 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: BUFFER: AT+CMMS=2OK
    11576 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: RECV :AT+CMMS=2(cr)(cr)OK(cr)
    11591 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: =================================================
    << SmsSubmitPdu >>
    Raw Pdu: 0011000B911296564756F30008FF6000410062007300200076006F0075007300200069006E0066006F0072006D006500200071007500650020006C00270065006E0076006F0069002000640065007300200053004D005300200065007300740020007400E90072006D0069006E00E9

    SMSC Address: [Length: 0 octets]
    First Octet: 11 [TP-MTI: (SMS-SUBMIT), TP-MMS: (has no messages), TP-RD: (allow duplicates), TP-VPF: (validity format, integer, TP-SRI: (No Status Report), TP-SRR: (No Status Report), TP-UDHI: (no UDH)]
    Message Reference: 00
    Destination Address: [Length: 11 (0B), Type: 81 (10000001), Address: 21696574653]
    TP-PID: 00 (00000000)
    TP-DCS: 08 (UCS2 encoding) (00001000)
    TP-VPF: 10584 hours

    User Data Length: 96 (60) octets
    User Data (pdu) : 00410062007300200076006F0075007300200069006E0066006F0072006D006500200071007500650020006C00270065006E0076006F0069002000640065007300200053004D005300200065007300740020007400E90072006D0069006E00E9
    User Data (decoded): [Abs vous informe que l'envoi des SMS est términé]
    =================================================

    11591 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: Sending Pdu: 0011000B911296564756F30008FF6000410062007300200076006F0075007300200069006E0066006F0072006D006500200071007500650020006C00270065006E0076006F0069002000640065007300200053004D005300200065007300740020007400E90072006D0069006E00E9
    11591 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: SEND :AT+CMGS=110(cr)
    11794 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: clearBuffer() called.
    12808 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: SEND :0011000B911296564756F30008FF6000410062007300200076006F0075007300200069006E0066006F0072006D006500200071007500650020006C00270065006E0076006F0069002000640065007300200053004D005300200065007300740020007400E90072006D0069006E00E9
    14259 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: BUFFER: 0011000B911296564756F30008FF6000410062007300200076006F0075007300200069006E0066006F0072006D006500200071007500650020006C00270065006E0076006F0069002000640065007300200053004D005300200065007300740020007400E90072006D0069006E00E9+CMGS: 61OK
    14259 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: RECV :0011000B911296564756F30008FF6000410062007300200076006F0075007300200069006E0066006F0072006D006500200071007500650020006C00270065006E0076006F0069002000640065007300200053004D005300200065007300740020007400E90072006D0069006E00E9(26)(cr)+CMGS: 61(cr)OK(cr)
    14274 [NotifyQueueManager] DEBUG smslib  - NotifyQueueManager end...
    14384 [NotifyQueueManager] DEBUG smslib  - Running...
    14384 [NotifyQueueManager] DEBUG smslib  - NotifyQueueManager running...
    15008 [WatchDog] DEBUG smslib  - Running...
    19282 [QueueManager [modem.com4]] DEBUG smslib  - Running...
    19282 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: SEND :AT+CMMS=2(cr)
    19282 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: BUFFER: AT+CMMS=2OK
    19282 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: RECV :AT+CMMS=2(cr)(cr)OK(cr)
    19282 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: =================================================
    << SmsSubmitPdu >>
    Raw Pdu: 0051000B911296564756F30008FF8C0500035D02010059004F005300520041002000420045004E0041004200440045004C0041004400480049004D002000650073007400200061006200730065006E00740028006500290020006C00650020003D003D003D003D003D003E003A00330030002D00300033002D00320030003100360028007300E90061006E006300650031002900200065006E0020

    SMSC Address: [Length: 0 octets]
    First Octet: 51 [TP-MTI: (SMS-SUBMIT), TP-MMS: (has no messages), TP-RD: (allow duplicates), TP-VPF: (validity format, integer, TP-SRI: (No Status Report), TP-SRR: (No Status Report), TP-UDHI: (has UDH)]
    Message Reference: 00
    Destination Address: [Length: 11 (0B), Type: 81 (10000001), Address: 21696574653]
    TP-PID: 00 (00000000)
    TP-DCS: 08 (UCS2 encoding) (00001000)
    TP-VPF: 10584 hours

    User Data Length: 140 (8C) octets
    User Data (pdu) : 0500035D02010059004F005300520041002000420045004E0041004200440045004C0041004400480049004D002000650073007400200061006200730065006E00740028006500290020006C00650020003D003D003D003D003D003E003A00330030002D00300033002D00320030003100360028007300E90061006E006300650031002900200065006E0020
    User Data Header (pdu) : 0500035D0201
    User Data Header Length: 5 (05) octets

    UDH Information Elements:
    ConcatInformationElement[00, 03, 5D0201][MpRefNo: 93, MpMaxNo: 2, MpSeqNo: 1]

    Non UDH Data (pdu)    : 0059004F005300520041002000420045004E0041004200440045004C0041004400480049004D002000650073007400200061006200730065006E00740028006500290020006C00650020003D003D003D003D003D003E003A00330030002D00300033002D00320030003100360028007300E90061006E006300650031002900200065006E0020
    Non UDH Data (decoded): [YOSRA BENABDELADHIM est absent(e) le =====>:30-03-2016(séance1) en ]
    =================================================

    19282 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: Sending Pdu: 0051000B911296564756F30008FF8C0500035D02010059004F005300520041002000420045004E0041004200440045004C0041004400480049004D002000650073007400200061006200730065006E00740028006500290020006C00650020003D003D003D003D003D003E003A00330030002D00300033002D00320030003100360028007300E90061006E006300650031002900200065006E0020
    19282 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: SEND :AT+CMGS=154(cr)
    19485 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: clearBuffer() called.
    20499 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: SEND :0051000B911296564756F30008FF8C0500035D02010059004F005300520041002000420045004E0041004200440045004C0041004400480049004D002000650073007400200061006200730065006E00740028006500290020006C00650020003D003D003D003D003D003E003A00330030002D00300033002D00320030003100360028007300E90061006E006300650031002900200065006E0020
    21903 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: BUFFER: 0051000B911296564756F30008FF8C0500035D02010059004F005300520041002000420045004E0041004200440045004C0041004400480049004D002000650073007400200061006200730065006E00740028006500290020006C00650020003D003D003D003D003D003E003A00330030002D00300033002D00320030003100360028007300E90061006E006300650031002900200065006E0020+CMGS: 62OK
    21903 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: RECV :0051000B911296564756F30008FF8C0500035D02010059004F005300520041002000420045004E0041004200440045004C0041004400480049004D002000650073007400200061006200730065006E00740028006500290020006C00650020003D003D003D003D003D003E003A00330030002D00300033002D00320030003100360028007300E90061006E006300650031002900200065006E0020(26)(cr)+CMGS: 62(cr)OK(cr)
    21918 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: =================================================
    << SmsSubmitPdu >>
    Raw Pdu: 0051000B911296564756F30008FF680500035D0202006D0061007400E800720065003A0041006E0061006C0079007300650020003200200065007400200073006F006E00200061006200730065006E0063006500200065007300740020006E006F006E0020006A00750073007400690066006900E90065

    SMSC Address: [Length: 0 octets]
    First Octet: 51 [TP-MTI: (SMS-SUBMIT), TP-MMS: (has no messages), TP-RD: (allow duplicates), TP-VPF: (validity format, integer, TP-SRI: (No Status Report), TP-SRR: (No Status Report), TP-UDHI: (has UDH)]
    Message Reference: 00
    Destination Address: [Length: 11 (0B), Type: 81 (10000001), Address: 21696574653]
    TP-PID: 00 (00000000)
    TP-DCS: 08 (UCS2 encoding) (00001000)
    TP-VPF: 10584 hours

    User Data Length: 104 (68) octets
    User Data (pdu) : 0500035D0202006D0061007400E800720065003A0041006E0061006C0079007300650020003200200065007400200073006F006E00200061006200730065006E0063006500200065007300740020006E006F006E0020006A00750073007400690066006900E90065
    User Data Header (pdu) : 0500035D0202
    User Data Header Length: 5 (05) octets

    UDH Information Elements:
    ConcatInformationElement[00, 03, 5D0202][MpRefNo: 93, MpMaxNo: 2, MpSeqNo: 2]

    Non UDH Data (pdu)    : 006D0061007400E800720065003A0041006E0061006C0079007300650020003200200065007400200073006F006E00200061006200730065006E0063006500200065007300740020006E006F006E0020006A00750073007400690066006900E90065
    Non UDH Data (decoded): [matère:Analyse 2 et son absence est non justifiée]
    =================================================

    21918 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: Sending Pdu: 0051000B911296564756F30008FF680500035D0202006D0061007400E800720065003A0041006E0061006C0079007300650020003200200065007400200073006F006E00200061006200730065006E0063006500200065007300740020006E006F006E0020006A00750073007400690066006900E90065
    21918 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: SEND :AT+CMGS=118(cr)
    22121 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: clearBuffer() called.
    23135 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: SEND :0051000B911296564756F30008FF680500035D0202006D0061007400E800720065003A0041006E0061006C0079007300650020003200200065007400200073006F006E00200061006200730065006E0063006500200065007300740020006E006F006E0020006A00750073007400690066006900E90065
    24165 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: BUFFER: 0051000B911296564756F30008FF680500035D0202006D0061007400E800720065003A0041006E0061006C0079007300650020003200200065007400200073006F006E00200061006200730065006E0063006500200065007300740020006E006F006E0020006A00750073007400690066006900E90065+CMGS: 63OK
    24180 [QueueManager [modem.com4]] DEBUG smslib  - GTW: modem.com4: RECV :0051000B911296564756F30008FF680500035D0202006D0061007400E800720065003A0041006E0061006C0079007300650020003200200065007400200073006F006E00200061006200730065006E0063006500200065007300740020006E006F006E0020006A00750073007400690066006900E90065(26)(cr)+CMGS: 63(cr)OK(cr)
    24180 [NotifyQueueManager] DEBUG smslib  - NotifyQueueManager end...
    24290 [NotifyQueueManager] DEBUG smslib  - Running...
    24290 [NotifyQueueManager] DEBUG smslib  - NotifyQueueManager running...
    29188 [QueueManager [modem.com4]] DEBUG smslib  - Running...
    30015 [WatchDog] DEBUG smslib  - Running...
    30062 [CNMIEmulatorProcessor [modem.com4]] DEBUG smslib  - ** disabled **
    32480 [DelayQueueManager] DEBUG smslib  - DelayQueueManager end...
    32683 [WatchDog] DEBUG smslib  - Stopped.
    32683 [AWT-EventQueue-0] INFO smslib  - GTW: modem.com4: Stopping gateway...
    32683 [NotifyQueueManager] DEBUG smslib  - NotifyQueueManager end...
    32683 [QueueManager [modem.com4]] DEBUG smslib  - Stopped.
    32683 [KeepAlive [modem.com4]] DEBUG smslib  - Stopped.
    32683 [CNMIEmulatorProcessor [modem.com4]] DEBUG smslib  - Stopped.
    32683 [SMSLib-AsyncNotifier : modem.com4] DEBUG smslib  - GTW: modem.com4: AsyncNotifier thread ended.
    32683 [SMSLib-AsyncMessageProcessor : modem.com4] DEBUG smslib  - GTW: modem.com4: AsyncMessageProcessor thread ended.
    32683 [SMSlib-ModemReader-modem.com4] DEBUG smslib  - GTW: modem.com4: ModemReader thread ended.
    32683 [AWT-EventQueue-0] INFO smslib  - GTW: modem.com4: Closing: COM20 @9600
    32683 [AWT-EventQueue-0] INFO smslib  - GTW: modem.com4: Gateway stopped.
    32792 [NotifyQueueManager] DEBUG smslib  - Running...
    32792 [NotifyQueueManager] DEBUG smslib  - NotifyQueueManager running...
    32792 [NotifyQueueManager] DEBUG smslib  - NotifyQueueManager end...
    32885 [NotifyQueueManager] DEBUG smslib  - Stopped.

mars 30, 2016 12:33:01 PM Abs.AjouterAbs jBAbsSMSActionPerformed
INFOS: Exiting application.

javax.comm.properties:

#
# Drivers loaded by the Java Communications API standard extension
# at initialization time
#
# Format:
#   Each line must contain ONE driver definition only
#   Each line must be of the form:
#           driver=<ClassName>
#       No spaces or tabs in the line.
#       ClassName must implement the interface javax.comm.CommDriver
#           example: driver=Win32Serial
#   
#
# The hash(#) character indicates comment till end of line.
#
# Windows Serial Driver
Driver=com.sun.comm.Win32Driver

共有1个答案

双恩
2023-03-14

您得到的异常是关于无效端口的。在NetBeans中运行时,它使用什么端口进行通信?当您在NetBeans之外以胖JAR的形式运行JAR时,请检查您的属性文件,看看您设置的端口号是什么。它可以是空的或无效的数字,例如“”或-1。

端口可以在0-65535之间。有些是保留的,不能使用。如果您在同一个网络接口上使用两个相同的端口,那么您可能会遇到端口冲突问题。这里有一种通过netstat检查端口问题的方法。

 类似资料:
  • 我使用NetBeans8.2创建了一个非常简单的Hello World程序。但是,当我尝试在Linux中使用命令行执行jar文件时 如果你需要更多的信息,请告诉我。 谢了。

  • 请帮帮我,我用两个外部jar文件开发了一个简单的应用程序。在清理和构建的同时,它为应用程序和dist目录中的库文件夹创建了一个jar文件。当我尝试作为jar执行时,它执行得很完美

  • 问题内容: 嗨,我正在开发一个需要我运行一些bash代码的应用程序,有没有一种方法可以将脚本硬编码到我的应用程序中然后运行它?例如(这是一个非常简化的示例) 我有以下方法来运行一行bash命令,但需要在多行中运行类似的内容。同样,上面的代码是一个非常简化的示例,我实际上在执行的操作必须通过脚本运行,而不能通过Java完成。我也想对它进行硬编码,因为我知道可以将脚本存储在手机上并使用以下命令运行它,

  • 我有一个部分扎根的Android设备。所谓部分root,是指我只能通过ADB运行root命令。我已经想出了如何在设备本身的终端模拟器中本地运行这些命令。我的问题是,我将如何着手编写Android应用程序的代码,从按钮按钮执行一个ADB命令(或多个命令)?我找不到任何解释如何通过应用程序界面运行直接ADB命令的东西。只是为了澄清,任何涉及“su”的东西都不会在这个设备上工作。它只接受ADB输入进行根

  • 问题内容: 我通常使用VisualVM对运行的Java应用程序进行概要分析,但它需要X才能在计算机上运行。 我知道我可以通过管理端口进行连接,但这将是一个脱机的概要分析,对我来说还不够。 因此,我正在寻找一种解决方案,可以通过命令行分析正在运行的Java应用程序方法的CPU使用率。对于我来说,在服务器上收集数据就足够了,然后可以在另一台计算机上分析收集的数据。 更新: 看来我需要更具体。我想从命令

  • 注意:test.class文件也使用了example.jar文件中的类文件,有自己的包结构。 我知道我可以将它们放在一个jar文件中,不幸的是我需要将test.class文件分开。