安裝與升級 > 安裝與組態指南 > 進階組態 > 以 Windows 服務的方式執行 Windchill
  
以 Windows 服務的方式執行 Windchill
執行下列指令,將 Windchill 配置為以 Windows 服務的方式來執行。當執行這個指令時,會自動起動服務。
從 Windchill shell 中,輸入:
ant -buildfile <Windchill>\opt\ntservice\WindchillService.xml install
-DserviceName=<ServiceName>
其中 <ServiceName> 是參照此服務 (例如,WTService) 的具唯一性名稱。
現在,您就可以透過「Windows 服務」公用程式來管理 (例如,起動和停止) Windchill。它會在公用程式中以您在上述指令中提供的名稱 (即 <ServiceName>) 列出。
執行 Windows 服務時應該考量的事項
下列各項是當您以 Windows 服務的方式執行應用程式時應該考量的事項:
支援執行服務的環境不同於從主控台視窗啟動服務的環境。
以預設系統帳戶執行的服務無法存取共用的網路資源。您必須將權限修改為允許存取共用的網路資源。
伺服器啟動程式需要正式安裝的 JDK 才能夠執行。正式安裝表示 JDK 已隨 JDK 安裝程式一起安裝。
疑難排解秘訣
如果在 Windows 事件檢視器中出現「尋找主類別時發生 JNI 錯誤」或「無法變更工作目錄」的訊息,請嘗試執行下列動作:
驗證您的 CLASSPATH 設定以確保其正確無誤。如果目錄中包含空格,請用引號將目錄路徑括起來。
以 Windows 服務的形式移除 Windchill
若要將 Windchill 作為服務移除,請從 Windchill shell 執行下列指令:
ant -buildfile <Windchill>\opt\ntservice\WindchillService.xml uninstall
-DserviceName=<ServiceName>
其中 <ServiceName> 是您在建立 Windchill Windows 服務時為其指定的名稱。