Topic
  • 7 replies
  • Latest Post - ‏2013-07-13T09:25:54Z by Olivier OUDOT
Mintch Zulitch
Mintch Zulitch
5 Posts

Pinned topic Problem in Runnable jar deployment

‏2013-07-08T17:06:25Z | cplex dll eclipse jar java standalone

Hi,

I have coded a mathematical problem in Eclipse using cplex & concert plugins. The project consists of two classes namely "jFrame" which is responsible for GUI invoking main method of "MP" class. Also, the math problem has been coded in "MP" class. When I run the problem in Eclipse environment, everything is OK. but when I export the project into a runnable jar, the GUI appears but when I'm pushing the button nothing happens.

I think the problem is linkage between "cplex.jar" and "cplex125.dll". In other words,  dependency of standalone file is being ignored by the Eclipse export after deployment. AND I don't know how to fix this problem.

  • Olivier OUDOT
    Olivier OUDOT
    5 Posts
    ACCEPTED ANSWER

    Re: Problem in Runnable jar deployment

    ‏2013-07-09T10:11:46Z  

    Hi Mintch,

    To run a model written in Java in a standalone, you need the following three files:

    • cplex125.dll
    • ILOG.CP.jar
    • cp_wrap_cpp_java125.dll

    You must ensure your system path gives access to these files, or copy these files into the directory where your own application resides.

    Hope this helps.

  • Olivier OUDOT
    Olivier OUDOT
    5 Posts

    Re: Problem in Runnable jar deployment

    ‏2013-07-09T10:11:46Z  

    Hi Mintch,

    To run a model written in Java in a standalone, you need the following three files:

    • cplex125.dll
    • ILOG.CP.jar
    • cp_wrap_cpp_java125.dll

    You must ensure your system path gives access to these files, or copy these files into the directory where your own application resides.

    Hope this helps.

  • Mintch Zulitch
    Mintch Zulitch
    5 Posts

    Re: Problem in Runnable jar deployment

    ‏2013-07-10T15:30:08Z  

    Thanx Oliver,

    But I've already tried them out. I didn't work. Experts says that these files should be warped up by ANT system, but I don't know how to do this.

  • Olivier OUDOT
    Olivier OUDOT
    5 Posts

    Re: Problem in Runnable jar deployment

    ‏2013-07-11T16:01:07Z  

    Thanx Oliver,

    But I've already tried them out. I didn't work. Experts says that these files should be warped up by ANT system, but I don't know how to do this.

    Hi Mintch,

    I suspect (tell me if I'm wrong) that your problem concerns more the way than Eclipse exports your project than a problem with the solver itself. By the way, when you write "Experts says", who are you talking about ?

    I suggest you to try first to group manually these files at the same place (with your own jar file), set the PATH on this directory and run your code. If it works, then you need to consult Eclipse/ANT documentation to properly export your application. 

    Come back to me if it is not the case.

  • Mintch Zulitch
    Mintch Zulitch
    5 Posts

    Re: Problem in Runnable jar deployment

    ‏2013-07-12T05:29:34Z  

    Hi Mintch,

    I suspect (tell me if I'm wrong) that your problem concerns more the way than Eclipse exports your project than a problem with the solver itself. By the way, when you write "Experts says", who are you talking about ?

    I suggest you to try first to group manually these files at the same place (with your own jar file), set the PATH on this directory and run your code. If it works, then you need to consult Eclipse/ANT documentation to properly export your application. 

    Come back to me if it is not the case.

    My dear, There is no need for manually grouping files or else. I's working fine when program(eclipse) is on. My problem is in exporting a  project(as I described its structure) into a runnable jar which can be executable in any computer without any installed IBM Ilog cplex program. The problem is the same when I model my project in NETBEANS instead of ECLIPSE.

  • Olivier OUDOT
    Olivier OUDOT
    5 Posts

    Re: Problem in Runnable jar deployment

    ‏2013-07-12T12:27:33Z  

    My dear, There is no need for manually grouping files or else. I's working fine when program(eclipse) is on. My problem is in exporting a  project(as I described its structure) into a runnable jar which can be executable in any computer without any installed IBM Ilog cplex program. The problem is the same when I model my project in NETBEANS instead of ECLIPSE.

    Hi Mintch,

    When you install IBM Ilog Cplex Optimization Studio on a workstation, some system environment variables are set in order to make appropriate files (the three ones I mentionned in my first answer) callable by the programs that require them.

    When you export your application on another machine (please ensure that you abide by the product license terms), hese files must be associated to your application, and the system path of this machine must be set properly to make them callable.

    Another point is also to verify that the manifest file that is embedded in your jar. It must refer to Ilog.CP.jar as external library.

     

  • Mintch Zulitch
    Mintch Zulitch
    5 Posts

    Re: Problem in Runnable jar deployment

    ‏2013-07-12T13:22:04Z  

    Hi Mintch,

    When you install IBM Ilog Cplex Optimization Studio on a workstation, some system environment variables are set in order to make appropriate files (the three ones I mentionned in my first answer) callable by the programs that require them.

    When you export your application on another machine (please ensure that you abide by the product license terms), hese files must be associated to your application, and the system path of this machine must be set properly to make them callable.

    Another point is also to verify that the manifest file that is embedded in your jar. It must refer to Ilog.CP.jar as external library.

     

    Hi  Olivier,

    So, we came to the essence of my problem. How can I modify the manifest file and then wrap it up again into runnable jar ? and what sort of syntax should I include in the manifest file ?

  • Olivier OUDOT
    Olivier OUDOT
    5 Posts

    Re: Problem in Runnable jar deployment

    ‏2013-07-13T09:25:54Z  

    Hi  Olivier,

    So, we came to the essence of my problem. How can I modify the manifest file and then wrap it up again into runnable jar ? and what sort of syntax should I include in the manifest file ?

    Well, this is a general Java problem. You can find all information on the net, for example at http://docs.oracle.com/javase/tutorial/deployment/jar/manifestindex.html