Topic: [求教]JB2005支持JDK1.5的问题! |
Print this page |
1.[求教]JB2005支持JDK1.5的问题! | Copy to clipboard |
Posted by: phoenixup Posted on: 2005-01-28 09:46 如何让JB2005支持JDK1.5,我在Tools->Configure->JDKS里设置了JDK1.5,但是编写程序的时候,新的语法不可用! 报类似: "Test.java": generics are not supported in -source 1.2 (try -source 1.5 to enable generics) at line 10, column 13 这样的错误! 代码报错的一行是:List<String> lyf=new ArrayList(); |
2.Re:[求教]JB2005支持JDK1.5的问题! [Re: phoenixup] | Copy to clipboard |
Posted by: payaqa Posted on: 2005-01-28 11:49 JB2005支持的,我试过。 |
3.Re:[求教]JB2005支持JDK1.5的问题! [Re: phoenixup] | Copy to clipboard |
Posted by: lele Posted on: 2005-01-28 15:19 光在tools里configure了不行,还要在project properties里把jdk换成1.5的 |
4.Re:[求教]JB2005支持JDK1.5的问题! [Re: phoenixup] | Copy to clipboard |
Posted by: phoenixup Posted on: 2005-01-31 10:43 呵呵,这些我都试验过了! 步骤: 1.在Tools->Configure->JDKS里设置了JDK1.5; 2.选择项目的缺省JDK是JDK1.5; 3.新建立项目Test; 4.建立源程序Test.java: import java.util.*; public class Test { public static void main(String[] args) { Test test = new Test(); List<String> li=new ArrayList<String>(); li.add("ONE"); li.add("TWO"); } } 但是就是在List<String> li=new ArrayList<String>();那一行报错,错误信息: "Test.java": generics are not supported in -source 1.2 (try -source 1.5 to enable generics) at line 10, column 13 |
5.Re:[求教]JB2005支持JDK1.5的问题! [Re: phoenixup] | Copy to clipboard |
Posted by: lordofring Posted on: 2005-01-31 21:35 在项目的properties里,找到build->java,然后把language features和target VM设置程j2sdk, 5.0. 应该就可以了。 |
6.Re:[求教]JB2005支持JDK1.5的问题! [Re: phoenixup] | Copy to clipboard |
Posted by: phoenixup Posted on: 2005-02-02 09:37 真是太谢谢了,我真是个猪头....唉,惭愧,惭愧! |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |