[OT] Eclispe and Java

2004-12-21 Thread Critter
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

2004-12-21 Thread Michael Greenberg
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

2004-12-21 Thread Mark Drew
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

2004-12-21 Thread Greg Stewart
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

2004-12-21 Thread Critter
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

2004-12-21 Thread Qasim Rasheed
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

2004-12-21 Thread Spike
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

2004-12-21 Thread Critter
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

2004-12-21 Thread Lewis Sellers
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

2004-12-21 Thread Spike
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

2004-12-21 Thread Rob
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

2004-12-21 Thread Critter
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

2004-12-21 Thread Rob
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