LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-24-2007, 09:00 PM   #1
anakganteng
LQ Newbie
 
Registered: Feb 2006
Location: Jakarta, Indonesia
Distribution: Fedora Core 4
Posts: 6

Rep: Reputation: 0
Question 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
 
Old 07-25-2007, 08:34 PM   #2
Dan04
Member
 
Registered: Jun 2006
Location: Texas
Distribution: Ubuntu
Posts: 207

Rep: Reputation: 37
The error message means that it can't find the com.microsoft.jdbc.sqlserver package in your CLASSPATH.
 
Old 07-27-2007, 02:34 PM   #3
anakganteng
LQ Newbie
 
Registered: Feb 2006
Location: Jakarta, Indonesia
Distribution: Fedora Core 4
Posts: 6

Original Poster
Rep: Reputation: 0
Great! thanks for the hint, I will look into it. I will post again when I am able to fix this
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile and run a java program in linux !!!! jmax24 Programming 7 08-06-2010 03:56 AM
Synaptic Package Manager shows 'java-common' and 'java-gcj-compat' as Installed. swiadek Ubuntu 3 02-12-2006 11:54 AM
Compile gettext with GCJ Prop_idze Linux - Software 2 09-26-2005 10:16 AM
compile java program under mandrake 10.1 wakemeup Linux - Laptop and Netbook 2 11-30-2004 08:56 AM
GIF gone in program when compile Java in Linux dwarf007 Programming 1 09-30-2004 11:15 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration