Jump to content
Excelsior Forums
Sign in to follow this  

Problem with xFunction + Netbeans 3.6

Recommended Posts


I trying to use xFunction 2.1.5 version with Netbeans 3.6 IDE. To use with Netbeans IDE, I should insert "package samples.win32.sampleXX;" in the beginning of each java source code. However, none of the samples are working apart from 'sample01'.

For example,  'sample00' gives below error,

> com.excelsior.xFunction.LibraryNotFoundException: Can't load library: 'sample0'.

>         at com.excelsior.xFunction.xFunction.<init>(xFunction.java:40)

>         at samples.win32.sample00.sample0.main(sample0.java:9)

> Exception in thread "main"

while 'sample02' gives below error.

> com.excelsior.xFunction.IllegalSignatureException: Class 'Point' not found

>         at com.excelsior.xFunction.ArgType.<init>(ArgType.java:169)

>         at com.excelsior.xFunction.ArgType.getArgType(ArgType.java:110)

>         at com.excelsior.xFunction.xFunction.parseSignature(xFunction.java:181)

>         at com.excelsior.xFunction.xFunction.<init>(xFunction.java:30)

>         at samples.win32.sample02.sample2.main(sample2.java:10)

> Exception in thread "main"

and so on...

All the structures created in each source code are not recognised as showed in 'sample02'.

I put the xFunction.dll in the system32 directory.

What should I do to fix this problem?

Thanks for your help.

Share this post

Link to post
Share on other sites

As far as package names go, it depends on which folder you mount. all package names are are folders. If you mount the sample02 directory, no changes are needed.

The "Can't load library: 'whatever'" simply means that the DLL cannot be found. The sample0 name is the name of the dll. And since you have to compile the sample0.c file into a dll using the build.bat, you don't even have it yet. You should install Microsoft Visual C++ so that you can compile the "c" files into DLL's from the command line. Notice the "cl -gf -df" or whatever in the build.bat file. This is a MS C++ executable (with a couple of arguments) that is being used to compile. Once the dll is compiled, place the DLL somewhere Windows can find it.  Such as your Windows/System32 directory or somewhere in your path. (Open a DOS prompt and type in "path" and you will see every dir in your path)

The other error you see is probably because your java file does not have the following in it for some reason:

class Point extends Structure{

   int y,z,x;

   public String defineLayout(){

     return "int x, int y";



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this