-1

is not supported by Java Runtime Environment 8. What is the alternative way to achieve it?

I tried to create heap using ArrayList as follows:

ArrayList<E>list = new ArrayList<E>(length);

It doesn't work. Eclipse requested to change JRE environment to an older version...

assylias
  • 321,522
  • 82
  • 660
  • 783
Jeyatharsini
  • 95
  • 2
  • 11
  • 5
    Eclipse will uses Java 2 SE 4 by default. This is a problem within Eclipse support for Java 8, not with Java 8 per se. – Luiggi Mendoza Jun 13 '14 at 17:12
  • What release of Eclipse are you using? Kepler or Luna or something else? – Alvin Bunk Jun 13 '14 at 17:30
  • If you are using Kepler, there is a update site here:http://download.eclipse.org/eclipse/updates/4.3-P-builds I tried this and updated my Eclipse, and build support is added. – Alvin Bunk Jun 13 '14 at 17:32
  • I am using Eclipse Kepler – Jeyatharsini Jun 13 '14 at 19:55
  • When I tried to use install new software, it says unable to read the depository. I disabled firewall. I followed many instructions from web to achieve it. Still I couldn't fix it. Even Eclipse marketplace progressive bar remains unchanged after middle way. My internet connection is good. But not work... – Jeyatharsini Jun 13 '14 at 20:04

1 Answers1

2

I think for now you have to manually add Java 8 support since the latest offical version of eclipse doesn't yet support Java 8.

Instructions are here: http://www.eclipse.org/downloads/java8/

dkatzel
  • 31,188
  • 3
  • 63
  • 67
  • I have the following unsolved problem: http://stackoverflow.com/questions/24015382/couldnt-load-eclipse-marketplace-in-eclipse-kepler – Jeyatharsini Jun 13 '14 at 20:01