Results 1 to 4 of 4
Thread: FSUIPC JAVA SDK
-
06-18-2011, 07:20 AM #1
- Join Date
- Jun 2008
- Location
- Stafford, UK
- Posts
- 161
FSUIPC JAVA SDK
Hello all.
I am trying to get to grips with the FSUIPC JAVA SDK. Has anyone used this before? The test program compiles OK in Netbeans but always says that FS cannot be found. I have installed a registered copy of FSUIPC.
Can anyone offer a bit of help to get me talking to FSUIPC from Java?
Thanks.
Tom.
-
08-05-2011, 12:55 AM #2
- Join Date
- Jan 2008
- Location
- Sydney, Australia
- Posts
- 29
Re: FSUIPC JAVA SDK
No source code at all???
I haven't looked at FSUIPC JDK, but I am a Java Developer.
Where does your code fail? Is it on the call to FsuipcWrapper.open()? Those methods are native so native code should be loaded somewhere.
I haven't used native methods, but is it possible it fails to load the native library for example?
How do you run your app, is it from the IDE? If so are you sure the classpath, etc are set correctly?
I'd suggest starting simple with javac <class> to compile and java <class> to run and see what happens.
-
08-18-2011, 09:25 AM #3
- Join Date
- Jun 2008
- Location
- Stafford, UK
- Posts
- 161
Re: FSUIPC JAVA SDK
Hi aVaTar.
The test program I was refering to was the one included in the SDK so I was assuming it should be functioning OK and that there was a fault in my Netbeans setup (there was). I had given up and attempted to use C++ but your post prompted me to go back and take a second look.
I have now managed to setup Netbeans correctly and the SDK does work.
I have, however, written my own Java SDK using the original SDK as a rough guide. The original's method of interfacing with FSUIPC was very inefficient. For each offset it was doing a call to FS whereas my C++ experience of FSUIPC had taught me that you should tell FSUIPC all the offsets you want retrieved and then do a single call to FS to minimise the overhead. This was understandable because the original Java SDK uses JNI to contact a DLL which is stateless (or so I think) which means that any number of requested offsets were 'forgotten' when you came to do the call to FS.
My version of the SDK lists all the offsets I need for my project and then calls them in one JNI DLL call and then passes all the results back to Java. This is significantly faster. Ideally I would like to pass a list of required offsets to the SDK and retrieve only those I need at that time in my program, but I am under the impression that any additional offsets requested doesnt add much to the time taken to retrieve the call from FS, so im not inclined to complicate my code for such a small performance increase.
I am yet to write out to FS in this way but it should be just as simple.
If you (or anyone else) would like details of how to setup Netbeans 7.0 (i believe it should work for version 6 onwards) I can provide details of how I did it.
If anyone requires details of how to create your own Java SDK for FSUIPC I may be able to help you but I used Visual C .Net and Im not sure if any of the free C++ compilers of development environments such as Netbeans support the creation of DLLs. I will always try though.
Tom.
-
01-14-2013, 02:36 AM #4
- Join Date
- Jan 2013
- Location
- Spain
- Posts
- 1
Re: FSUIPC JAVA SDK
Hi,
I'm interested in details of how to create a Java SDK for FSUIPC.
Thank you.
Pretty Girls from your city for night
New Version of UPDNAV for Jeehell...