Where to put sqljdbc42.jar so MC Server gradle build can use it #287
Replies: 2 comments
-
I was able to figure out the gradle config files and get the library included. The server will now run and build using the gradle commands. My trouble now is how to make the resultant jar run. I've tried opening a vanilla version and comparing the but internal structure of the jar files is quite different. Any help will still be GREATLY appreciated. |
Beta Was this translation helpful? Give feedback.
-
Don't use a jar file and stop using Eclipse and use IntelliJ IDEA (download community edition). I personally have found Eclipse to not be nearly as helpful as IDEA, as it has more useful features in it. Also, you can use Eclipse's shortcuts and import Eclipse projects. Add the library to your dependencies {
implementation 'com.microsoft.sqlserver:mssql-jdbc:12.4.1.jre11' // Copy only this line
} Then reload gradle and you should have the latest version of the library installed. |
Beta Was this translation helpful? Give feedback.
-
I can't find one post searching for sqljdbc so I must come to you all. You're my only hope.
For years, I had a server that I continued to mod using Eclipse and MCP with a SQL Server 2008 back end. I'm dusting it off and very excited to find that you guys kept the spirit alive with MCP Reborn!!! Right now, I've just modded one simple thing (logging to SQL when you die) and just trying to repackage it and see it work before I roll this 4Gb world from 1.6.4 all the way to 1.19.4 (couldn't get 1.20 to decompile but I'll take it for now).
My dev environment is almost perfect, except that I can't rebuild the server without getting errors that it can't find the DB connection class (inside sqljdbc42.jar). Incidentally, I also get 25 warnings about deprecated legacy methods but I assume that if I get my 3 hard errors cleared, it would build.
I'm in Eclipse 4.28.0, JDK 17, SQL Server 2022 Express (couldn't get it to work with my old SQL 2008) and I have successfully set up and run everything using sqljdbc42.jar in my "Build Path" (added to Classpath in Eclipse IDE). EVERYTHING WORKS using the Eclipse debug or run buttons, but I get the same errors when I try to run mcp-reborn.mcp.runserver gradle. This all makes sense (that gradle doesn't know where this asset is) but I have no clue where to put it or how to tell gradle to use it.
I've spent countless hours before bowing my head to ask you all. I've put it all over the place, referenced it a zillion different ways and I'm out of ideas. [old devs aren't humble... they'll spend months trying to find one missing semicolon]
When I run the build gradle at mcp-reborn.build.build (I'm new to Gradle... be gentle), I get three errors:
If I can tell gradle where this jar is, I'm sure it will build and all will be right with the world.
HELP!!!!!!!!!!!!
Michael
Beta Was this translation helpful? Give feedback.
All reactions