“VCD租赁管理系统”探讨
原BLOG地址:http://blog.programfan.com/article.asp?id=10927
所需软件3个:
VCD租赁管理系统:
http://upload.programfan.com/upfile/20060311194318.rar
mysql:
http://dev.mysql.com/downloads/mysql/5.0.html
J2RE:
http://java.com/zh_CN/download/manual.jsp
( 什么是JRE/J2RE ?
答:J2RE是Java2 Runtime Environment,即Java运行环境,有时简称JRE。如果你只需要运行Java程序或Applet,下载并安装它即可。如果你要自行开发Java软件,请下载JDK。在JDK中附带有J2RE。 注意由于Microsoft对Java的支持不完全,请不要使用IE自带的虚拟机来运行Applet,务必安装一个J2RE或JDK。
更多请参考http://blog.programfan.com/article.asp?id=10985)
配置说明:
1,将该压缩文档解压。
2,在环境变量classpath中添加如下路径:(此处是不是建立新变量名字叫classpath)
......\mysql-connector-java-5.0.0-beta-bin.jar;......\VCD.jar (注意:路径中间用;连接)
省略号表示存放文件mysql-connector-java-5.0.0-beta-bin.jar和VCD.jar的目录
3,将mydatabase文件夹拷贝到MySql数据库安装目录的data文件夹下。如果未装MySql。到下述网址免费下载:
http://dev.mysql.com/downloads/mysql/5.0.html
然后按安装向导安装。
配置MySql时用户为:root,密码为:admin
(我用root登陆mysql,可以看到mydatabase数据库,用show tables,也可以看到那三个表,但是当我select * from manager(或lendtable,vcd )的时候就提示 :
table mydatabase .manager doesn't exist。我均用的小写字符,肯定不是名字大小写不一样的问题。如下:
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| menagerie |
| mydatabase |
| mysql |
| test |
+--------------------+
5 rows in set (0.02 sec)
mysql> use mydatabase;
Database changed
mysql> show tables;
+----------------------------+
| Tables_in_mydatabase |
+----------------------------+
| lendtable |
| manager |
| vcd |
+----------------------------+
3 rows in set (0.00 sec)
mysql> select * from vcd;
ERROR 1146 (42S02): Table 'mydatabase.vcd' doesn't exist
mysql> select * from lendtable;
ERROR 1146 (42S02): Table 'mydatabase.lendtable' doesn't exist
mysql> select * from manager;
ERROR 1146 (42S02): Table 'mydatabase.manager' doesn't exist
mysql>
)
4,现在你可以双击vcd.bat来运行了,呵呵。
默认的登录用户ID为1001
用户名为admin
密码为admin
但是我在登陆的时候却是下面的情形,而且提示用户名或密码错误,如下:
J:\Downloads\VCD>java Login
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Table 'mydatabase.manager'
doesn't exist
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2822)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1536)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1626)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3025)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2954)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:1009)
at TestManager.isRight(TestManager.java:19)
at Login.actionPerformed(Login.java:72)
at java.awt.Button.processActionEvent(Unknown Source)
at java.awt.Button.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
评论