How to use JDBC driver for MATLAB stand-alone application?

4 views (last 30 days)
When I'm using JDBC driver to database connection (PostgreSQL) in MATLAB, I have no problems. But after creation stand-alone application and its installing to another PC (without MATLAB, of course, and without Internet connection, conceivably), the application doesn't work because of "Unable to find JDBC driver".
I guess it's because of static paths (%MATLABROOT%/toolbox/local/classpath.txt), which are absent in another PC. Please, who knows, tip me a wink, how do connect to database using JDBC driver storing with application (I mean how to explain MATLAB to use dynamic classpath)? Or, maybe, there is another way to solve the problem?
Thanks in advance.
UPD
I have appended a line:
javaclasspath('postgresql-9.4-1203.jdbc41.jar')
to get dynamic path, and got an error: > Undefined variable "com" or class "com.mathworks.toolbox.database.databaseConnect".<

Accepted Answer

Ivan
Ivan on 24 Sep 2015
I found the answer here: Stack Overflow and here: MATLAB Answers
Thanks a lot for everyone!

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!