简体   繁体   English

NetBeans Platform 6.7无法在Java 1.5上运行

[英]NetBeans Platform 6.7 does not run on Java 1.5

I have also posted this question on the netbeans forums - hoping for maximum exposure. 我也已经在netbeans论坛上发布了这个问题-希望获得最大的曝光率。

I am developing an application using NetBeans RELEASE67 and maven-nbm plugin. 我正在使用NetBeans RELEASE67和maven-nbm插件开发应用程序。 I use Java WebStart to deploy. 我使用Java WebStart进行部署。

My users have a mixture of java 1.6 and java 1.5 我的用户混合使用Java 1.6和Java 1.5

My java 1.5 users are unable to use the software; 我的Java 1.5用户无法使用该软件; on startup the software calls TopComponent.findInstance() and this results in 在启动时,软件将调用TopComponent.findInstance(),结果是

java.lang.NoClassDefFoundError: javax/swing/GroupLayout$Group

I can see that javax.swing.GroupLayout is new to java 1.6+, and am stumped that the basic TopComponent code is so tied to java 1.6. 我可以看到javax.swing.GroupLayout对Java 1.6+来说是新的,并且感到困惑的是,基本的TopComponent代码与Java 1.6紧密相关。

How can I get a NetBeans platform app to run under Java 1.5? 如何使NetBeans平台应用程序在Java 1.5下运行?

I will try to rewind to RELEASE65 in the hope this will solve the problem. 我将尝试倒带至RELEASE65,希望这可以解决问题。 Any suggestions? 有什么建议么?

Thanks alot. 非常感谢。

Are you including swing-layout.jar in your deployment? 您是否在部署中包括swing-layout.jar? You'll need that for running on pre-Java 6 platforms. 您需要在Java 6之前的平台上运行。

Apologies for the slow response. 抱歉,响应缓慢。

My problem was that I was running the IDE under Java 6, and Matisse had created all the layouts using the java6 only class javax.swing.GroupLayout. 我的问题是我在Java 6下运行IDE,而Matisse使用仅Java6类javax.swing.GroupLayout创建了所有布局。

I didn't notice the problem until I had to run the software on the minoritiy of my clients who are stuck on Java 1.5 在我不得不坚持使用Java 1.5的少数客户中运行该软件之前,我没有注意到问题。

This is easily fixed using the following procedure 使用以下步骤可以轻松解决此问题

  • Open the TopComponent in the 'Inspector' window 在“检查器”窗口中打开TopComponent
  • Right-click on the root node (Form TopComponent). 右键单击根节点(Form TopComponent)。 Select the 'Properties Windo 选择“属性窗口”
  • In the properties window there is a line about 'Layout Generation Style'. 在属性窗口中,有一行关于“布局生成样式”。 The choice is between 选择之间
    • Standard Java 6 Code 标准Java 6代码
    • Swing Layout Extensions Library Swing布局扩展库
  • Select the latter option. 选择后一个选项。
  • Rebuild 重建

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM