The type is not generic; it cannot be parameterized withjs argumentss <ImageIcon>

java map 遍历时的错误 问什么会有这样错误?
我是以post方式进行传值.获取值:Map requestParams = request.getParameterMap(); //没有报错Set set = requestParams.keySet();//报错错误:The type S it cannot be parameterized with arguments &K&
09-09-09 & 发布
map的要求是key不能重复,但是value可以重复,所以存放重复元素,只要key不相同即可。比如有两个人的名字相同:都叫做LiuDeHuaMap&String,String& map = new HashMap&String,String&();map.put(p1,“LiuDeHua”);map.put(“p2“,LiuDeHua);这样既可
请登录后再发表评论!  解决办法有两个步骤,如果第一步不行,再试一下第二步。&&&&&&& 第一步:
  修改Window-〉Preferences-&Java -&Compiler-&JDK Compliance中的compiler compliance level,把它设为5.0或者以上。&&&&&&& 第二步:
  修改Window-〉Preferences-&Java -&Installed JREs,如果是1.4或者以下的,你最好就自己添加一个1.5或者以上的JRE。
方法:点击Installed JREs里面的浏览(Browse....)然后找到自己安装的JRE环境,参考如下:C:\Program Files\Java\jre6。
最后要在前面点击一下,有个勾显示就行了。
阅读(...) 评论()From IcedTea
If you run across an error like the following:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at org.eclipse.piler. etc...
This means that your copy of ecj is running on a Java VM which has not been allocated enough heap space to successfully compile the classes in IcedTea.
Many Java VMs, including Sun's, set a maximum limit on the size of the heap.
Java-based compilers like ecj and javac can exceed this (the same problem occurs when building ).
Many distributions setup ecj to run with a script using something along the lines of:
java org.eclipse.piler.batch.Main
To this, you should add the option -Xmx512M after java like so:
java -Xmx512M org.eclipse.piler.batch.Main
This will increase the maximum size of the heap to 512MB which should be sufficient.
Note that the IcedTea build does this, so this problem only usually occurs when building with ecj.
Distributions that ship a version of ecj which uses gcj (either natively or via gij) will also not encounter this problem, as gcj has no such maximum heap size.
If you get the message:
ERROR: Your BOOTDIR environment variable does not point
to a valid JDK for bootstrapping this build.
build must be bootstrapped using JDK 1.6.0 fcs (or later).
Apparently, your bootstrap JDK is version 1.4
Please update your ALT_BOOTDIR setting and start your build again.
Then the problem is likely to be with the java binary symlinked in bootstrap/jdk1.6.0/bin/java.
By default, this will link to gij, which on many systems is not 1.5 compliant:
bootstrap/jdk1.6.0/bin/java -version
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 (Gentoo 4.1.2 p1.0.2)
To use gcj as the JDK, you need a version which is 1.5 compliant.
Only 4.3 and later (along with RedHat's backport) of this are.
Most distributions now provide this version (e.g. Fedora 8, 9 and 10, Debian Lenny, Gentoo unstable, recent Ubuntus) while with others you will need to download and compile another copy of GCC to use this.
for how to do this.
Alternatively, you can pass the --with-java option to configure in order to make the symlink point to a different VM which is compliant.
If you come across errors like the following:
-def-pcompile:
[javac] Compiling 2 source files
[javac] ----------
[javac] 1. ERROR
List&String& sortedKeys = new ArrayList&String&();
[javac] The type L it cannot be parameterized with arguments
this means that the Java compiler (bootstrap/jdk1.6.0/bin/javac) being used to compile the langtools is not using a 1.5 compliant classlibrary.
Again, this tends to occur if your gcj is old (see above) as the libgcj being used will then not include a version of classes such as java.util.List that use generics. Either install a newer GCC or pass a different GNU Classpath-based JDK using the --with-gcj-home option.
If IcedTea7 build fails with following error message:
javac: invalid source release: 7
Usage: javac &options& &source files&
use -help for a list of possible options
make[5]: *** [.compile.classlist] Error 2
it means you are trying to compile sources using JDK 5 or JDK6. In this case it is needed to use --disable-bootstrap flag:
cd icedtea
./autogen.sh
./configure --disable-bootstrap
Personal tools
This page was last modified 18:28, 21 July 2011.
This page has been accessed 27,805 times.

我要回帖

更多关于 arguments.callee 的文章

 

随机推荐