Откройте Eclipse (STS) через AppleScript - PullRequest
0 голосов
/ 24 октября 2018

Я могу открыть экземпляр STS через командную строку на Mac:

open -a /Applications/STS.app --args -data ~/abc/spring-security/ -clean -showlocation  -vmargs -Xmx1024m -XX:MaxPermSize=256m

, однако он перестает работать, как только я пытаюсь обернуть его как AppleScript:

do shell script "open -a /Applications/STS.app --args -data ~/abc/spring-security/ -clean -showlocation  -vmargs -Xmx1024m -XX:MaxPermSize=256m"

со следующим:

!SESSION 2018-10-24 10:27:37.172 -----------------------------------------------
eclipse.buildId=3.9.3.201803200915-RELEASE-e47
java.version=1.8.0_161
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.springsource.sts.ide -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.springsource.sts.ide -data /Users/simeonleyzerzon/abc/spring-security/ -clean -showlocation

!ENTRY org.eclipse.ui 2 0 2018-10-24 10:27:49.063
!MESSAGE Warnings while parsing the images from the 'org.eclipse.ui.commandImages' extension point.
!SUBENTRY 1 org.eclipse.ui 2 0 2018-10-24 10:27:49.063
!MESSAGE Cannot bind to an undefined command: plug-in='org.eclipse.lsp4e', id='org.eclipse.lsp4e.togglehighlight'

!ENTRY org.eclipse.core.net 1 0 2018-10-24 10:27:49.243
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences

