java 在 NetBeans 中丢失了 AbsoluteLayout

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/13020059/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 11:10:55  来源:igfitidea点击:

AbsoluteLayout lost in NetBeans

javanetbeansnetbeans-6.9absolutelayout

提问by RYN

I made a Java application with AbsoluteLayout using NetBeans on a Machine then I moved project data files to another machine, there I got Reference Problem message for some libraries including AbsoluteLayout library.
I fixed project libraries and removed AbsoluteLayout.jar from Project libaries and added it again using Netbeans's add library option.
Now in the Set Layoutmenu there is no AbsoluteLayout!! (For all projects!!)

我在一台机器上使用 NetBeans 制作了一个带有 AbsoluteLayout 的 Java 应用程序,然后我将项目数据文件移动到另一台机器,在那里我收到了一些库的参考问题消息,包括 AbsoluteLayout 库。
我修复了项目库并从项目库中删除了 AbsoluteLayout.jar,然后使用 Netbeans 的添加库选项再次添加了它。
现在Set Layout菜单里没有AbsoluteLayout!!(适用于所有项目!!)

How Can I add AbsoluteLayout to SetLayout menu of Netbeans again?

如何再次将 AbsoluteLayout 添加到 Netbeans 的 SetLayout 菜单?

Thanks

谢谢

采纳答案by madth3

A radical solution that solves many Netbeans problems (specially those related to the user configuration) is removing the user directory and letting Netbeans recreate it.

解决许多 Netbeans 问题(特别是与用户配置相关的问题)的根本解决方案是删除用户目录并让 Netbeans 重新创建它。

Before NB 7.2 this folder was located inside the HOME user directory (/home/useror C:\Users\user)

在 NB 7.2 之前,此文件夹位于 HOME 用户目录(/home/userC:\Users\user)内

回答by trashgod

As notedby @madth3, this is easy to do. AbsoluteLayoutis the first entry in the Librarydialog, where its classpath can become the target of a hurried click on Remove.

正如@madth3所指出的,这很容易做到。AbsoluteLayoutLibrary对话框中的第一个条目,它的类路径可以成为快速单击的目标Remove

As an alternative to this more radical solution, navigate to the library configuration directory.

作为这个更激进的解决方案的替代方案,导航到库配置目录。

cd config/org-netbeans-api-project-libraries/Libraries

There should be a recent file named absolutelayout.xmlcontaining the altered configuration.

应该有一个名为的最近文件absolutelayout.xml包含更改的配置。

$ ls
absolutelayout.xml

Remove the errant file and NetBeans will restore the original classpath on restart.

删除错误的文件,NetBeans 将在重新启动时恢复原始类路径。

rm absolutelayout.xml

For reference, the full path to the original on Mac OS X, NetBeans 8 is

作为参考,Mac OS X 上原始版本的完整路径,NetBeans 8 是

/Applications/NetBeans/NetBeans\ 8.0.app/Contents/Resources/NetBeans/platform/config/Modules/org-jdesktop-layout.xml

回答by Chetan Verma

I was facing the same issue as netbeans not allowing me to add in build AbsoluteLayout library. As an alternate solution I searched for this jar file and found it under the netbeans installation directory. In my case it was under following path-

我面临着与 netbeans 不允许我添加构建 AbsoluteLayout 库相同的问题。作为替代解决方案,我搜索了这个 jar 文件,并在 netbeans 安装目录下找到了它。就我而言,它是在以下路径下-

C:\Program Files\NetBeans 8.0.2\java\modules\ext

C:\Program Files\NetBeans 8.0.2\java\modules\ext

from here I put it into my lib structure and everything worked fine, hope this post can help others. Happy Coding!!!

从这里我把它放入我的 lib 结构中,一切正常,希望这篇文章可以帮助其他人。编码快乐!!!