Jump to content

Integrating a library?


Dab in a Lab

Recommended Posts

I've tried to integrate a library off of github last week, and I'm now stuck and not sure what to search to teach myself

I have the code in my project, but I can't seem to call it and use it yet. I'm assuming I got it in there correctly too

The library also has a Mavern, but I'm not sure what it does. After looking it up, there seems to be a default Mavern people build, but I'm not sure what they then do with it, and the Mavern for this library is obviously different than just the standard one. 

If I have to, I'd be down to pay someone 5 or 10 bucks to work with me and teach me how to get it integrated.

Link to comment
Share on other sites

19 minutes ago, Chris said:

Build a new maven project and use the existing pom.xml,etc files

Would I build the maven this library has as a separate .jar file, and then add it to the project like how I would with OSBot at the start of a project?

19 minutes ago, Token said:

The library may be on mvnrepository if it's popular enough, search for it on that website, it usually includes a pre-compiled jar version

I think I found the precompiled jar version of this library. Similar to what I asked Chris, would I then add it as a library like how OSBot is added at the start of a project?

Edited by Dab in a Lab
Link to comment
Share on other sites

5 minutes ago, Dab in a Lab said:

Would I build the maven this library has as a separate .jar file, and then add it to the project like how I would with OSBot at the start of a project?

I think I found the precompiled jar version of this library. Similar to what I asked Chris, would I then add it as a library like how OSBot is added at the start of a project?

its it something local for you yes you can add it as a library

 

if this is for a script the project files need to be in the main src folder of your script

Link to comment
Share on other sites

11 minutes ago, Chris said:

its it something local for you yes you can add it as a library

 

if this is for a script the project files need to be in the main src folder of your script

Is it enough to have it like this? 

https://gyazo.com/59fd56085e2bcf0882f38d00253b9a94 

I haven't been able to figure out what its doing when in the src like this. I'm sure its fine, but it also created its own url shortcut to the repository

 

Edit: Also is it necessary to have all the code of the library in my project too? That com.github part in the screenshot contains all the code too

Edited by Dab in a Lab
Link to comment
Share on other sites

On 4/17/2019 at 11:55 AM, Dab in a Lab said:

Is it enough to have it like this? 

https://gyazo.com/59fd56085e2bcf0882f38d00253b9a94 

I haven't been able to figure out what its doing when in the src like this. I'm sure its fine, but it also created its own url shortcut to the repository

 

Edit: Also is it necessary to have all the code of the library in my project too? That com.github part in the screenshot contains all the code too

That particular library will not work straight out of the box on OSBot due to OSBot's restrictions and therefor can't be shaded in by maven without complications. You'd need to manually move the source files (Starting from the root) into your project root (Source root, not randomly placed). Then you'd need to manually replace all the code violating OSBot's permissions such as reflection, Robot, ect. Anything that prevents you from loading the library properly. 

Edited by asdttt
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...