Problem using internal directory

Hi guys, please someone can help me?
My question is really simple: I have a directory in my progect called testDir, and I’d like to use some files that must stay in this directory.
In java i use:
System.getProperty(“user.dir”)
But it seems not to work in knime because the result is wrong.
So i tried to use saveInternals to save the File parameter of this method (which i suppose represent the local directory) into a variabile. Is it right?
In any case, i used breakpoints to see the value of the variable
after the assignement, but i noticed that my plugin does not use saveInternals method. Do you know why? Someone can help me? This is for my thesis, so i thank anyone who can help me.

If you want to save the configuration of the node, use load/saveSettings. load/saveInternals will only be called when the node is executed.

Thanks for the answer, but i just want to know the current directory of my node. I tried to use  load/saveInternals to retrieve the current directory, but neither method was called by my plugin, even if i execute it. 

You should never rely in the current directory because it's completely undefined where this is. What exactly are you trying to achieve?

I'm working on Windows and I have a prog.exe in a directory of my plugin:

MyPlugin:
       -src
       -progDir
            -prog.exe

I just want to execute that prog.exe from my execute method. In java i simply write:
 

ProcessBuilder process = new ProcessBuilder(System.getProperty("user.dir") + File.separator + "progDir"+File.separator+"prog.exe");

process.start();

But it do not work in knime because "System.getProperty("user.dir")" (or

String current = new java.io.File( "." ).getCanonicalPath();

) do not return the right path.
Can you help me? 

Our class org.knime.ext.chem.openbabel.BabelActivator is a good example. The plug-in's activator looks for binaries bundled with the plug-in and assign the path to a global variable. If you install the sources for "KNIME Chemistry Add-Ons" you can browser the source code.

I do it right now, thanks!

I read the source code of that node, i wrote my own code and if I launch the plugin from inside eclipse all works fine. But if i export my plugin and put it in the "dropins" folder of KNIME, it do not works. (it launch a null pointer exception referred to the path of the binaries bundled with the plug-in). Do you know why? 

Or the binaries included in the build? See the "Build" tab of the plug-in's manifest.

BTW, using the dropins folder is discouraged. It's much better to create a feature and use the update manager to install extensions.