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

4 次查看(过去 30 天)
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".<

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by