Programming in Java2 using Netbeans include libraries

Hello,

I'm using Netbeans to import a series of libraries from my Arduino IDE. I'm following directions from the following link:

This works provided I use the Arduino-0013 version of the IDE install, more current versions (0022) do not compile using this method! Which is something to do with Preferences.init() no longer existing.

I have found that using the Arudino-0013 set as the working directory is NOT necessary if I manually move the "preferences.txt" and "keywords.txt" and "librxtxSerial.so" files into the lib folder in my java dist (build) folder, and also move the entire Arduino-0013 "Hardware" folder also into my java dist (build) folder.

When I do this I can run the Java program from the dist directory on the command line. Using the command:

java -jar myProgram.jar

rather than having to go into the Arudino-0013 as my working directory and use -cp to get my program to work (which I haven't worked out how to do incidentally):

My Question:

Is there a way to include these .txt files and the Arudino hardware folder with all the files it contains when I build the project with Netbeans? The reason I ask is because its getting annoying having to do this manually every time I do a new build.

Sorry to BUMP but, it would be really handy if someone could help with this.

I've got Netbeans to work when using arduino 0013 libraries but not with 0022 because the libraries have changed and Preferences.init() no longer exists.

What is the new form of initializing preferences in the new 0022 library ?