![]() ![]() Install the driver (right-click -> Run as administrator), preferably you should install the driver to C:\Program Files\Microsoft JDBC Driver 4.2 but any location works. So we need to help Weka find the driver to talk to SQL Server 2016.ĭownload the Microsoft JDBC Driver 4.2. Weka is written in Java and when Java connects to a database it needs to load a JDBC Driver, which then performs the connection. There are some data type mappings: varchar=0Īfter these data type mappings, add some additional ones (to save you some headaches in the future) nvarchar=9Ĭongrats your database property file is now set up! But we aren’t done yet, now we need to set up our classpath. JdbcURL=jdbc:sqlserver://localhost databaseName=blahblahĬhange this to your own, if your SQL Server 2016 is on your local machine it will most likely be (databaseName is not required): # database URL The current file has the database URL as the following: # database URL We now have the groundworks for our properties file, we just need to make a few more changes. Open your 2005 (using a text editor like Notepad/Notepad ) and save it as DatabaseUtils.props file. ![]() Weka will only look directly at one DatabaseUtils.prop file (hsql, msaccess, mssqlserver, etc are not accessible by Weka) Otherwise copy this file to make a backup. This is a properties file for Weka (if you want to learn more about Weka property files click here). ![]() Import this folder, we are looking for a lovely little file called DatabaseUtils.prop. This code is taken pretty much line for line from weka.wikispaces. Find Java Build Path -> Libraries either during project creation or afterwards under “Package Explorer” -> RClick project -> Properties.ģ) “Add External Jars…” and select the weka.jar from your download.Ĥ) Create a class file under the “src” folder. Quick, rough guide to getting started with Weka using Java and Eclipse.Ģ) Create a new project in Eclipse. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |