0

I need to create a java API to be used in Neptune. This API connects to a MySQL database, query it and return the data in a JSONObject.

My question is how to create a jar that contains the functions to query DB and also the jdbc driver and JSON jars.

I did my research and found that this can be possible creating a runnable jar but this way it cannot be used externely as an API, am I wrong?

I found this other way that is creating a jar with its dependencies using OneJar, is this the best way? I think that i'm missing something because this should be a frequent problem for java developers that want to create API for external use.

Thank you in advance

EDIT

How to create a jar with external libraries included in Eclipse?

This does not answer my question because I don't want a runnable jar, just want to create an API that contains methods who need to connect MySQL DB and for that the API need to have the jar of jdbc driver.

If there is another way to make this API to connect MySQL without include jdbc driver, i'm all ears.

Community
  • 1
  • 1
jsoares
  • 19
  • 3

0 Answers0