1.java.lang.NullPointerException 原因是:有空指针,有地址没赋值 2.Exception in thread "main" java.lang.ArithmeticException: / by zero 原因是除数是0 3.ArrayIndexOutOfBoundsException 原因是:数组越界 4.java.lang.NumberFormatException 原因是:数字格式化有问题 5.Unhandled exception type Exception 原因是:没有进行异常处理 6. 进行国际化操作的时候遇到这样的错误:Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name Message, locale zh_CN 答:因为在命令提示符中,是没有错误的 解决方法是:在myeclipse 中,会出现这个错误 java 国际化之Can't find bundle for base name 1.初步学习 最近在学习ResourseBundle 时遇到了“Can't find bundle for base name ”这个错误搞了很久才解决了。原因就是类路径问题要将属性文件放在类路径中!百度里很多都是教程但没有涉及到解决方法! 2.中文显示: 测试文件 java 代码 package com.lht.ResourseBundleStudy; import java.util.ResourceBundle; public class ResourseBundleDemo { public static void main(String[] args) { ResourceBundle resource = ResourceBundle.getBundle("test"); System.out.print(resource.getString("msg0") + "!"); System.out.println(resource.getString("msg1") + "!"); } } test.properties msg0="Hello World" msg1="da jia hao" 开始自己测试的时候:将属性文件放在bin/下也试过也不行无赖中就在google 中搜索了一下终于在sun 的java 论坛 (http://forum.java.sun.com/thread.jspa?threadID=660477&messageID=4231534)中找到了线索下面是帖子的内容: I've solved the problem the best way possible. Basically what i've done is added a new class folder named config to the project home dir. Then i added this classfolder to the classpath in project properties. After doing all of this you only need to reference the properties file by "Email". Hope this helps anyone else who is having similiar problems. 基本意思就是在src 下建立classes(名字无所谓)文件夹将属性文件存放在下面,然后将这个文件夹加...