Help on gcj to compile a java program
Hi, I am trying to compile a machine code out of a java source code by using gcj, but I run into this error message that I could not comprehend.
#gcj --main=updateRoom updateRoom.java /tmp/cckfECKN.o: In function `java::sql::Connection* updateRoom::fnMakeConn()': updateRoom.java: (.text+0x1f8): undefined reference to `com::microsoft::jdbc::sqlserver::SQLServerDriver::class$' updateRoom.java: (.text+0x20b): undefined reference to `com::microsoft::jdbc::sqlserver::SQLServerDriver::SQLServerDriver()' collect2: ld returned 1 exit status meanwhile, if I compile the code using #javac updateRoom.java did not give any error. in the program I have import java.io.*; import java.sql.*; ***omitted*** public static Connection fnMakeConn() throws SQLException { Connection connection = null; try { //loads MS SQL JDBC driver DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver()); connection = DriverManager.getConnection(strUrl, strUserName, strUserPassword); } catch(Exception e) { } return connection; } ***omitted*** If someone happen to understand or have any idea on why/what the error means, please kindly point me to the proper direction :study: |
The error message means that it can't find the com.microsoft.jdbc.sqlserver package in your CLASSPATH.
|
Great! thanks for the hint, I will look into it. I will post again when I am able to fix this
|
All times are GMT -5. The time now is 03:36 AM. |