I have been using the IBM OPL Java API library in Eclipse to run my OPL model and data file in Java. This has been working fine in Eclipse but now that I have compiled my program to an executable jar and try running it on Windows 7 command line I get an error. All my own code runs fine until the first line which contains an ilog.opl.IloOpl object, which is when I get the following error:
No version in manifest (not in a jar?), trying 1260
No version in manifest (not in a jar?), trying 1260
Native code library failed to load: ensure the appropriate library (opl1260.dll/.so) is in your path.
Exceptions:
no opl1260 in java.library.path
no opl_lang_wrap_cpp in java.library.path
no opl_core_wrap_cpp_java1260 in java.library.path
no opl_core_wrap_cpp in java.library.path
no cp_wrap_cpp_java1260 in java.library.path
no cp_wrap_cpp in java.library.path
no concert_wrap_cpp_java1260 in java.library.path
no concert_wrap_cpp in java.library.path
It might also be related to missing Microsoft Visual C++ Redistributable Package.
Exception in thread "main" java.lang.ExceptionInInitializerError
at ilog.concert.cppimpl.concert_wrap.setDebugWrappers(concert_wrap.java:18)
at ilog.opl.IloOplFactory.setDebugMode(IloOplFactory.java:156)
at Simulator.SimManager.solve(SimManager.java:422)
at Simulator.SimManager.runScaleTests(SimManager.java:133)
at Simulator.SimManager.main(SimManager.java:105)
Caused by: java.lang.RuntimeException: Native code library failed to load: ensure the appropriate library (opl1260.dll/.so) is in your path.
Exceptions:
no opl1260 in java.library.path
no opl_lang_wrap_cpp in java.library.path
no opl_core_wrap_cpp_java1260 in java.library.path
no opl_core_wrap_cpp in java.library.path
no cp_wrap_cpp_java1260 in java.library.path
no cp_wrap_cpp in java.library.path
no concert_wrap_cpp_java1260 in java.library.path
no concert_wrap_cpp in java.library.path
It might also be related to missing Microsoft Visual C++ Redistributable Package.
at ilog.concert.IloJNILoader.loadJNI(IloJNILoader.java:85)
at ilog.concert.cppimpl.concert_wrapJNI.<clinit>(concert_wrapJNI.java:15)
... 5 more
But the strange thing is... I have Studio 12.6.1, not 12.6.0. I am referencing the OPLall.jar file in C:\Program Files\IBM\ILOG\CPLEX_Studio1261\opl\lib and my PATH also includes this folder.
I tried googling and came across these related problems=
The difference is that in these problems the program seems to recognize the correct version. For some reason my program is looking for the wrong folder and wrong file (opl1260 does not exist, opl1261.dll is right there in the folder though).
The OPLall.jar (which I copied from the IBM folder) MANIFEST contains the following:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.7.0
Created-By: IBM Corporation
Specification-Title: IBM ILOG CPLEX OPTIMIZATION STUDIO Java API
Specification-Version: 12.6
Specification-Vendor: IBM
Implementation-Title: IBM ILOG CPLEX OPTIMIZATION STUDIO Java API
Implementation-Version: 12.6.1.0
Implementation-Vendor: IBM
Build-Date: 2014-11-18
Does anyone know how to resolve this issue?
EDIT: I have also reinstalled the Microsoft Visual C++ 2010 SP1 Redistributable Package (x64) since this was mentioned in the error log but this did not change the problem. I also tried reinstalling IBM Studio but again the same problem.