Hello ,
I have done some API code in c# and now I need to make some in java .
I don;t know where to star - I’m learning java now , and in my experience it is best to learn from a working code.
So I have download the API from - https://github.com/GideonLeGrange/mikrotik-java
what do I need to do in with all the files? (I’m a beginner at java)
I want (for start) to connect to the router and get his version
I’m using eclipse editor
Thanks ,
There are instructions on the page.
You could use Maven (a package manager for Java - the concept is similar to C#'s Nuget). There’s an Eclipse plugin for Maven if you’d like to go on that route. I haven’t used Maven at all, so I can’t be of assistance on that route.
The other way is to download the pre-built jar file (the one that’s just the version and .jar; not “sources” or “javadoc”), and include in your classpath… I don’t know exactly how you modify the classpath in Eclipse, but it should be somewhere from the project/compilation settings.
Once either of those is in place, you can refer to the classes in the package as you would any other. You can see the examples folder for some full command line examples (which require the above steps to compile if you place them in a new Eclipse project).