Passbook对应系统配置 Eclipse Tomcat配置JavaWeb项目部署 Sysdeo Eclipse Tomcat Launcher plugin

在 Eclipse J2EE Juno+Tomcat 6 用Tomcat Plugin配置Tomcat 应用时,不想Copy一堆 jar文件到应用的lib目录中,应该可以用Activate DevLoader在运行时载入需要Load的Jar文件。
        但是一不小心就容易出现 DevLoader的ClassNoFound错误,看了Tomcat Plugin的 readmeDevLoader.html后,按以下步骤试了一下,解决了。
首先,我假设你已经下载了Tomcat Plugin,并已加入到Eclipse的Plugin中去了。
        1. 将Tomcat Plugin下的DevLoader.zip Copy到 Tomcat_Home/lib下,将文件名改为:DevLoader.jar;
 ---Tomcat Plugin 的 readmeDevLoader.html中说要将DevLoader.zip解压到 TOMCAT_HOME/server/classes 中,但是在Tomcat 6中只有一个lib目录。而我知道jar文件实际上采用的就是zip算法,而tomcat会将lib目录下的所有jar文件加载并在其中寻找符合条件的class调用,所以这个步骤只要将DevLoader.zip改名为DevLoader.jar就可以了)   
       2. 在Eclipse的Tomcat项目属性中,Tomcat->DevLoader Classpath选项卡中勾选 Activate DevLoader, 然后再勾选你需要加载的项目的java代码编译路径,按Apply就OK了。
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Here's the complete program that defines the Bankbook and Creditaccount classes and simulates passbook and credit card operations for 5 people: ``` #include <iostream> #include <string> using namespace std; class Bankbook { public: unsigned int account; string name; double balance; Bankbook(unsigned int acc, string n, double bal) { account = acc; name = n; balance = bal; } void deposit(double amount) { balance += amount; cout << "Deposit successful. Current balance: " << balance << endl; } void withdraw(double amount) { if (amount > balance) { cout << "Withdrawal failed. Insufficient balance." << endl; } else { balance -= amount; cout << "Withdrawal successful. Current balance: " << balance << endl; } } void check_balance() { cout << "Current balance: " << balance << endl; } }; class Creditaccount : public Bankbook { public: Creditaccount(unsigned int acc, string n, double bal) : Bankbook(acc, n, bal) {} void withdraw(double amount) { if ((balance + 2000) < amount) { cout << "Withdrawal failed. Insufficient credit limit." << endl; } else { balance -= amount; cout << "Withdrawal successful. Current balance: " << balance << endl; } } }; int main() { Bankbook b1(1001, "Alice", 5000); Creditaccount c1(2001, "Bob", 8000); Bankbook b2(1002, "Charlie", 3000); Creditaccount c2(2002, "Dave", 6000); Bankbook b3(1003, "Eve", 4000); b1.deposit(1000); b1.withdraw(500); b2.deposit(2000); c1.withdraw(10000); c2.withdraw(5000); cout << "Account\tName\tBalance" << endl; cout << b1.account << "\t" << b1.name << "\t" << b1.balance << endl; cout << c1.account << "\t" << c1.name << "\t" << c1.balance << endl; cout << b2.account << "\t" << b2.name << "\t" << b2.balance << endl; cout << c2.account << "\t" << c2.name << "\t" << c2.balance << endl; cout << b3.account << "\t" << b3.name << "\t" << b3.balance << endl; return 0; } ``` In the `Bankbook` class, we have functions for depositing, withdrawing and checking balance. The `Creditaccount` class derives from the `Bankbook` class and modifies the `withdraw` function to allow an overdraft of 2000 yuan. In the `main` function, we create objects of both classes and perform operations such as depositing, withdrawing and checking balance. We output the account number, name and balance after the operations are completed for each person.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值