Re: Newbie: -classpath option of java does not load the content of the jar file
- From: Guy <guyharel13@xxxxxxxxx>
- Date: Wed, 27 Jun 2007 05:28:45 -0700
That does not work either:
C:\_t\Java> java -classpath ojdbc14.jar j
Exception in thread "main" java.lang.NoClassDefFoundError: j
The "j" class is just a quick stub I use to test Java things (I
program mostly in Delphi), then I import the result into my real Java
app:
import java.util.*;
import java.io.*;
import java.sql.*;
import oracle.jdbc.driver.OracleDriver;
public class j
{
public static String OracleDriverName =
"oracle.jdbc.driver.OracleDriver";
public static void main(String args[])
{
System.out.println("Start...");
LoadOracleDriver();
System.out.println("End...");
}
public static boolean LoadOracleDriver ()
{
boolean bStatus = true;
try
{
Class.forName(OracleDriverName);
}
catch ( ClassNotFoundException ex )
{
System.out.println(ex);
bStatus = false;
}
return bStatus;
}
}
.
- References:
- Prev by Date: XML JDOM problems
- Next by Date: Re: Reading from a Random Access File
- Previous by thread: Re: Newbie: -classpath option of java does not load the content of the jar file
- Next by thread: Re: Newbie: -classpath option of java does not load the content of the jar file
- Index(es):