IT Employment

General discussion


Error while running Java program

By prasannakumar ·
Hi friends
Iam new to Java technology.
When I tried to retrieve records from Oracle database to Java using ODBC, the compilation is successful. But I'm getting an error while running the program.
I'm getting output for this program in other systems in which the system JavaHome variable is set as C:\jdk1.3 whereas in my sytem, the variable is C:\j2sdk1.4.0_01

The error is:
Exception in thread "main" java.lang.NoClassDefFoundError: Ret/Class

My program is:
import java.sql.*;
public class Ret
public static void main(String a[]) throws Exception
Connection con = DriverManager.getConnection("jdbc:odbc:team2","scott","tiger");
Statement s = con.createStatement();
ResultSet rs = s.executeQuery("Select * from emp");
while (
String str = rs.getString("ename");
String j = rs.getString("job");
System.out.println(str+" "+j);
catch(Exception e)

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Related Discussions

Related Forums