!ENTRY org.eclipse.jface 2 0 2018-10-24 10:27:54.986
!MESSAGE Keybinding conflicts occurred.  They may interfere with normal accelerator operation.
!SUBENTRY 1 org.eclipse.jface 2 0 2018-10-24 10:27:54.986
!MESSAGE A conflict occurred for ALT+COMMAND+R:
Binding(ALT+COMMAND+R,
    ParameterizedCommand(Command(org.python.pydev.debug.setnext,Set Next Statement,
        ,
        Category(org.python.pydev.ui.category.run,PyDev - Run,Python run category,true),
        org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@6b84508a,
        ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,,system)
Binding(ALT+COMMAND+R,


ParameterizedCommand(Command(org.eclipse.jdt.ui.edit.text.java.rename.element,Rename - Refactoring ,
            Rename the selected element,
            Category(org.eclipse.jdt.ui.category.refactoring,Refactor - Java,Java Refactoring Actions,true),
            org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@3c48334b,
            ,,true),null),
        org.eclipse.ui.defaultAcceleratorConfiguration,
        org.eclipse.ui.contexts.window,,cocoa,system)
    !SUBENTRY 1 org.eclipse.jface 2 0 2018-10-24 10:27:54.986
    !MESSAGE A conflict occurred for COMMAND+SHIFT+T:
    Binding(COMMAND+SHIFT+T,
        ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type,
            Open a type in a Java editor,
            Category(org.eclipse.ui.category.navigate,Navigate,null,true),
            org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@16923216,
            ,,true),null),
        org.eclipse.ui.defaultAcceleratorConfiguration,
        org.eclipse.ui.contexts.window,,,system)
    Binding(COMMAND+SHIFT+T,
        ParameterizedCommand(Command(org.eclipse.lsp4e.symbolinworkspace,Go to Symbol in Workspace,
            ,
            Category(org.eclipse.lsp4e.category,Language Servers,null,true),
            org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@85a94c8,
            ,,true),null),
        org.eclipse.ui.defaultAcceleratorConfiguration,
        org.eclipse.ui.contexts.window,,,system)

    !ENTRY org.eclipse.ui 2 2 2018-10-24 10:27:56.170
    !MESSAGE org.eclipse.jdt.junit.ResultView: Deprecated relationship "fast" should be converted to "stack".

    !ENTRY org.eclipse.ui 2 2 2018-10-24 10:27:56.171
    !MESSAGE org.springframework.ide.eclipse.aop.ui.navigator.aopReferenceModelNavigator: Deprecated relationship "fast" should be converted to "stack".

    !ENTRY org.eclipse.ui 2 2 2018-10-24 10:27:56.171
    !MESSAGE org.eclipse.contribution.xref.ui.views.XReferenceView: Deprecated relationship "fast" should be converted to "stack".

    !ENTRY org.eclipse.jface.text 2 0 2018-10-24 10:27:57.578
    !MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number'

    !ENTRY org.eclipse.jface.text 2 0 2018-10-24 10:27:57.579
    !MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round'

    !ENTRY org.jkiss.dbeaver.model 2 0 2018-10-24 10:28:00.355
    !MESSAGE Project 'RemoteSystemsTempFiles' not found in registry
    !SESSION 2018-10-24 10:37:18.756 -----------------------------------------------
    eclipse.buildId=3.9.3.201803200915-RELEASE-e47
    java.version=10
    java.vendor=Oracle Corporation
    BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
    Framework arguments:  -product org.springsource.sts.ide -showlocation
    Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.springsource.sts.ide -data /Users/simeonleyzerzon/abc/spring-security/ -clean -showlocation

    !ENTRY org.eclipse.osgi 4 0 2018-10-24 10:37:31.529
    !MESSAGE Application error
    !STACK 1
    org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
        at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:410)
        at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:318)
        at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
        at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultHeadlessContext(E4Application.java:491)
        at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultContext(E4Application.java:505)
        at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:204)
        at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:614)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
    Caused by: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
        at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:124)
        at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:399)
        ... 22 more
    Caused by: java.lang.ClassNotFoundException: javax.annotation.PostConstruct cannot be found by org.eclipse.e4.core.di_1.6.100.v20170421-1418
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:433)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
        ... 24 more

    !ENTRY org.eclipse.e4.ui.workbench 4 0 2018-10-24 10:37:31.537
    !MESSAGE FrameworkEvent ERROR
    !STACK 0
    java.lang.NoClassDefFoundError: javax/annotation/PreDestroy
        at org.eclipse.e4.core.internal.di.InjectorImpl.disposed(InjectorImpl.java:450)
        at org.eclipse.e4.core.internal.di.Requestor.disposed(Requestor.java:156)
        at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:78)
        at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:111)
        at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.handleInvalid(TrackableComputationExt.java:74)
        at org.eclipse.e4.core.internal.contexts.EclipseContext.dispose(EclipseContext.java:178)
        at org.eclipse.e4.core.internal.contexts.osgi.EclipseContextOSGi.dispose(EclipseContextOSGi.java:99)
        at org.eclipse.e4.core.internal.contexts.osgi.EclipseContextOSGi.bundleChanged(EclipseContextOSGi.java:141)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112)
        at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168)
        at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
        at org.eclipse.osgi.container.Module.doStop(Module.java:634)
        at org.eclipse.osgi.container.Module.stop(Module.java:498)
        at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202)
        at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165)
        at java.base/java.lang.Thread.run(Thread.java:844)
    Caused by: java.lang.ClassNotFoundException: javax.annotation.PreDestroy cannot be found by org.eclipse.e4.core.di_1.6.100.v20170421-1418
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:433)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
        ... 21 more
    !SESSION 2018-10-24 10:37:46.365 -----------------------------------------------
    eclipse.buildId=3.9.3.201803200915-RELEASE-e47
    java.version=10
    java.vendor=Oracle Corporation
    BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
    Framework arguments:  -product org.springsource.sts.ide -showlocation
    Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.springsource.sts.ide -data /Users/simeonleyzerzon/abc/spring-security/ -clean -showlocation

    !ENTRY org.eclipse.osgi 4 0 2018-10-24 10:37:57.312
    !MESSAGE Application error
    !STACK 1
    org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
        at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:410)
        at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:318)
        at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162)
        at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultHeadlessContext(E4Application.java:491)
        at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultContext(E4Application.java:505)
        at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:204)
        at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:614)
        at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
        at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
        at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:564)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
        at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
    Caused by: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
        at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:124)
        at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:399)
        ... 22 more
    Caused by: java.lang.ClassNotFoundException: javax.annotation.PostConstruct cannot be found by org.eclipse.e4.core.di_1.6.100.v20170421-1418
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:433)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
        ... 24 more

    !ENTRY org.eclipse.e4.ui.workbench 4 0 2018-10-24 10:37:57.319
    !MESSAGE FrameworkEvent ERROR
    !STACK 0
    java.lang.NoClassDefFoundError: javax/annotation/PreDestroy
        at org.eclipse.e4.core.internal.di.InjectorImpl.disposed(InjectorImpl.java:450)
        at org.eclipse.e4.core.internal.di.Requestor.disposed(Requestor.java:156)
        at org.eclipse.e4.core.internal.contexts.ContextObjectSupplier$ContextInjectionListener.update(ContextObjectSupplier.java:78)
        at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.update(TrackableComputationExt.java:111)
        at org.eclipse.e4.core.internal.contexts.TrackableComputationExt.handleInvalid(TrackableComputationExt.java:74)
        at org.eclipse.e4.core.internal.contexts.EclipseContext.dispose(EclipseContext.java:178)
        at org.eclipse.e4.core.internal.contexts.osgi.EclipseContextOSGi.dispose(EclipseContextOSGi.java:99)
        at org.eclipse.e4.core.internal.contexts.osgi.EclipseContextOSGi.bundleChanged(EclipseContextOSGi.java:141)
        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908)
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120)
        at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112)
        at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168)
        at org.eclipse.osgi.container.Module.publishEvent(Module.java:476)
        at org.eclipse.osgi.container.Module.doStop(Module.java:634)
        at org.eclipse.osgi.container.Module.stop(Module.java:498)
        at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202)
        at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165)
        at java.base/java.lang.Thread.run(Thread.java:844)
    Caused by: java.lang.ClassNotFoundException: javax.annotation.PreDestroy cannot be found by org.eclipse.e4.core.di_1.6.100.v20170421-1418
        at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:433)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
        at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
        at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
        ... 21 more


