Skip to content

cplex in maven #1

@jafarinejad

Description

@jafarinejad

Thank you for your example.
I want to use cplex through a maven project. when I use cplex in a non-maven eclipse project, it runs correctly. in non-maven project I had to add the path to native library location of cplex in java build path. but in the maven project, I get errors like "java.lang.NoClassDefFoundError: ilog/concert/IloNumExpr" at runtime. I add dependencies to my cplex.jar in pom :

 <dependency>
        <groupId>cplex</groupId>
        <artifactId>cplex</artifactId>
        <version>2.0.1</version>
        <scope>system</scope>
        <systemPath>${basedir}\IBM.ILOG.CPLEX.Optimizer\cplex\lib\cplex.jar</systemPath>
</dependency>

and I test to add native libraries to src/main/resources, and adding resource tab in pom: it doesn't work. I add the native library to class path environment variable: it doesn't work. I copy them in c:/windows/system32: it doesn't work!

can you help me? what is the solution? :-(

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions