2
A
回答
0
我是能夠實現在使用NGX-子進程
在3個步驟:
- 在您的電子/角應用
安裝NGX-子進程
yarn add ngx-childprocess or npm install ngx-childprocess --save
add GX-子進程到app.module
imports: [ NgxChildProcessModulem ....
運行腳本(在這種情況下,我正在運行的Java JAR)
import { ChildProcessService } from 'ngx-childprocess'; ... export class AppComponent { constructor(private childProcessService: ChildProcessService) { console.log('isElectronApp ' + childProcessService.isElectronApp); let options: string[] = []; childProcessService.childProcess.exec('java -jar child-process-test-1.0.jar', options, (data) => {console.log(data);}); } }
相關問題
- 1. PySerial應用程序在shell中運行,不是py腳本
- 2. 如何在Android應用程序中運行shell腳本?
- 3. 在調用shell腳本中終止正在運行的程序
- 4. 使用shell腳本運行Jupyter程序
- 5. 在ksh shell腳本中運行腳本
- 6. 分發在Electron/Atom Shell中創建的應用程序
- 7. 執行應用程序後運行shell腳本命令
- 8. Angular-CLI for Electron應用程序
- 9. 在Qt中執行GMT封裝腳本
- 10. 帶按鈕的Obj-C GUI應用程序運行shell腳本
- 11. android:無法從我的應用程序運行shell腳本(.sh)
- 12. Android程序運行Shell腳本
- 13. 爲Windows創建應用安裝程序 - Electron(electron-packager,electron-builder)
- 14. 在Android應用程序中執行shell腳本
- 15. 在shell中運行python的腳本
- 16. HTTPS請求在Chrome封裝應用程序(Java腳本)
- 17. 如何在Docker鏡像中運行shell腳本和jar應用程序?
- 18. 如何從silverlight應用程序運行shell腳本?
- 19. Shell腳本 - 應用程序未運行時自殺
- 20. 如何從Android應用程序運行shell腳本
- 21. 運行shell腳本從Android應用程序
- 22. 通過JAVA應用程序運行unix shell腳本
- 23. 在shell腳本中運行shell腳本 - 好還是不好?
- 24. 如何在java程序中運行長shell腳本代碼?
- 25. 在程序和輸入參數中運行shell腳本
- 26. 用於在後臺運行應用程序的腳本腳本
- 27. 在python腳本中終止正在運行的應用程序
- 28. 在shell腳本中運行時的Composer安裝錯誤
- 29. 如何從cron運行的Perl腳本中運行shell腳本?
- 30. 運行腳本的Mac安裝程序
我有一個類似的問題https://開頭stackoverflow.com/questions/47993447/how-to-run-requireexpress-from-a-typescript-angular-component-in-electron-a – bluesky777