java eclipse fail to load - java

Ive just installed eclipse and when i try to open it it fails.
Would really appreciate it if anyone could help me with whats gone wrong/ how to fix it.
this is the log:
!SESSION 2013-01-17 16:18:49.511 -----------------------------------------------
eclipse.buildId=I20110613-1736
java.version=1.7.0_11
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_NZ
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.osgi 4 0 2013-01-17 16:18:50.613
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-gtk-3740 in java.library.path
no swt-gtk in java.library.path
Can't load library: /home/calum/.swt/lib/linux/x86_64/libswt-gtk-3740.so
Can't load library: /home/calum/.swt/lib/linux/x86_64/libswt-gtk.so
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:285)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:132)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:695)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:153)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:95)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:>79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

Try these steps.
If you are using debian based os, use
sudo apt-get install eclipse-platform
It's maintained. Else download the IDE for linux from here.
Install OpenJDK not oracle java 7.
sudo apt-get install openjdk-7-jdk
If you need to use oracle jdk, see this article. It's working for me in Ubuntu 12.10

Try this:
ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/

Related

Eclipse will not run correctly and stops suddenly

Newly, I've installed an application named Afra (https://rebeca-lang.org/alltools/Afra) which it seems have been developed based on Eclipse. When I'm going to run it won't start and errors below appear in the log file :
(for more information, I use a 64-bit version of windows 10 plus java 10)
!SESSION 2020-09-22 21:29:21.395 -----------------------------------------------
eclipse.buildId=unknown
java.version=10.0.2
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -clearPersistedState
Command-line arguments: -os win32 -ws win32 -arch x86_64 -clearPersistedState
!ENTRY org.eclipse.osgi 4 0 2020-09-22 21:29:22.797
!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.rebecalang.afra.ideplugin.Application.start(Application.java:20)
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(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
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)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
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)
... 23 more
This looks very much like Afra is based on an older Eclipse platform, and it is caused by using Java 10 instead of Java 8 to run it.
You can do one of the following:
Add Java 8 (64-bit) to the Afra installation, e.g. by download this ZIP file, create the subfolder jre in the Afra installation directory and extract the ZIP into it, so that <Afra-installation-dir>\jre\bin\java.exe exists
Install Java 8 (64-bit) into your system and make sure that Afra runs with it, e.g. by download a Java 8 (64-bit) JDK or JRE from e.g. AdoptOpenJDK.net, install it and in the case it is not used to run Afra, edit the *.ini file of Afra

Could not load SWT library in Eclipse in Mac

When I tried to run a plug-in project as Eclipse Application, I get following error.
eclipse.buildId=unknown
java.version=1.8.0_152
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.platform.ide
Command-line arguments: -product org.eclipse.platform.ide -data /{HOME}/eclipse-workspace/../runtime-New_configuration -dev file:/{HOME}/eclipse-workspace/.metadata/.plugins/org.eclipse.pde.core/New_configuration/dev.properties -os win32 -ws win32 -arc$
!ENTRY org.eclipse.osgi 4 0 2017-12-07 23:43:27.145
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-win32-4530 in java.library.path
no swt-win32 in java.library.path
Can't load library: /{HOME}/.swt/lib/macosx/x86_64/libswt-win32-4530.jnilib
Can't load library: /{HOME}/.swt/lib/macosx/x86_64/libswt-win32.jnilib
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:327)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:236)
at org.eclipse.swt.internal.C.<clinit>(C.java:16)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:138)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:774)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:162)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:169)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:111)
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:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
Then, I found out that the folder "/{HOME}/.swt/lib/macosx/x86_64" acctually is empty. I guess this is the reason, but I do not know how to reinstall SWT(I have googled a while though)
Eclipse Version: Oxygen.1a Release (4.7.1a) (64-bit)
Java Version:
java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)
Mac Version: 10.12 (64-bit)
The command line arguments:
-os win32 -ws win32
show that you are trying to run this as a Windows application - which isn't going to work on macOS
Check that the Arguments tab of the Run Configuration has something like:
-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
in the program arguments and that the 'Environment' section of your current Target Platform is blank or specifies macOS.

NetBeans fails to start from either terminal or GUI in Kali Linux

