Define "not run as an executable". Crash? Error message? Stack trace? Who knows?
The problem is not the library. If it fails silently try running it from a command prompt by invoking "java -jar <MyJarName>.jar" so you can see the log.
Thank you agraham, for your response. I ran the jar from a command prompt and logged this error - java.lang.UnsatisfiedLinkError: no xFunction in java.library.path. The problem is with my setup, and not the library. I’m having a problem in placing xFunction.dll in the correct location.
Under Environment Variables, Windows shows my CLASSPATH as being - .;C:\Program Files\Java\jre7\lib\ext\QTJava.zip. (The leading period and semicolon are there for some reason that I don’t understand. I’ve tried using the CLASSPATH with and without these two leading characters.)
1. For my first try I placed xFunction.dll in - C:\Program Files\Java\jre7\lib\ext. This didn’t work, and I received the error - no xFunction in java.library.path, as a B4J error.
2. I then moved xFunction.dll to the bin folder of my Java path.- C:\Program Files\Java\jdk1.7.0_45\bin\javac.exe. I could then run and compile the project to a jar file, but that jar file failed silently on attempting to run.
3. I have now moved xFunction.dll to the Objects folder of my project and that works fine, except if you distribute your exe you must include xFunction.dll in the package. I need to know where to place xFunction.dll so that it is in my CLASSPATH.
I’ve done quite a bit of searching the Internet to try and resolve this issue. While I find a lot of technical info re Java, I haven’t found an explanation of where a dll of this nature should be placed. Does my CLASSPATH require further configuration to include a specific pointer to xFunction.dll? Any help to clarify this for me would be greatly appreciated.
Best regards