How does one create a script to start Eclipse (STS) on a Mac?  I'm trying to replicate on a Mac a similar behavior of a Windows batch file, e.g.: 

    start /B C:\sts-bundle\sts-3.8.4.RELEASE\STS.exe -data %~dp0 -clean -showlocation -vmC:\Java\java-8 -vmargs -Xmx1024m -XX:MaxPermSize=256m -javaagent:"C:\Users\Simeon\.m2\repository\org\projectlombok\lombok\1.16.8\lombok-1.16.8.jar" -Xbootclasspath/a:"C:\Users\Simeon\.m2\repository\org\projectlombok\lombok\1.16.8\lombok-1.16.8.jar"

Any pointers and best practices in AppleScript are appreciated.

ОБНОВЛЕНИЕ:

Согласно комментарию @ greg-449, я обновил команду в редакторе сценариев (удаленопробел):

do shell script "open -a /Applications/STS.app --args -data ~/abc/spring-security/ -clean -showlocation  -vm 
/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk -vmargs -Xmx1024m -XX:MaxPermSize=256m"

, который:

  1. открывает диалоговое окно с сообщением об ошибке (с тем же содержимым, которое затем сохраняется в редакторе сценариев Apple):

ошибка "sh: строка 1: /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk: это каталог" номер 126

позволяет открывать STS (в отличие от ранее)

содержит следующие ошибки в STS .metadata/.log:

! SESSION 2018-10-24 21: 03: 22.116 ----------------------------------------------- eclipse.buildId = 3.9.3.201803200915-RELEASE-e47 java.version = 10 java.vendor = константы загрузчика Oracle Corporation: OS = macosx, ARCH = x86_64, WS = какао, NL = аргументы среды EN_US: аргументы -продуктаorg.springsource.sts.ide Аргументы командной строки: -os macosx -ws cocoa -arch x86_64 -product org.springsource.sts.ide -data / Users / simeonleyzerzon / abc / spring-security / -clean

! ENTRY org.eclipse.ui 2 0 2018-10-24 21: 03: 37.575! СООБЩЕНИЕ Предупреждения при разборе изображений из точки расширения org.eclipse.ui.commandImages.! SUBENTRY 1 org.eclipse.ui 2 0 2018-10-24 21: 03: 37.575! MESSAGE Невозможно связать с неопределенной командой: plug-in = 'org.eclipse.lsp4e', id = 'org.eclipse.lsp4e.togglehighlight '

! ENTRY org.eclipse.core.net 1 0 2018-10-24 21: 03: 37.846! СООБЩЕНИЕ Системное свойство http.nonProxyHosts установлено на локальное | .local | 169.254 /16 | .169.254 / 16 от внешнего источника.Это значение будет перезаписано с использованием значений из настроек

