Topic
7 replies Latest Post - ‏2013-07-13T09:25:54Z by Olivier OUDOT
0372_Mintch_Zulitch
0372_Mintch_Zulitch
5 Posts
ACCEPTED ANSWER

Pinned topic Problem in Runnable jar deployment

‏2013-07-08T17:06:25Z |

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  in response to 0372_Mintch_Zulitch

    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.

  • 0372_Mintch_Zulitch
    0372_Mintch_Zulitch
    5 Posts
    ACCEPTED ANSWER

    Re: Problem in Runnable jar deployment

    ‏2013-07-10T15:30:08Z  in response to 0372_Mintch_Zulitch

    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
      ACCEPTED ANSWER

      Re: Problem in Runnable jar deployment

      ‏2013-07-11T16:01:07Z  in response to 0372_Mintch_Zulitch

      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.

      • 0372_Mintch_Zulitch
        0372_Mintch_Zulitch
        5 Posts
        ACCEPTED ANSWER

        Re: Problem in Runnable jar deployment

        ‏2013-07-12T05:29:34Z  in response to Olivier OUDOT

        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
          ACCEPTED ANSWER

          Re: Problem in Runnable jar deployment

          ‏2013-07-12T12:27:33Z  in response to 0372_Mintch_Zulitch

          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.