0
我是MjSip的新手,我想創建一個SipProvider類的實例。 所以我又寫道這個小代碼,但得到一些錯誤:我不能創建一個SipProvider- MjSip庫
sip_provider = new SipProvider("192.168.0.254",5060);
這裏是錯誤堆棧:
java.io.FileNotFoundException: log\192.168.0.254.5060_events.log (The system cannot find the path specified)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.zoolu.tools.Log.<init>(Log.java:112)
at org.zoolu.tools.RotatingLog.<init>(RotatingLog.java:73)
at org.zoolu.sip.provider.SipProvider.initLog(SipProvider.java:295)
at org.zoolu.sip.provider.SipProvider.<init>(SipProvider.java:224)
at local.ua.UA.main(UA.java:539)
java.io.FileNotFoundException: log\192.168.0.254.5060_messages.log (The system cannot find the path specified)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.zoolu.tools.Log.<init>(Log.java:112)
at org.zoolu.tools.RotatingLog.<init>(RotatingLog.java:73)
at org.zoolu.sip.provider.SipProvider.initLog(SipProvider.java:296)
at org.zoolu.sip.provider.SipProvider.<init>(SipProvider.java:224)
at local.ua.UA.main(UA.java:539)
Exception in thread "main" java.lang.NullPointerException
at org.zoolu.tools.Log.flush(Log.java:147)
at org.zoolu.tools.Log.println(Log.java:177)
at org.zoolu.sip.provider.SipProvider.printLog(SipProvider.java:1161)
at org.zoolu.sip.provider.SipProvider.initLog(SipProvider.java:298)
at org.zoolu.sip.provider.SipProvider.<init>(SipProvider.java:224)
at local.ua.UA.main(UA.java:539)
我使用LAN網絡和IP地址是有效的。 爲什麼會發生這種情況? 請幫助我!
對不起。我的錯。我沒有在應用程序根目錄中創建日誌文件夾。:) –
您可以在此處添加答案並進行驗證。 – Nizam
是的,你能添加一個答案嗎? –