Unsupported.java:11: cannot resolve symbol
symbol : method asList (java.lang.String[])
location: class Arrays
static List a = Arrays.asList(s);
But I import java.util.*;
Why?
Thanks
Could you show us your whole program?
import java.util.*;
class Test
{
public static void main (String [] args)
{
List list = Arrays.asList (args);
}
}
works fine.
--
Jon Skeet - sk...@pobox.com
http://www.pobox.com/~skeet
String [] s =
{
"ah",
"bg",
"cf",
"de",
};
List x = Arrays.asList(s);
In your code is your argument 's' an array?
I tried your Test.java. The message is below.
javac Test.java
Test.java:6: cannot resolve symbol
symbol : method asList (java.lang.String[])
location: class Arrays
List list = Arrays.asList (args);
^
1 error
java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
What is the problem?
Thanks.
> java -version
> java version "1.3.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
> Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
>
> What is the problem?
Looks like your javac installation is rather odd. Do you perhaps have a
1.1 javac somewhere in your path?
Try c:\jdk1.3\bin\javac Test.java