Akshay Nimbalkar
Akshay Nimbalkar

Reputation: 61

It is not allowed to rename or repackage the original archive “sapjco3.jar”?

I am trying to excute runnable jar file which is exported from eclipse wizard of my local project which have "sapjco3.jar" in build path. So, as soon as i try to execute jar file it gets following error: Illegal JCo archive "autobot.jar"(is my local jar file of my project). It is not allowed to rename or repackage the original archive "sapjco3.jar".

above problem occours while establishing java SAP connection(lib: "sapjco3.jar") at runtime.

Note: I am not Renaming or repackging Original sapjco3.jar

Upvotes: 2

Views: 3404

Answers (3)

Jorge Santos Neill
Jorge Santos Neill

Reputation: 1785

I had sapjco version 3.1.2, to fix it i change by 3.0.10, the solution that worked for me is in the follow link:

https://jira.talendforge.org/browse/TUP-23506?_ga=2.92427421.1653413528.1593728315-903540588.1593728315

Upvotes: -1

Trixx
Trixx

Reputation: 1885

You can also create your own runnable jar, but then you have keep the sapjco3.jar file separate from your runnable jar and just include the 'sapjco3.jar' in its class path, e.g. specify in your MANIFEST.MF:

Class-Path: <path>/sapjco3.jar

If using the eclipse Runnable JAR File export wizard this is achieved by selecting the library handling option:

  • Copy required libraries into a sub-folder next to the generated JAR

Upvotes: 2

Andres
Andres

Reputation: 10727

You cannot include sapjco3.jar in a runnable jar, as Eclipse is trying to do. Include it in the classpath.

Upvotes: 1

Related Questions