When I installed NetBeans and ran it for the first time, it told me that NetBeans cannot run on the default openJDK on Kali Linux. So I downloaded and installed JDK32bit from Oracle, and since then it has failed to start. However, when I ran it in the terminal I got this stacktrace. So I thought maybe NetBeans 64bit cannot run on 32bit JDK, so I installed 64bit JDK also, but I am still getting the same problems.
java.net.UnknownHostException: localhost.localdomain: localhost.localdomain: System error
at java.net.InetAddress.getLocalHost(InetAddress.java:1505)
at org.netbeans.CLIHandler$2.run(CLIHandler.java:667)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
Caused by: java.net.UnknownHostException: localhost.localdomain: System error
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323)
at java.net.InetAddress.getLocalHost(InetAddress.java:1500)
... 5 more
I just discovered the same applies to Eclipse also, it fails to start and this is the log report:
!SESSION 2017-10-02 23:35:37.652 -----------------------------------------------
eclipse.buildId=4.7.0.I20170612-0950
java.version=1.8.0_144
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_NG
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os linux -ws gtk -arch x86 -product org.eclipse.epp.package.jee.product
!ENTRY org.eclipse.osgi 4 0 2017-10-02 23:35:55.129
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
/home/MW/eclipse/configuration/org.eclipse.osgi/781/0/.cp/libswt-pi3-gtk-4757.so: libgtk-3.so.0: cannot open shared object file: No such file or directory
no swt-pi3-gtk in java.library.path
/home/MW/.swt/lib/linux/x86/libswt-pi3-gtk-4757.so: libgtk-3.so.0: cannot open shared object file: No such file or directory
Can't load library: /home/MW/.swt/lib/linux/x86/libswt-pi3-gtk.so
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:327)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:236)
at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:58)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:124)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:80)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:140)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:765)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:160)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:181)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
!ENTRY com.genuitec.eclipse.theming.core 4 0 2017-10-02 23:35:55.414
!MESSAGE <null>
!STACK 0
Unexpected token RIGHT SQUARE(]) at position 0.
at org.json.simple.parser.JSONParser.parse(JSONParser.java:257)
at org.json.simple.parser.JSONParser.parse(JSONParser.java:92)
at com.genuitec.eclipse.theming.core.services.ImageReplacementService.loadUnknownImages(ImageReplacementService.java:91)
at com.genuitec.eclipse.theming.core.services.ImageReplacementService.<init>(ImageReplacementService.java:74)
at com.genuitec.eclipse.theming.core.services.ImageReplacementService.<clinit>(ImageReplacementService.java:38)
at com.genuitec.eclipse.theming.core.ThemingCorePlugin.stop(ThemingCorePlugin.java:77)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:835)
at org.eclipse.osgi.internal.framework.BundleContextImpl$4.run(BundleContextImpl.java:1)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.internal.framework.BundleContextImpl.stop(BundleContextImpl.java:828)
at org.eclipse.osgi.internal.framework.EquinoxBundle.stopWorker0(EquinoxBundle.java:947)
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.stopWorker(EquinoxBundle.java:314)
at org.eclipse.osgi.container.Module.doStop(Module.java:636)
at org.eclipse.osgi.container.Module.stop(Module.java:498)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1669)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1588)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147)
at org.eclipse.osgi.container.Module.doStop(Module.java:636)
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.lang.Thread.run(Thread.java:748)

how to apply Eclipse Java code style formatter

