这是一个通用命令,可以在 Unix 和 Windows 系统上使用 Equinox 实现。
已安装 Eclipse 2018-12 进行测试,但它也应该适用于其他版本。
进入插件目录
Unix,重击:
java -Dosgi.bundles=\
$(ls -1 org.apache.felix.gogo.shell_*.jar)@start,\
$(ls -1 org.apache.felix.gogo.command_*.jar)@start,\
$(ls -1 org.apache.felix.gogo.runtime_*.jar)@start,\
$(ls -1 org.eclipse.equinox.console_*.jar)@start\
-jar $(ls -1 org.eclipse.osgi_*.jar) -console
Windows、powershell(仅在控制台模式下工作):
java ('-Dosgi.bundles='+((`
"$(ls org.apache.felix.gogo.shell_*.jar | select -ExpandProperty Name)`@start",`
"$(ls org.apache.felix.gogo.command_*.jar | select -ExpandProperty Name)`@start",`
"$(ls org.apache.felix.gogo.runtime_*.jar | select -ExpandProperty Name)`@start",`
"$(ls org.eclipse.equinox.console_*.jar | select -ExpandProperty Name)`@start"`
) -join ',')) '-jar' "$(ls org.eclipse.osgi_*.jar | select -ExpandProperty Name)" '-console'
Windows、powershell(也适用于 ISE):
Start-Process 'java' -ArgumentList `
(('-Dosgi.bundles=',`
"$(ls org.apache.felix.gogo.shell_*.jar | select -ExpandProperty Name)`@start,",`
"$(ls org.apache.felix.gogo.command_*.jar | select -ExpandProperty Name)`@start,",`
"$(ls org.apache.felix.gogo.runtime_*.jar | select -ExpandProperty Name)`@start,",`
"$(ls org.eclipse.equinox.console_*.jar | select -ExpandProperty Name)`@start",`
" -jar $(ls org.eclipse.osgi_*.jar | select -ExpandProperty Name) -console"
) -join '')
链接到 Eclipse 错误:
错误 371101 - Equinox 控制台无法启动