That's awesome. You're Ozzy Osbourne!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: Camel on May 29, 2009, 02:25 AM
Overriding the classpath replaces the working directory, preventing MyTest.class from being seen. Just add . to your classpath; java -classpath .:mysql.jar MyTest
Additionally, I would strongly recommend that you do not put the driver in lib/ext. One reason is that the VM is not required to observe that directory. An even better reason is that, even if it does, you're asking for trouble if any other Java program on your system requires a different version of that library.
S:\Java\Projects>java -classpath .;S:\MySQL\Tools\connectorJ\mysql-connector-java-5.1.7-bin.jar MyTest
MyTest started.
MyTest completed.
import java.sql.DriverManager;
import java.sql.Connection;
import java.sql.SQLException;
class MyTest {
public static void main(String[] args) {
System.out.println("MyTest started.");
try {
Class.forName("com.mysql.jdbc.Driver");
} catch (Exception ex) {
System.err.println("------------------------------------------------");
System.err.println("Exception: " + ex.getMessage());
System.err.println("------------------------------------------------");
}
try {
String url = "jdbc:mysql:///user";
String uid = "root";
String upwd = "changed";
Connection con = DriverManager.getConnection(url, uid, upwd);
} catch (SQLException ex) {
System.err.println("------------------------------------------------");
System.err.println("SQLException: " + ex.getMessage());
System.err.println("------------------------------------------------");
}
System.out.println("MyTest completed.");
}
}
S:\Java\Projects>java MyTest
MyTest started.
------------------------------------------------
Exception: com.mysql.jdbc.Driver
------------------------------------------------
------------------------------------------------
SQLException: No suitable driver found for jdbc:mysql:///user
------------------------------------------------
MyTest completed.
Quote from: MrRaza on April 15, 2009, 03:36 PM
Thanks for the advice, I'll give the manufacture a call, hopefully they can let me know the best way to get this resolved.
The pin on the hard drive itself is broken off, I'm assuming as I pulled the "teather" to place the drive into it's slot on the bottom of the laptop, pins got crushed.
I wouldn't mind paying for the data back as long as it's not a massive amount. It is somewhat valuable, having all of my college notes on there, CCNA/CCNP, and CISSP information. I'm going to take it to a local computer store that has some equipment that can modify hardware componets and see what they think of it.
Grok had some good advice that I didn't think of before. I'll look into some exact models online and see what the prices are.
Thanks!
Quote from: Invert on April 09, 2009, 05:22 PM
I laughed when I read your post. Sorry MrRaza, I was just picturing the situation.
Was the pin broken on the HD or on the laptop slot? If it's on the laptop it would be easier to fix (soldering iron) than if it was on the HD itself.
If it's on the HD I would take it to a specialist HD data recovery person. Forget the soldering iron nonsense, if the data is worth something you will have to pay for it to get to the data.
Page created in 0.215 seconds with 16 queries.