! ENTRY org.eclipse.jface 2 0 2018-10-24 21: 03: 45.223! MESSAGE Возникли конфликты привязки клавиш.Они могут мешать нормальной работе акселератора.! SUBENTRY 1 org.eclipse.jface 2 0 2018-10-24 21: 03: 45.224! MESSAGE Возник конфликт для ALT + COMMAND + R: Binding (ALT + COMMAND + R, ParameterizedCommand (Command (org.python.pydev.debug.setnext, Set Next Statement,, Категория (org.python.pydev.ui.category.run, PyDev - Выполнить, категория запуска Python, true), org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@a0682a3, ,, true), null), org.eclipse.ui.defaultAcceleratorConfiguration, org.eclipse.ui.contexts.window ,,, system) Связывание (ALT + COMMAND + R, ParameterizedCommand (Команда (org.eclipse.jdt.ui.edit.text.java.rename.element, переименовать рефакторинг, переименовать выбранный элемент, категорию (org.eclipse.jdt.ui.category.refactoring, рефакторинг - Java, действия по рефакторингу Java, true), org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@1f018208, ,, true), null), org.eclipse.ui.defaultAcceleratorConfiguration, org.eclipse.ui.contexts.window ,, какао, система)! SUBENTRY 1 org.eclipse.jface 2 0 2018-10-24 21:03: 45.224! СООБЩЕНИЕ Возник конфликт для COMMAND + SHIFT + T: Binding (COMMAND + SHIFT + T, ParameterizedCommand (Command (org.eclipse.jdt.ui.navigate.open.type, Открыть тип, Открыть тип в редакторе Java, Категория (org.eclipse.ui.category.navigate, Navigate, null, верно), org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@801c0e8, ,, true), null), org.eclipse.ui.defaultAcceleratorConfiguration, org.eclipse.ui.contexts.window ,,, system) Связывание (COMMAND +SHIFT + T, ParameterizedCommand (Команда (org.eclipse.lsp4e.symbolinworkspace, Перейти к символу в рабочей области,, Категория (org.eclipse.lsp4e.category, Языковые серверы, null, true), org.eclipse.ui.internal.WorkbenchHandlerService@ 5aa2493f, ,, true), null), org.eclipse.ui.defaultAcceleratorConfiguration, org.eclipse.ui.contexts.window ,,, system)

! ENTRY org.eclipse.ui 2 2 2018-10-24 21: 03: 46.694! MESSAGE org.eclipse.jdt.junit.ResultView: устаревшие отношения "fast" должны быть преобразованы в "stack".

! ENTRY org.eclipse.ui 2 2 2018-10-24 21: 03: 46.695! MESSAGE org.springframework.ide.eclipse.aop.ui.navigator.aopReferenceModelNavigator: устаревшее отношение "fast" следует преобразовать в "stack ".

! ENTRY org.eclipse.ui 2 2 2018-10-24 21: 03: 46.695! MESSAGE org.eclipse.contribution.xref.ui.views.XReferenceView: устаревшие отношения" fast "должныбыть преобразован в «стек».

! ENTRY org.eclipse.jface.text 2 0 2018-10-24 21: 03: 48.503! MESSAGE Повторяющийся идентификатор шаблона: 'org.eclipse.wst.xslt.templates.xpath.number '

! ENTRY org.eclipse.jface.text 2 0 2018-10-24 21: 03: 48.504! MESSAGE Повторяющийся идентификатор шаблона:' org.eclipse.wst.xslt.templates.xpath.round '

! ENTRY org.jkiss.dbeaver.model 2 0 2018-10-24 21: 03: 51.613! СООБЩЕНИЕ Проект' RemoteSystemsTempFiles 'не найден в реестре

Похоже, я продвинулся дальше, но все еще есть некоторые проблемы.Да, у меня установлены плагины PyDev, DBeaver, которые до сих пор не вызывали проблем.

===

Согласно предложению Мартина, я пытался указать на исполняемый файл Java - скрипт Apple:

do shell script "open -a /Applications/STS.app --args -data ~/abc/spring-security/ -clean -showlocation  -vm 
/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin/java -vmargs -Xmx1024m -XX:MaxPermSize=256m"

Теперь редактор сценариев жалуется на следующее:

error "Unrecognized option: -vmargs
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit." number 1

