从命令行启动eclipse时出错

时间:2015-02-16 13:21:23

标签: java eclipse command-line ubuntu-12.04

我正在尝试从我的ubuntu终端启动eclipse,指定工作区以告诉运行哪个配置,如下所示,

 /usr/lib/jvm/java-7-oracle/bin/java -Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m -Declipse.pde.launch=true -Dfile.encoding=UTF-8 -classpath /opt/codegenerator/eclipse/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar org.eclipse.equinox.launcher.Main -launcher /opt/codegenerator/eclipse/eclipse -name Eclipse -showsplash 600 -product org.talend.rcp.branding.tos.product -data /opt/codegenerator/workspace/../runtime-New_configuration -configuration file:/opt/codegenerator/workspace/.metadata/.plugins/org.eclipse.pde.core/New_configuration/ -dev file:/opt/codegenerator/workspace/.metadata/.plugins/org.eclipse.pde.core/New_configuration/dev.properties -os linux -ws gtk -arch x86 -nl en_US -consoleLog --disableLoginDialog

我的日食,工作空间和项目位于路径/ opt / codegenerator

当我运行上述命令时,它说,

 An error has occurred.  See the log file
                  /opt/codegenerator/workspace/.metadata/.plugins/org.eclipse.pde.core/New_configuration/1424067384274.log

当我打开它包含的日志文件时,

!SESSION Sun Feb 15 22:16:24 PST 2015 ------------------------------------------
!ENTRY org.eclipse.equinox.launcher 4 0 2015-02-15 22:16:24.303
!MESSAGE Exception launching the Eclipse Platform:
!STACK
java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619)
        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)

这有什么问题?如何解决这个问题?

更新: 我删除了java命令,只使用了eclipse可执行文件,如下所示,

 /opt/codegenerator/eclipse_indigo/eclipse -name Eclipse -showsplash 600 -product org.talend.rcp.branding.tos.product -data /opt/codegenerator/workspace/../runtime-New_configuration -configuration file:/opt/codegenerator/workspace/.metadata/.plugins/org.eclipse.pde.core/New_configuration/ -dev file:/opt/codegenerator/workspace/.metadata/.plugins/org.eclipse.pde.core/New_configuration/dev.properties -os linux -ws gtk -arch x86 -nl en_US -consoleLog --disableLoginDialog  

但是我收到了以下错误,

   (Eclipse:26345): GLib-GObject-WARNING **: invalid (NULL) pointer instance

              (Eclipse:26345): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed

              (Eclipse:26345): Gtk-CRITICAL **: IA__gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed

              (Eclipse:26345): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed

              (Eclipse:26345): Gtk-CRITICAL **: IA__gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed

              (Eclipse:26345): GLib-GObject-CRITICAL **: g_object_get: assertion `G_IS_OBJECT (object)' failed

              (Eclipse:26345): Gtk-WARNING **: Screen for GtkWindow not set; you must always set
              a screen for a GtkWindow before using the window

              (Eclipse:26345): Gdk-CRITICAL **: IA__gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_context_set_font_description: assertion `context != NULL' failed

              ** (Eclipse:26345): WARNING **: Command line `dbus-launch --autolaunch=749624fde5d2fd739ce5414400000003 --binary-syntax --close-stderr' exited with non-zero exit status 1: Autolaunch error: X11 initialization failed.\n

              (Eclipse:26345): Pango-CRITICAL **: pango_context_set_base_dir: assertion `context != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_context_set_language: assertion `context != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_new: assertion `context != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_set_text: assertion `layout != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_set_attributes: assertion `layout != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_set_alignment: assertion `layout != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_set_ellipsize: assertion `PANGO_IS_LAYOUT (layout)' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_set_single_paragraph_mode: assertion `PANGO_IS_LAYOUT (layout)' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_set_width: assertion `layout != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_get_extents: assertion `layout != NULL' failed

              (Eclipse:26345): Gtk-CRITICAL **: IA__gtk_icon_theme_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed

              (Eclipse:26345): Gtk-CRITICAL **: IA__gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed

              (Eclipse:26345): Gtk-CRITICAL **: IA__gtk_icon_size_lookup_for_settings: assertion `GTK_IS_SETTINGS (settings)' failed

              (Eclipse:26345): Gtk-WARNING **: Invalid icon size 6


              (Eclipse:26345): Gtk-CRITICAL **: IA__gtk_icon_theme_load_icon: assertion `GTK_IS_ICON_THEME (icon_theme)' failed

              (Eclipse:26345): Gtk-WARNING **: Error loading theme icon 'dialog-error' for stock: 

              (Eclipse:26345): Gtk-CRITICAL **: IA__gtk_icon_size_lookup_for_settings: assertion `GTK_IS_SETTINGS (settings)' failed

              (Eclipse:26345): Gtk-WARNING **: /build/buildd/gtk+2.0-2.24.10/gtk/gtkstyle.c:2358: invalid icon size '6'

              (Eclipse:26345): Gtk-CRITICAL **: IA__gtk_style_render_icon: assertion `pixbuf != NULL' failed

              (Eclipse:26345): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed

              (Eclipse:26345): Gdk-CRITICAL **: IA__gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_context_set_font_description: assertion `context != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_context_set_base_dir: assertion `context != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_context_set_language: assertion `context != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_new: assertion `context != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_set_text: assertion `layout != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_set_alignment: assertion `layout != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_set_ellipsize: assertion `PANGO_IS_LAYOUT (layout)' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_set_single_paragraph_mode: assertion `PANGO_IS_LAYOUT (layout)' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_set_wrap: assertion `PANGO_IS_LAYOUT (layout)' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_set_width: assertion `layout != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_get_extents: assertion `layout != NULL' failed

              (Eclipse:26345): Gdk-CRITICAL **: IA__gdk_pango_context_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_context_set_font_description: assertion `context != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_context_set_base_dir: assertion `context != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_context_set_language: assertion `context != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_new: assertion `context != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_set_text: assertion `layout != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_get_extents: assertion `layout != NULL' failed

              (Eclipse:26345): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

              (Eclipse:26345): Gdk-CRITICAL **: IA__gdk_screen_get_width: assertion `GDK_IS_SCREEN (screen)' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_set_width: assertion `layout != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_get_extents: assertion `layout != NULL' failed

              (Eclipse:26345): Pango-CRITICAL **: pango_layout_get_line_count: assertion `layout != NULL' failed
              Aborted (core dumped)

              #
              # A fatal error has been detected by the Java Runtime Environment:
              #
              #  SIGFPE (0x8) at pc=0x8344a56a, pid=26345, tid=3076044480
              #
              # JRE version: Java(TM) SE Runtime Environment (7.0_76-b13) (build 1.7.0_76-b13)
              # Java VM: Java HotSpot(TM) Client VM (24.76-b04 mixed mode linux-x86 )
              # Problematic frame:
              # C  [libgtk-x11-2.0.so.0+0x12a56a]  gtk_label_get_angle+0x40a
              #
              # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
              #
              # An error report file with more information is saved as:
              # /root/hs_err_pid26345.log
              #
              # If you would like to submit a bug report, please visit:
              #   http://bugreport.java.com/bugreport/crash.jsp
              # The crash happened outside the Java Virtual Machine in native code.
              # See problematic frame for where to report the bug.
              #

1 个答案:

答案 0 :(得分:0)

尝试使用包含的eclipse可执行文件启动eclipse: 该命令应如下所示:

/opt/codegenerator/eclipse/eclipse -data /opt/codegenerator/workspace/