纯 NetBeans 不起作用

发布于 2024-08-12 08:18:38 字数 4139 浏览 5 评论 0原文

我的系统:ubuntu-9.04-amd64。我从官方默认存储库安装了 IDE NetBeans 6.5。一切正常。


但现在,我决定使用 ubuntu-9.10-desktop-amd64。

我用以下格式格式化了部分硬盘:(//usr)。 /home 仍然像以前一样。我已经正确安装了 ubuntu-9.10,正确(可能)安装了 IDE NetBeans 6.5。

但现在,我什至无法使用这个 IDE 创建最简单的 java 应用程序。 如果我使用 CommandLine 编译 java 类,则一切正常(~/javac someclass.java | java)。


如果我启动 IDE (NB 6.5),则文件 -> 新项目 ->此新项目已创建,但未编译:如果显示 put (F6) 错误:

java.lang.IllegalArgumentException: invalid flag: -g:
    at com.sun.tools.javac.api.JavacTool.processOptions(JavacTool.java:250)
    at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:221)
    at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:67)
    at org.netbeans.api.java.source.JavaSource.createJavacTask(Unknown Source)
    at org.netbeans.api.java.source.JavaSource.createJavacTask(Unknown Source)
    at org.netbeans.api.java.source.CompilationInfoImpl.getJavacTask(Unknown Source)
    at org.netbeans.api.java.source.CompilationInfo.getElements(Unknown Source)
    at org.netbeans.api.java.source.SourceUtils$5.run(Unknown Source)
    at org.netbeans.api.java.source.SourceUtils$5.run(Unknown Source)
    at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(Unknown Source)
    at org.netbeans.api.java.source.JavaSource.runUserActionTask(Unknown Source)
    at org.netbeans.api.java.source.SourceUtils.isMainClass(Unknown Source)
    at org.netbeans.modules.java.j2seproject.J2SEProjectUtil.isMainClass(Unknown Source)
    at org.netbeans.modules.java.j2seproject.J2SEActionProvider.isSetMainClass(Unknown Source)
    at org.netbeans.modules.java.j2seproject.J2SEActionProvider.getTargetNames(Unknown Source)
    at org.netbeans.modules.java.j2seproject.J2SEActionProvider$4.run(Unknown Source)
    at org.netbeans.api.java.source.ui.ScanDialog.runWhenScanFinished(Unknown Source)
    at org.netbeans.modules.java.j2seproject.J2SEActionProvider.invokeAction(Unknown Source)
    at org.netbeans.modules.project.ui.actions.MainProjectAction.actionPerformed(Unknown Source)
    at org.netbeans.modules.project.ui.actions.LookupSensitiveAction.actionPerformed(Unknown Source)
    at org.openide.windows.TopComponent.processKeyBinding(Unknown Source)
    at javax.swing.JComponent.processKeyBindings(JComponent.java:2897)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2814)
    at java.awt.Component.processEvent(Component.java:6040)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:704)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:969)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:841)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:668)
    at java.awt.Component.dispatchEventImpl(Component.java:4502)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Window.dispatchEventImpl(Window.java:2475)
    at java.awt.Component.dispatchEvent(Component.java:4460)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

我可以做什么来使用 IDE 编译最简单的应用程序。我必须完成我的工作,请帮助我。

I had system: ubuntu-9.04-amd64. I installed IDE NetBeans 6.5 from official default repositories. Everything worked correctly.


But now, I decided to use ubuntu-9.10-desktop-amd64.

I formated parts of my hard with: (/ and /usr). /home remains as before. I've correctly installed ubuntu-9.10, correctly (probably) installed IDE NetBeans 6.5.

But NOW, I even can't create simplest java application using this IDE.
If I use CommandLine to compile java classes, everything works (~/javac someclass.java | java).


If I launch IDE (NB 6.5), then File->New Project-> This New Project is created, but isn't compiled: if put (F6) error is shown:

java.lang.IllegalArgumentException: invalid flag: -g:
    at com.sun.tools.javac.api.JavacTool.processOptions(JavacTool.java:250)
    at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:221)
    at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:67)
    at org.netbeans.api.java.source.JavaSource.createJavacTask(Unknown Source)
    at org.netbeans.api.java.source.JavaSource.createJavacTask(Unknown Source)
    at org.netbeans.api.java.source.CompilationInfoImpl.getJavacTask(Unknown Source)
    at org.netbeans.api.java.source.CompilationInfo.getElements(Unknown Source)
    at org.netbeans.api.java.source.SourceUtils$5.run(Unknown Source)
    at org.netbeans.api.java.source.SourceUtils$5.run(Unknown Source)
    at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(Unknown Source)
    at org.netbeans.api.java.source.JavaSource.runUserActionTask(Unknown Source)
    at org.netbeans.api.java.source.SourceUtils.isMainClass(Unknown Source)
    at org.netbeans.modules.java.j2seproject.J2SEProjectUtil.isMainClass(Unknown Source)
    at org.netbeans.modules.java.j2seproject.J2SEActionProvider.isSetMainClass(Unknown Source)
    at org.netbeans.modules.java.j2seproject.J2SEActionProvider.getTargetNames(Unknown Source)
    at org.netbeans.modules.java.j2seproject.J2SEActionProvider$4.run(Unknown Source)
    at org.netbeans.api.java.source.ui.ScanDialog.runWhenScanFinished(Unknown Source)
    at org.netbeans.modules.java.j2seproject.J2SEActionProvider.invokeAction(Unknown Source)
    at org.netbeans.modules.project.ui.actions.MainProjectAction.actionPerformed(Unknown Source)
    at org.netbeans.modules.project.ui.actions.LookupSensitiveAction.actionPerformed(Unknown Source)
    at org.openide.windows.TopComponent.processKeyBinding(Unknown Source)
    at javax.swing.JComponent.processKeyBindings(JComponent.java:2897)
    at javax.swing.JComponent.processKeyEvent(JComponent.java:2814)
    at java.awt.Component.processEvent(Component.java:6040)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:704)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:969)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:841)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:668)
    at java.awt.Component.dispatchEventImpl(Component.java:4502)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Window.dispatchEventImpl(Window.java:2475)
    at java.awt.Component.dispatchEvent(Component.java:4460)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

What can I do to compile simplest application using IDE. I must make my work, please help me.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

超可爱的懒熊 2024-08-19 08:18:39

您的问题似乎与 https://bugs.launchpad.net 有关/ubuntu/+source/netbeans/+bug/401589

我的理解是,实际上有 2 个解决方案:

  • 安装 NetBeans 6.7 而不从 6.5 导入设置(这是我的建议)。
  • 将 libnb-javaparser-java 6.7-0ubuntu1 降级到 6.5-0ubuntu1。

Your problem looks to be related to https://bugs.launchpad.net/ubuntu/+source/netbeans/+bug/401589.

My understanding is that there are actually 2 solutions:

  • Install NetBeans 6.7 without importing the settings from 6.5 (this would be my recommendation).
  • Downgrade libnb-javaparser-java 6.7-0ubuntu1 to 6.5-0ubuntu1.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文