Tuesday, September 04, 2018

Building a NetBeans java project without installing NetBeans

NetBeans projects that use the Layout class require swing-layout.jar, otherwise you will get the error message "package org.jdesktop.layout does not exist". To build a NetBeans project on a computer without installing NetBeans, you have to copy the swing-layout.jar and add the following to project.properties:
file.references.swing-layout.jar = <path of jar>
java.classpath =
    ${libs.swing-layout.classpath}:\
    ${file.reference.swing-layout.jar}

Also make sure that there are no trailing spaces, especially in the java.classpath section. And finally keep the build-impl.xml file.

No comments: