Page 1 of 1

sdk question

PostPosted:Tue Nov 24, 2020 6:10 pm
by thatguy
Hello All,

I have compiled the java 1.2 sdk for openkm CE using maven 3.6.3. It creates a jar file which i placed in <jdk path>/jre/lib/ext folder. Using java jdk 1.8.0.275.

I used the pom file from https://github.com/openkm/sdk4j-with-de ... er/pom.xml
and also tried jar sample from https://docs.openkm.com/kcenter/view/sd ... lient.html.

When i spin up my intellj IDE i cannot import anything from com.openkm. Placing the built .jar in intellij's lib folder also didnt work.

I tried extracting the jar and placing the contents in the intellij project folders com. I was able to import but none of the com.openkm.sdkj4.OKM* was there.

I am obviously missing something here any help would be appreciated, thanks!

Re: sdk question

PostPosted:Tue Nov 24, 2020 6:39 pm
by thatguy
When i go to open the jar using "java -jar" i received a "Could not find or load main class com.openkm.Main".

Extracted the jar, and in META-INF/MANIFEST.MF:

Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Built-By: jonat
Created-By: Apache Maven 3.6.3
Build-Jdk: 1.8.0_275
Main-Class: com.openkm.Main

Re: sdk question

PostPosted:Tue Nov 24, 2020 7:03 pm
by thatguy
I give up. Any help much appreciated. Just to verify i built the jar via maven using the sdk with dependencies from github. Should run from there?

Re: sdk question

PostPosted:Wed Nov 25, 2020 4:44 pm
by jvezinat
Dont bother. The sdk is a myth. Built from their pom.xml from github doesn't work. Their automation scripts don't work (complains about java syntax, even though it runs just fine in an ide). Overall, this product is garbage..straight trash.

Re: sdk question

PostPosted:Fri Nov 27, 2020 8:03 am
by pavila
This library is available at our Maven repository. Just use a pom.xml like this one at https://docs.openkm.com/kcenter/view/sd ... lient.html

You can also use this project at https://github.com/openkm/sdk4j-with-dependences to generate the library with dependencies ready to use in your projects.

Re: sdk question

PostPosted:Sat Dec 05, 2020 6:35 pm
by thatguy
I did build using the links you provided as i mentioned in my first post. I cannot load the jar or use the sdk following the steps provided.

Re: sdk question

PostPosted:Sun Dec 06, 2020 4:10 pm
by jllort
SDK is a library, you can not execute itself, the idea is to create your own code to based in the library to get it working, for example, getRoles as is shown in this sample https://docs.openkm.com/kcenter/view/sd ... l#getUsers