Upgrading from JAVA 6 to 7 [message #825350] |
Tue, 20 March 2012 14:58  |
Eclipse User |
|
|
|
Hello,
I just upgraded from JAVA 6.30 to JAVA 7.3, but my ECLIPSE 3.8 sticks to JAVA 6 (1.6).
I have 20 projects running and I don't want to enter them from scratch again.
Should I throw away all .metadata and start all over again importing all of my projects
or is there a way to make ECLIPSE aware of JAVA 7 (1.7) for all projects?
;JOOP!
|
|
|
|
|
|
Re: Upgrading from JAVA 6 to 7 [message #826519 is a reply to message #826246] |
Thu, 22 March 2012 02:55   |
Eclipse User |
|
|
|
Well, so I did, but half of my projects kept referring the (non-existing) 1.6 library, so I had to change
their properties one by one.
A last question: I managed to solve 31 of the 35 errors ECLIPSE raised when 1.7 became the java version, mostly
by the quick fix.
However 4 (identical) errors remain, quick fix does not do anything here; example:
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.ListCellRenderer;
public class TestCase
{
static final String[] numbers = { "One", "Two", "Three"};
public static void main(String[] commandLine)
{
JList<String> myList = null;
myList = new JList<String>(numbers);
myList.setCellRenderer(getStripeRenderer(Color.RED, Color.BLUE)); // ERROR below ....
}
static ListCellRenderer getStripeRenderer(Color one, Color two)
{
return(new StripeRenderer(one, two));
}
}
Error message:
Type safety: The expression of type ListCellRenderer needs unchecked conversion to conform to ListCellRenderer<? super String>
I thought I knew a bit about generics but I don't have a clue what to change.
Thanks for your help.
;JOOP!
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03639 seconds