[OT] Eclispe and Java
I am just trying to build a simple class file using eclipse.. but I keep getting syntax errors.. public class Welcome { public static void main(String[] args) { greeting[0] = Welcome; greeting[1] = howdy; for (String g : greeting) System.out.println(g); } } SeverityDescription ResourceIn Folder Location Creation Time 2 Syntax error on token ), invalid AssignmentOperator Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM 2 Syntax error on token(s), misplaced construct(s)Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM i am thinking it has to do with maybe eclipse using the wrong jre... but i am not sure.. I've pointed eclipse to use the newer jdk.. (i think..) any suggestions? -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ Single Dads ]-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ http://single-dads.us ]-= ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188372 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: [OT] Eclispe and Java
Did you try just using javac ? -Original Message- From: Critter [EMAIL PROTECTED] Sent: Dec 21, 2004 11:05 AM To: CF-Talk cf-talk@houseoffusion.com Subject: [OT] Eclispe and Java I am just trying to build a simple class file using eclipse.. but I keep getting syntax errors.. public class Welcome { public static void main(String[] args) { greeting[0] = Welcome; greeting[1] = howdy; for (String g : greeting) System.out.println(g); } } SeverityDescription ResourceIn Folder Location Creation Time 2 Syntax error on token ), invalid AssignmentOperator Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM 2 Syntax error on token(s), misplaced construct(s)Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM i am thinking it has to do with maybe eclipse using the wrong jre... but i am not sure.. I've pointed eclipse to use the newer jdk.. (i think..) any suggestions? -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ Single Dads ]-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ http://single-dads.us ]-= ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188374 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: [OT] Eclispe and Java
you didnt instanciate greeting so you would do public class Welcome { public static void main(String[] args) { String[] greeting = null; //I need to exist before you start inserting things into me greeting[0] = Welcome; greeting[1] = howdy; for (String g : greeting) System.out.println(g); } } On Tue, 21 Dec 2004 11:10:05 -0500 (GMT-05:00), Michael Greenberg [EMAIL PROTECTED] wrote: Did you try just using javac ? -Original Message- From: Critter [EMAIL PROTECTED] Sent: Dec 21, 2004 11:05 AM To: CF-Talk cf-talk@houseoffusion.com Subject: [OT] Eclispe and Java I am just trying to build a simple class file using eclipse.. but I keep getting syntax errors.. public class Welcome { public static void main(String[] args) { greeting[0] = Welcome; greeting[1] = howdy; for (String g : greeting) System.out.println(g); } } SeverityDescription ResourceIn Folder Location Creation Time 2 Syntax error on token ), invalid AssignmentOperator Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM 2 Syntax error on token(s), misplaced construct(s)Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM i am thinking it has to do with maybe eclipse using the wrong jre... but i am not sure.. I've pointed eclipse to use the newer jdk.. (i think..) any suggestions? -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ Single Dads ]-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ http://single-dads.us ]-= ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188377 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: [OT] Eclispe and Java
IS this what you are after? public class Welcome { public static void main(String[] args) { String greeting []; greeting = new String [2]; greeting[0] = Welcome; greeting[1] = howdy; for (int i = 0; i greeting.length; i++) { System.out.println(greeting[i]); } } } And as far as I know Eclipse compiles your classes when you save them. G On Tue, 21 Dec 2004 11:10:05 -0500 (GMT-05:00), Michael Greenberg [EMAIL PROTECTED] wrote: Did you try just using javac ? -Original Message- From: Critter [EMAIL PROTECTED] Sent: Dec 21, 2004 11:05 AM To: CF-Talk cf-talk@houseoffusion.com Subject: [OT] Eclispe and Java I am just trying to build a simple class file using eclipse.. but I keep getting syntax errors.. public class Welcome { public static void main(String[] args) { greeting[0] = Welcome; greeting[1] = howdy; for (String g : greeting) System.out.println(g); } } SeverityDescription ResourceIn Folder Location Creation Time 2 Syntax error on token ), invalid AssignmentOperator Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM 2 Syntax error on token(s), misplaced construct(s)Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM i am thinking it has to do with maybe eclipse using the wrong jre... but i am not sure.. I've pointed eclipse to use the newer jdk.. (i think..) any suggestions? -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ Single Dads ]-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ http://single-dads.us ]-= ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188378 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: [OT] Eclispe and Java
it will compile using javac, but it throws an error when i attempt to run it.. On Tue, 21 Dec 2004 11:10:05 -0500 (GMT-05:00), Michael Greenberg [EMAIL PROTECTED] wrote: Did you try just using javac ? -Original Message- From: Critter [EMAIL PROTECTED] Sent: Dec 21, 2004 11:05 AM To: CF-Talk cf-talk@houseoffusion.com Subject: [OT] Eclispe and Java I am just trying to build a simple class file using eclipse.. but I keep getting syntax errors.. public class Welcome { public static void main(String[] args) { greeting[0] = Welcome; greeting[1] = howdy; for (String g : greeting) System.out.println(g); } } SeverityDescription ResourceIn Folder Location Creation Time 2 Syntax error on token ), invalid AssignmentOperator Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM 2 Syntax error on token(s), misplaced construct(s)Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM i am thinking it has to do with maybe eclipse using the wrong jre... but i am not sure.. I've pointed eclipse to use the newer jdk.. (i think..) any suggestions? -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ Single Dads ]-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ http://single-dads.us ]-= ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188379 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: [OT] Eclispe and Java
this error has nothing to do with eclipse infact I am sure it should be giving you compile errors. Your code has various problems i.e greetings not initialized, syntax error in for loop. On Tue, 21 Dec 2004 11:05:34 -0500, Critter [EMAIL PROTECTED] wrote: I am just trying to build a simple class file using eclipse.. but I keep getting syntax errors.. public class Welcome { public static void main(String[] args) { greeting[0] = Welcome; greeting[1] = howdy; for (String g : greeting) System.out.println(g); } } SeverityDescription ResourceIn Folder Location Creation Time 2 Syntax error on token ), invalid AssignmentOperator Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM 2 Syntax error on token(s), misplaced construct(s)Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM i am thinking it has to do with maybe eclipse using the wrong jre... but i am not sure.. I've pointed eclipse to use the newer jdk.. (i think..) any suggestions? -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ Single Dads ]-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-[ http://single-dads.us ]-= ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188380 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: [OT] Eclispe and Java
You have a couple of problems with the syntax of your code: 1. You need to declare the greeting array as an array of strings before using it: String[] greeting = new String[2] 2. The syntax of your for loop is invalid. I'd do it like this: for (int i=0;igreeting.length ; i++) { System.out.println(greeting[i]); } So the whole thing would be: * public class Welcome { public static void main(String[] args) { String[] greeting = new String[2] greeting[0] = Welcome; greeting[1] = howdy; for (int i=0;igreeting.length ; i++) System.out.println(greeting[i]); } } Spike Critter wrote: I am just trying to build a simple class file using eclipse.. but I keep getting syntax errors.. public class Welcome { public static void main(String[] args) { greeting[0] = Welcome; greeting[1] = howdy; for (String g : greeting) System.out.println(g); } } Severity Description ResourceIn Folder Location Creation Time 2 Syntax error on token ), invalid AssignmentOperatorWelcome.javaWelcome line 20 December 21, 2004 10:51:12 AM 2 Syntax error on token(s), misplaced construct(s) Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM i am thinking it has to do with maybe eclipse using the wrong jre... but i am not sure.. I've pointed eclipse to use the newer jdk.. (i think..) any suggestions? -- Stephen Milligan Code poet for hire http://www.spike.org.uk Do you cfeclipse? http://cfeclipse.tigris.org ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188381 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: [OT] Eclispe and Java
yeah... i got the greeting thing... according to the book i have... for(String g : greeting) is a new JDK 5.0 feature rather than the traditional for(i=0...etc..) On Tue, 21 Dec 2004 08:40:07 -0800, Spike [EMAIL PROTECTED] wrote: You have a couple of problems with the syntax of your code: 1. You need to declare the greeting array as an array of strings before using it: String[] greeting = new String[2] 2. The syntax of your for loop is invalid. I'd do it like this: for (int i=0;igreeting.length ; i++) { System.out.println(greeting[i]); } So the whole thing would be: * public class Welcome { public static void main(String[] args) { String[] greeting = new String[2] greeting[0] = Welcome; greeting[1] = howdy; for (int i=0;igreeting.length ; i++) System.out.println(greeting[i]); } } Spike Critter wrote: I am just trying to build a simple class file using eclipse.. but I keep getting syntax errors.. public class Welcome { public static void main(String[] args) { greeting[0] = Welcome; greeting[1] = howdy; for (String g : greeting) System.out.println(g); } } Severity Description ResourceIn Folder Location Creation Time 2 Syntax error on token ), invalid AssignmentOperatorWelcome.javaWelcome line 20 December 21, 2004 10:51:12 AM 2 Syntax error on token(s), misplaced construct(s) Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM i am thinking it has to do with maybe eclipse using the wrong jre... but i am not sure.. I've pointed eclipse to use the newer jdk.. (i think..) any suggestions? -- Stephen Milligan Code poet for hire http://www.spike.org.uk Do you cfeclipse? http://cfeclipse.tigris.org ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188386 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: [OT] Eclispe and Java
Qasim Rasheed wrote: this error has nothing to do with eclipse infact I am sure it should be giving you compile errors. Your code has various problems i.e greetings not initialized, syntax error in for loop. Exactly. The sample Greg gave him was correct (for 1.4 ... there are new iteration option for java 1.5 beta which might let you do the iteration similiar to the way you were doing it, but I haven't looked into it closely yet.) -- --Lewis Sellers (AKA min) Intrafoundation Software http://www.intrafoundation.com ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188389 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: [OT] Eclispe and Java
ok, Haven't used JDK 5, so that's very possible. Spike Critter wrote: yeah... i got the greeting thing... according to the book i have... for(String g : greeting) is a new JDK 5.0 feature rather than the traditional for(i=0...etc..) On Tue, 21 Dec 2004 08:40:07 -0800, Spike [EMAIL PROTECTED] wrote: You have a couple of problems with the syntax of your code: 1. You need to declare the greeting array as an array of strings before using it: String[] greeting = new String[2] 2. The syntax of your for loop is invalid. I'd do it like this: for (int i=0;igreeting.length ; i++) { System.out.println(greeting[i]); } So the whole thing would be: * public class Welcome { public static void main(String[] args) { String[] greeting = new String[2] greeting[0] = Welcome; greeting[1] = howdy; for (int i=0;igreeting.length ; i++) System.out.println(greeting[i]); } } Spike Critter wrote: I am just trying to build a simple class file using eclipse.. but I keep getting syntax errors.. public class Welcome { public static void main(String[] args) { greeting[0] = Welcome; greeting[1] = howdy; for (String g : greeting) System.out.println(g); } } Severity Description ResourceIn Folder Location Creation Time 2 Syntax error on token ), invalid AssignmentOperatorWelcome.javaWelcome line 20 December 21, 2004 10:51:12 AM 2 Syntax error on token(s), misplaced construct(s) Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM i am thinking it has to do with maybe eclipse using the wrong jre... but i am not sure.. I've pointed eclipse to use the newer jdk.. (i think..) any suggestions? -- Stephen Milligan Code poet for hire http://www.spike.org.uk Do you cfeclipse? http://cfeclipse.tigris.org ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188400 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: [OT] Eclispe and Java
As far as I know eclipse doesnt support 5.0 syntax yet - even though somet of the docs I've read say they do. I have had the whole thing crash trying to use the template syntax. Supposedly 3.1 is supposed ot fix that. Are you using 3.1? On Tue, 21 Dec 2004 11:56:47 -0500, Critter [EMAIL PROTECTED] wrote: yeah... i got the greeting thing... according to the book i have... for(String g : greeting) is a new JDK 5.0 feature rather than the traditional for(i=0...etc..) On Tue, 21 Dec 2004 08:40:07 -0800, Spike [EMAIL PROTECTED] wrote: You have a couple of problems with the syntax of your code: 1. You need to declare the greeting array as an array of strings before using it: String[] greeting = new String[2] 2. The syntax of your for loop is invalid. I'd do it like this: for (int i=0;igreeting.length ; i++) { System.out.println(greeting[i]); } So the whole thing would be: * public class Welcome { public static void main(String[] args) { String[] greeting = new String[2] greeting[0] = Welcome; greeting[1] = howdy; for (int i=0;igreeting.length ; i++) System.out.println(greeting[i]); } } Spike Critter wrote: I am just trying to build a simple class file using eclipse.. but I keep getting syntax errors.. public class Welcome { public static void main(String[] args) { greeting[0] = Welcome; greeting[1] = howdy; for (String g : greeting) System.out.println(g); } } Severity Description ResourceIn Folder Location Creation Time 2 Syntax error on token ), invalid AssignmentOperatorWelcome.javaWelcome line 20 December 21, 2004 10:51:12 AM 2 Syntax error on token(s), misplaced construct(s) Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM i am thinking it has to do with maybe eclipse using the wrong jre... but i am not sure.. I've pointed eclipse to use the newer jdk.. (i think..) any suggestions? -- Stephen Milligan Code poet for hire http://www.spike.org.uk Do you cfeclipse? http://cfeclipse.tigris.org ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188411 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: [OT] Eclispe and Java
3.01 is what i am using.. On Tue, 21 Dec 2004 09:50:58 -0800, Rob [EMAIL PROTECTED] wrote: As far as I know eclipse doesnt support 5.0 syntax yet - even though somet of the docs I've read say they do. I have had the whole thing crash trying to use the template syntax. Supposedly 3.1 is supposed ot fix that. Are you using 3.1? On Tue, 21 Dec 2004 11:56:47 -0500, Critter [EMAIL PROTECTED] wrote: yeah... i got the greeting thing... according to the book i have... for(String g : greeting) is a new JDK 5.0 feature rather than the traditional for(i=0...etc..) On Tue, 21 Dec 2004 08:40:07 -0800, Spike [EMAIL PROTECTED] wrote: You have a couple of problems with the syntax of your code: 1. You need to declare the greeting array as an array of strings before using it: String[] greeting = new String[2] 2. The syntax of your for loop is invalid. I'd do it like this: for (int i=0;igreeting.length ; i++) { System.out.println(greeting[i]); } So the whole thing would be: * public class Welcome { public static void main(String[] args) { String[] greeting = new String[2] greeting[0] = Welcome; greeting[1] = howdy; for (int i=0;igreeting.length ; i++) System.out.println(greeting[i]); } } Spike Critter wrote: I am just trying to build a simple class file using eclipse.. but I keep getting syntax errors.. public class Welcome { public static void main(String[] args) { greeting[0] = Welcome; greeting[1] = howdy; for (String g : greeting) System.out.println(g); } } Severity Description ResourceIn Folder Location Creation Time 2 Syntax error on token ), invalid AssignmentOperatorWelcome.javaWelcome line 20 December 21, 2004 10:51:12 AM 2 Syntax error on token(s), misplaced construct(s) Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM i am thinking it has to do with maybe eclipse using the wrong jre... but i am not sure.. I've pointed eclipse to use the newer jdk.. (i think..) any suggestions? -- Stephen Milligan Code poet for hire http://www.spike.org.uk Do you cfeclipse? http://cfeclipse.tigris.org ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188414 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: [OT] Eclispe and Java
Yeah, its confusing there is 3.0.1 and 3.1 its 3.1 that supposedly works not 3.0.1 On Tue, 21 Dec 2004 13:06:43 -0500, Critter [EMAIL PROTECTED] wrote: 3.01 is what i am using.. On Tue, 21 Dec 2004 09:50:58 -0800, Rob [EMAIL PROTECTED] wrote: As far as I know eclipse doesnt support 5.0 syntax yet - even though somet of the docs I've read say they do. I have had the whole thing crash trying to use the template syntax. Supposedly 3.1 is supposed ot fix that. Are you using 3.1? On Tue, 21 Dec 2004 11:56:47 -0500, Critter [EMAIL PROTECTED] wrote: yeah... i got the greeting thing... according to the book i have... for(String g : greeting) is a new JDK 5.0 feature rather than the traditional for(i=0...etc..) On Tue, 21 Dec 2004 08:40:07 -0800, Spike [EMAIL PROTECTED] wrote: You have a couple of problems with the syntax of your code: 1. You need to declare the greeting array as an array of strings before using it: String[] greeting = new String[2] 2. The syntax of your for loop is invalid. I'd do it like this: for (int i=0;igreeting.length ; i++) { System.out.println(greeting[i]); } So the whole thing would be: * public class Welcome { public static void main(String[] args) { String[] greeting = new String[2] greeting[0] = Welcome; greeting[1] = howdy; for (int i=0;igreeting.length ; i++) System.out.println(greeting[i]); } } Spike Critter wrote: I am just trying to build a simple class file using eclipse.. but I keep getting syntax errors.. public class Welcome { public static void main(String[] args) { greeting[0] = Welcome; greeting[1] = howdy; for (String g : greeting) System.out.println(g); } } Severity Description ResourceIn Folder LocationCreation Time 2 Syntax error on token ), invalid AssignmentOperatorWelcome.javaWelcome line 20 December 21, 2004 10:51:12 AM 2 Syntax error on token(s), misplaced construct(s) Welcome.javaWelcome line 20 December 21, 2004 10:51:12 AM i am thinking it has to do with maybe eclipse using the wrong jre... but i am not sure.. I've pointed eclipse to use the newer jdk.. (i think..) any suggestions? -- Stephen Milligan Code poet for hire http://www.spike.org.uk Do you cfeclipse? http://cfeclipse.tigris.org ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188420 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54