создается новое рабочее пространство (и экземпляр STS) со следующим (что очень похоже на предыдущеепопробуйте, не указывая на Java Exec:

!SESSION 2018-10-25 13:52:05.053 -----------------------------------------------
eclipse.buildId=3.9.3.201803200915-RELEASE-e47
java.version=10
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.springsource.sts.ide
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.springsource.sts.ide -data /Users/simeonleyzerzon/abc/spring-security/ -clean

!ENTRY org.eclipse.ui 2 0 2018-10-25 13:52:20.096
!MESSAGE Warnings while parsing the images from the 'org.eclipse.ui.commandImages' extension point.
!SUBENTRY 1 org.eclipse.ui 2 0 2018-10-25 13:52:20.096
!MESSAGE Cannot bind to an undefined command: plug-in='org.eclipse.lsp4e', id='org.eclipse.lsp4e.togglehighlight'

!ENTRY org.eclipse.core.net 1 0 2018-10-25 13:52:20.356
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences

!ENTRY org.eclipse.jface 2 0 2018-10-25 13:52:26.785
!MESSAGE Keybinding conflicts occurred.  They may interfere with normal accelerator operation.
!SUBENTRY 1 org.eclipse.jface 2 0 2018-10-25 13:52:26.786
!MESSAGE A conflict occurred for ALT+COMMAND+R:
Binding(ALT+COMMAND+R,
    ParameterizedCommand(Command(org.python.pydev.debug.setnext,Set Next Statement,
        ,
        Category(org.python.pydev.ui.category.run,PyDev - Run,Python run category,true),
        org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@7a8623b1,
        ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,,system)
Binding(ALT+COMMAND+R,
    ParameterizedCommand(Command(org.eclipse.jdt.ui.edit.text.java.rename.element,Rename - Refactoring ,
        Rename the selected element,
        Category(org.eclipse.jdt.ui.category.refactoring,Refactor - Java,Java Refactoring Actions,true),
        org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@3b2fac55,
        ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,cocoa,system)
!SUBENTRY 1 org.eclipse.jface 2 0 2018-10-25 13:52:26.786
!MESSAGE A conflict occurred for COMMAND+SHIFT+T:
Binding(COMMAND+SHIFT+T,
    ParameterizedCommand(Command(org.eclipse.jdt.ui.navigate.open.type,Open Type,
        Open a type in a Java editor,
        Category(org.eclipse.ui.category.navigate,Navigate,null,true),
        org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@4866eb17,
        ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,,system)
Binding(COMMAND+SHIFT+T,
    ParameterizedCommand(Command(org.eclipse.lsp4e.symbolinworkspace,Go to Symbol in Workspace,
        ,
        Category(org.eclipse.lsp4e.category,Language Servers,null,true),
        org.eclipse.ui.internal.WorkbenchHandlerServiceHandler@45b94c10,
        ,,true),null),
    org.eclipse.ui.defaultAcceleratorConfiguration,
    org.eclipse.ui.contexts.window,,,system)

!ENTRY org.eclipse.ui 2 2 2018-10-25 13:52:28.210
!MESSAGE org.eclipse.jdt.junit.ResultView: Deprecated relationship "fast" should be converted to "stack".

!ENTRY org.eclipse.ui 2 2 2018-10-25 13:52:28.213
!MESSAGE org.springframework.ide.eclipse.aop.ui.navigator.aopReferenceModelNavigator: Deprecated relationship "fast" should be converted to "stack".

!ENTRY org.eclipse.ui 2 2 2018-10-25 13:52:28.213
!MESSAGE org.eclipse.contribution.xref.ui.views.XReferenceView: Deprecated relationship "fast" should be converted to "stack".

!ENTRY org.eclipse.jface.text 2 0 2018-10-25 13:52:30.187
!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number'

!ENTRY org.eclipse.jface.text 2 0 2018-10-25 13:52:30.187
!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round'

!ENTRY org.jkiss.dbeaver.model 2 0 2018-10-25 13:52:32.968
!MESSAGE Project 'RemoteSystemsTempFiles' not found in registry

Кстати, в прошлом (на машинах Windows) я всегда указывал на дом Java, и он никогда не жаловался, и никогда не жаловался на отсутствие места после-vm:

start /B C:\sts-bundle\sts-3.8.4.RELEASE\STS.exe -data %~dp0 -clean -showlocation -vmC:\Java\java-8 -vmargs -Xmx1024m -XX:MaxPermSize=256m -javaagent:"C:\Users\Simeon\.m2\repository\org\projectlombok\lombok\1.16.8\lombok-1.16.8.jar" -Xbootclasspath/a:"C:\Users\Simeon\.m2\repository\org\projectlombok\lombok\1.16.8\lombok-1.16.8.jar"

1 Ответ

0 голосов
/ 30 октября 2018

Я попробовал это с последней версией Spring Tools 4 для Eclipse, и она, кажется, работает нормально.Вот что я сделал, и что я считаю важным:

  • сначала попробуйте использовать чистую командную строку и включите в нее опцию -vm.

Я попробовал это и оноработает отлично, запуская мой дистрибутив, используя указанный JDK:

open -a /sts4r/SpringToolSuite4.app --args -vm /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/java -data ~/Documents/workspace-from-command-line1/ -clean -showlocation -vmargs -Xmx1024m -XX:MaxPermSize=256m

Обратите внимание, что параметр -vm является первым сразу после --args, это важно,Я думаю.

  • Затем я завернул это в Apple Script, как вы сделали:

do shell script "open -a /sts4r/SpringToolSuite4.app --args -vm /Library/Java/JavaVirtualMachines/jdk-10.0.2.jdk/Contents/Home/bin/java -data ~/Documents/workspace-from-command-line1/ -clean -showlocation -vmargs -Xmx1024m -XX:MaxPermSize=256m"

Это тоже работает (попробовал вредактор сценариев).

Я бы порекомендовал запустить установку STS с использованием JDK 8 (но не JDK 10, который я здесь использовал).

Надеюсь, это поможет!

...