Deepin 15.4.1 JDK9 eclipse JEE 仅支持root用户启动,普通用户启动...
Tofloor
poster avatar
springxcs
deepin
2017-11-09 18:20
Author
求助大咖:
Deepin 15.4.1 JDK9 深度商店安装Eclipse IDE for Java EE Developers, 仅支持root用户启动,普通用户启动报错。
root用户是通过终端以命令方式启动,普通用户通过命令、图标都不能启动,eclipse.ini文件如下。
问题猜想:
  • JDK9设置问题,但是默认从深度安装,版本见eclipse.ini文件。
  • eclipse IDE的内部插件jar包的问题,不能启动的问题出现在对eclipse升级之后。
请哪位大侠帮忙解决一下问题,谢谢!

eclipse.ini文件内容:
-startup
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.550.v20170928-1359
-product
org.eclipse.epp.package.jee.product
-showsplash
org.eclipse.epp.package.common
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=9-Debian
-Dosgi.instance.area.default=@user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=9-Debian
-Xms256m
-Xmx1024m
--add-modules=ALL-SYSTEM



出错如下:
!ENTRY org.eclipse.e4.ui.workbench 4 0 2017-11-09 09:49:20.880
!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:496)

Reply Favorite View the author
All Replies
avatar
DebuggerX
deepin
2017-11-09 18:40
#1
分别把普通用户和root的java版本打出来看看
  1. java -version
  2. sudo java -version
Copy the Code
Reply View the author
avatar
springxcs
deepin
2017-11-09 18:47
#2
https://bbs.deepin.org/post/147883
分别把普通用户和root的java版本打出来看看

java -version
Picked up _JAVA_OPTIONS:   -Dawt.useSystemAAFontSettings=gasp
openjdk version "9-Debian"
OpenJDK Runtime Environment (build 9-Debian+0-9b179-2)
OpenJDK 64-Bit Server VM (build 9-Debian+0-9b179-2, mixed mode)

sudo java -version
openjdk version "9-Debian"
OpenJDK Runtime Environment (build 9-Debian+0-9b179-2)
OpenJDK 64-Bit Server VM (build 9-Debian+0-9b179-2, mixed mode)
Reply View the author
avatar
DebuggerX
deepin
2017-11-09 19:47
#3


按照你说的升级了openjdk9确实会有报错,但是添加了一样的配置参数之后我这边不管普通用户还是root都可以正常打开的。。。
没有做任何其他的操作,,并不知道你的问题出在哪里……
Reply View the author
avatar
springxcs
deepin
2017-11-09 21:36
#4
https://bbs.deepin.org/post/147883
按照你说的升级了openjdk9确实会有报错,但是添加了一样的配置参数之后我这边不管普通用户还是root都可以 ...

我是升级后报错的,能否把您的eclipse.ini文件内容给我看看?
Reply View the author
avatar
DebuggerX
deepin
2017-11-09 21:57
#5
https://bbs.deepin.org/post/147883
我是升级后报错的,能否把您的eclipse.ini文件内容给我看看?



只加了最后一行其他没动
Reply View the author
avatar
springxcs
deepin
2017-11-09 22:03
#6
https://bbs.deepin.org/post/147883
只加了最后一行其他没动

您的java版本没有改
Reply View the author
avatar
DebuggerX
deepin
2017-11-09 23:12
#7
https://bbs.deepin.org/post/147883
您的java版本没有改

那个没关系的。改成1.9或者9-Debian对我都没有任何影响。
那就是升级导致的资源包变化了……这个就没办法了,并不知道你升级了哪些东西,,eclipse的版本升级和插件安装体验实在是糟糕。。
早转idea早解脱~~
Reply View the author
avatar
zhongqian
deepin
2018-05-08 23:10
#8
楼主,我刚刚试了你的方案,我把eclipse-jee的文件夹权限设置成777后,加上你的配置可以运行了
Reply View the author