I try to apply eclipse google style formatter to existing codes, but failed. I am using eclipse luna, Java 8 and windows 8.
I import eclipse Google Java style templates. I enabled the project specific settings. However when i try to follow /0/ using command window and invoke command /1/. I got error /3/. I try to add /2/ into my copied file: com.google.gdt.eclipse.suite.prefs. It show same error.
Any hints? Or shall I use other tool, such as Jalopy or JIndent?
/0/
http://www.peterfriese.de/formatting-your-code-using-the-eclipse-code-formatter/
/1/
C:\eclipse_luna_nemuNew_gwt_gradle_scala\eclipse\eclipse.exe -vm "C:\Program Files\Java\jdk1.8.0_40\bin\java.exe" -application **org.eclipse.jdt.core.JavaCodeFormatter** -verbose -config C:\sjj\GeneralTest\lib\org.eclipse.jdt.core.prefs C:\sjj\GeneralTest\src\main\java\com\callstats\general\exer\jackson\*.java
/2/
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.source=1.5
/3/
!SESSION 2015-10-20 19:20:52.563 -----------------------------------------------
eclipse.buildId=4.4.2.M20150204-1700
java.version=1.8.0_40
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.standard.product -application **org.eclipse.jdt.core.JavaCodeFormatter** -verbose -config C:\sjj\GeneralTest\lib\org.eclipse.jdt.core.prefs C:\sjj\GeneralTest\src\main\java\com\callstats\general\exer\jackson\ConInfo.java C:\sjj\GeneralTest\src\main\java\com\callstats\general\exer\jackson\JacksonExample.java C:\sjj\GeneralTest\src\main\java\com\callstats\general\exer\jackson\JSONUtil.java C:\sjj\GeneralTest\src\main\java\com\callstats\general\exer\jackson\User.java
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.standard.product -application **org.eclipse.jdt.core.JavaCodeFormatter** -verbose -config C:\sjj\GeneralTest\lib\org.eclipse.jdt.core.prefs C:\sjj\GeneralTest\src\main\java\com\callstats\general\exer\jackson\ConInfo.java C:\sjj\GeneralTest\src\main\java\com\callstats\general\exer\jackson\JacksonExample.java C:\sjj\GeneralTest\src\main\java\com\callstats\general\exer\jackson\JSONUtil.java C:\sjj\GeneralTest\src\main\java\com\callstats\general\exer\jackson\User.java
!ENTRY org.eclipse.osgi 4 0 2015-10-20 19:20:54.784
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: Application "**org.eclipse.jdt.core.JavaCodeFormatter**" could not be found in the registry. The applications available are: org.eclipse.ant.core.antRunner, org.eclipse.ant.ui.antRunner, org.eclipse.e4.ui.workbench.swt.E4Application, org.eclipse.e4.ui.workbench.swt.GenTopic, org.eclipse.equinox.app.error, org.eclipse.equinox.p2.director, org.eclipse.equinox.p2.garbagecollector.application, org.eclipse.equinox.p2.publisher.InstallPublisher, org.eclipse.equinox.p2.publisher.EclipseGenerator, org.eclipse.equinox.p2.publisher.ProductPublisher, org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher, org.eclipse.equinox.p2.reconciler.application, org.eclipse.equinox.p2.repository.repo2runnable, org.eclipse.equinox.p2.repository.metadataverifier, org.eclipse.equinox.p2.artifact.repository.mirrorApplication, org.eclipse.equinox.p2.metadata.repository.mirrorApplication, org.eclipse.equinox.p2.updatesite.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.CategoryPublisher, org.eclipse.help.base.infocenterApplication, org.eclipse.help.base.helpApplication, org.eclipse.help.base.indexTool, org.eclipse.jdt.apt.core.aptBuild, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer, org.eclipse.pde.build.Build, org.eclipse.pde.junit.runtime.uitestapplication, org.eclipse.pde.junit.runtime.legacytestapplication, org.eclipse.pde.junit.runtime.coretestapplication, org.eclipse.pde.junit.runtime.coretestapplicationnonmain, org.eclipse.pde.junit.runtime.nonuithreadtestapplication, org.eclipse.ui.ide.workbench, com.google.gwt.eclipse.core.GWTCodeFormatterApplication, org.eclipse.emf.codegen.CodeGen, org.eclipse.emf.codegen.JMerger, org.eclipse.wst.jsdt.core.JavaCodeFormatter.
at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:248)
at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
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:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
Updated
#Sean Patrick Floyd, #Michael: You two are awesome.
Your suggestion is correct. And I notice there is no org.eclipse.jdt.core.prefs in Eclipse Luna version, instead there is: com.google.gdt.eclipse.suite.prefs.
Inside of file com.google.gdt.eclipse.suite.prefs, there is two lines /5/.
Right now, in each file, when I try ctr+shift+f, I got existing file formatted.
When I try /4/, the code style sounds like Eclipse default code style. Why could not I apply google style to existing java files?
/4/
C:\eclipse_luna_nemuNew_gwt_gradle_scala\eclipse\eclipse.exe -vm "C:\Program Files\Java\jdk1.8.0_40\bin\java.exe" -application org.eclipse.jdt.core.JavaCodeFormatter -verbose -config C:\sjj\GeneralTest\lib\com.google.gdt.eclipse.suite.prefs C:\sjj\GeneralTest\src\main\java\com\callstats\general\exer\jackson\*.java
/5/
eclipse.preferences.version=1
id=1433316730347

how to solve this eclipse launch error?

I tried couple of answer to fix eclipse start-up problem.
I tried
eclipse.exe -clean didn't work.
eclipse.exe -clean -data C:\prectice\java\ didn't work
eclipse.exe -clean --lanuncher.ini elipse.ini didn't work.
Here is the error:-
An error has occurred. See the log file
C:\app\eclipse\configuration\1361558300022.log.
I have no clue how to launch eclipse. Please just me how can I fix it. Thanks in advnace!
Log file content:
!SESSION 2013-02-22 20:39:37.176 -----------------------------------------------
eclipse.buildId=v21.1.0-569685
java.version=1.7.0_15
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: -product com.android.ide.eclipse.adt.package.product
Command-line arguments: -os win32 -ws win32 -arch x86 -product com.android.ide.eclipse.adt.package.product
!ENTRY org.eclipse.osgi 4 0 2013-02-22 20:39:39.898
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: com/mercury/javashared/agentloader/AgentBootstrap
at org.eclipse.swt.widgets.Display.<init>(Display.java:480)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:716)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:161)
at org.eclipse.ui.internal.ide.application.IDEApplication.createDisplay(IDEApplication.java:154)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:96)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
Caused by: java.lang.ClassNotFoundException: com.mercury.javashared.agentloader.AgentBootstrap
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 17 more
Clear these environment variables; the QTP brings them:
JAVA_OPTIONS:
-Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes;C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar
IBM_JAVA_OPTIONS:
-Xrunjvmhook -Xbootclasspath/a:C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes;C:\PROGRA~2\HP\QUICKT~1\bin\JAVA_S~1\classes\jasmine.jar
JAVA_TOOL_OPTIONS:
-agentlib:jvmhook
This is also solved by creating a bat file for and blanking out the environment variables prior to launching the application, see the link for solution.
Source: https://stackoverflow.com/a/24685843/6345724
Thanks a lot to addie. You give me the clue about QTP. Actually I had QTP. It was ok together with QTP. But when I tried to uninstall qtp, it was not successful and left some file. So I find all files that comes with qtp and delete them manually. After removing all files, eclipse start normally.

Categories

Resources