tailieunhanh - My SQL and Java Developer’s Guide phần 3
Nếu bạn nhận được một lỗi nói rằng lệnh javac không thể được tìm thấy, sau đó bạn sẽ cần phải kiểm tra đường dẫn đến thư mục / bin, điều này có nghĩa là hệ thống không thể tìm thấy các trình biên dịch Java trong thư mục / bin. Nếu mọi thứ làm việc ra một cách chính xác, thực hiện Java với | Installing Connector J 65 Compile the code with the command javac If you get an error saying the javac command cannot be found then you will need to check the path to the bin directory this means that the system is unable to find the Java compiler in the bin directory. If things work out correctly execute the Java with java Hello You should see the text Hello World It Works on your screen. If you don t see this text check Sun s instructions to correct the installation. Installing Connector J If you refer to Figure you see that both the Production and Development areas have downloads available for Connector J. Clicking on either of the links brings you to the respective page for that particular version of the code. In both cases two files are available for download a zip and a . Most of the code in the remainder of this book executes under the Production version of the code but better performance and many small JDBC support changes are available in the Development version. Our test machines used the version of Connector J. If you download the zip version of the code we assume you are installing on a Windows box and that the tar gz version for Linux or another Unix flavor. In either case you need to uncompress the file to expose both the source code for the driver as well as a JAR file called in . This file contains all of the necessary class files for the driver. There are a few ways to install the driver. The first is to copy the com and org files into another directory listed in your classpath. Another option is to add the full path to the JAR file to your CLASSPATH variable. Finally you can just copy the JAR file to the JAVA_HOME jre lib ext directory. On a Windows platform if you installed the directory is found at program files java lib ext. Just copy the JAR file to that directory and the library will be available for applications that execute within the Java Virtual .
đang nạp các trang xem trước