I am looking to write and application using an SDK from Canon for remote control access of a Canon digital camera. SDK libraries are written in C and requires Visual C++ on XP, as the development environment. However, I would like develop this application in Java using JNI. I don't have any experience in doing any of this. I do know a little bit of core Java. Even though the Canon documentation calls for a VC++ environment to develop is it possible to use Java/JNI?
JNI is just a way of calling native code from Java programs. So you would have to write your program in C first and foremorst. After that you could create a Java application which calls these methods using JNI.
C++ is not standardized like the tightly regulated Java specification, where Sun and Sun alone says what goes into the API. Often what compiles under one compiler, say gcc, will not compile under another compiler, say Microsoft C++, without extensive porting. The Canon SDK may be using features available only to the Microsoft compiler, or they haven't tested it with other compilers and don't want to support anything else. Even if you want to work with the SDK through JNI, you will need the Microsoft compiler to create the DLL's that JNI will use to interact with native code. Lucky for us, Microsoft has a version of Visual C++ for a "free" download. I say "free" because you have to have a .NET Passport account (i.e. hotmail account).