0

I'm trying to build the open source application found at: https://github.com/linklayer/cantact-app

I've installed netbeans and gotten to the point that I can create a new project. I got help doing this via Netbeans installed via APT opens but then closes, "java.lang.NoClassDefFoundError"

Now I'm still at a loss for how to set CLASSPATH in order to get the "ant build" command to work for cantact-app. When I look at ~/.netbeans/8.2/var/log/messages.log, I don't see an actual "CLASSPATH". Instead, I see a "Boot & Ext. Classpath", a "Application Classpath", and a "Startup Classpath". Well I took the value of "Application Classpath" and did an "export CLASSPATH=..." for that long path. Now, "ant build" still gets a "BUILD FAILED" with message "Cannot find NetBeans build harness. Check that nbplatform.default.netbeans.dest.dir and nbplatform.default.harness.dir are defined..."

1 Answers1

0

Synopsis

Netbeans have invalid values set for nbplatform.default.netbeans.dest.dir and nbplatform.default.harness.dir. You can change these values either globally or locally.

Global way

The default location for these nbplatform.default.netbeans.dest.dir and nbplatform.default.harness.dir are usually located in the file ~/.netbeans/8.2/build.properties

You can edit it with your favorite editor: gedit ~/.netbeans/8.2/build.properties

Scroll down to the last line and you should see nbplatform.default.netbeans.dest.dir and nbplatform.default.harness.dir keys. Change their values to this:

nbplatform.default.harness.dir=${nbplatform.default.netbeans.dest.dir}/harness
nbplatform.default.netbeans.dest.dir=/path/to/your/Netbeans/Folder/netbeans-8.2

Note: Write actual folder where your Netbeans is installed.

Save and exit.

Verify if the problem is solved.

Local way (Making own default declarations):

1) Go to your project file default declarations (I suppose project name is cantact-app-master):

cd /path/to/Project/Folder/cantact-app-master/nbproject/private/

Note: Write actual folder where your Project is located.

Save and exit.

2) There should be some file called platform-private.properties, edit it with your favorite editor, otherwise create it:

gedit platform-private.properties

3) If in previous step, in case you edited it, you might encounter a line starting with a key user.properties.file. Anyways, comment it or if it is blank, write this:

user.properties.file=cd /path/to/**Project/Folder**/cantact-app-master/nbproject/private/build.properties

Note 1: Write actual folder where your Project is located.

Note 2: You can indicate build.properties wherever you want, but I assume that this is destination of this file.

Save and exit.

4) Create build.properties where you pointed user.properties.file key:

gedit build.properties

5) Add these lines:

nbplatform.default.harness.dir=${nbplatform.default.netbeans.dest.dir}/harness
nbplatform.default.netbeans.dest.dir=/path/to/your/Netbeans/Folder/netbeans-8.2

Note: Write actual folder where your Netbeans is installed.

Save and exit.

Hope this helps...

Olimjon
  • 7,292
  • Thanks again, Olimjon. Unfortunately, nothing matches up right. For Global Way, I find four different "build.properties" files, and none of them have the text "dest.dir" in them. I can't post an image. So, from folder /usr/local/netbeans-8.2, I find files in ./harness/nbi/stub . Below there is a build.properties directly, and ./ext/engine/build.properties, and ext/infra/build/products/helloworld/build.properties, and ext/infra/build/engine/build.properties. To clarify, that last file mentioned is at /usr/loca/netbeans-8.2/harness/nbi/stub/ext/infra/build/engine/build.properties. – Dr.Lightning Nov 25 '18 at 13:59
  • When I try the Local Way, I also run into trouble. Project folder is ~/CANtact/cantact-app . I find folder nbproject, but no "private" folder. However, in nbproject, I do find platform.properties. However, it doesn't have a user.properties.file. It only has branding.token, cluster.path, disabled.modules, and nbplatform.active. – Dr.Lightning Nov 25 '18 at 14:04