看板 java 關於我們 聯絡資訊
各位高手請教一下,小弟最近開發一個程式在用 但有時候常忘記自己已經開了這程式而又開一個新的 資料往往都被覆蓋掉... 所以想請教一下,要怎樣做到只能開啟一份該程式就好 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.229.104.80
qrtt1:開啟時在 profile 做個記號吧! 如果已經有記號就不開。 10/31 23:19
ogamenewbie:singleton 或 Lock? 11/01 01:20
PsMonkey:鎖定 port 11/01 08:36
BrideEX:唔...請問 singleton 要怎麼做到? profile 做記號 means? 11/01 12:47
godfat:用 port 不錯,沒想到 XD 11/01 15:08
BrideEX:不好意思 小弟還是不懂 可以請大大詳細說明嗎? 謝謝 11/01 15:19
godfat:程式開啟時 bind 到某個 port, 不能 bind 即程式已開啟 11/01 15:34
BrideEX:了解!! 成功 感謝各位大大 指教 11/01 16:43
ogamenewbie:關於 singleton... 參閱 z->12-> 7 or 8 11/01 21:55
qrtt1:Singleton 只能限制同一個 Process 內不重覆建立類別。 11/01 22:00