a compiling problem

hi,

I'm getting back into java after a long break and trying to learn j2ee ejb to make things extra difficult! I passed the SCJP exam over 3 years ago but haven't done much java since as my work took me along a different road.. anyway

I'm trying to compile the first example from O'reilly head first ejb and getting a compiler error when I can't see why

headfirst\AdviceBean.java:8: '}' expected

private String[] adviceStrings = {"One word: inappropriate.", "You might

want to rethink that haircut.", "Your boss will respect you if you tell him wha

t you REALLY think of him." "Visualize yourself with better clothes.", "Of cours

e you don't have to go to work today.", "Do you really think you should be leavi

ng the house like that?", "Read a book once a year whether you need to or not."}

;

^

1 error

I have a feeling its because my environment variables are not right.

CLASSPATH=.;C:\j2sdkee1.3\lib\j2ee.jar;c:\j2sdkee1.3\lib\j2ee.jar;C:\j2sdk1.4.2_

06\lib\tools.jar

J2EE_HOME=C:\j2sdkee1.3

JAVA_HOME=C:\j2sdk1.4.2_06

path=C:\j2sdkee1.3\bin;C:\j2sdk1.4.2_06\bin;C:\WINNT\system32;

this is becoming frustrating as I can't get my environment set up properly and I've spent about a day now fiddling around with no joy.

any help greatly appreciated,

cheers

chris gray

[1412 byte] By [christograya] at [2007-10-1 7:58:23]
# 1

i m working with apache-Tomcat server want this javasdk1.5 version to work with it.but after installation classpath is not proper giving always same error that jre file not located properly.even Java_Home=" " and J2ee_Home=" " both are not giving proper results.when trying to compile & execute programms getting exception in main i.e. com.sun.tools.javac.main is not found.where to find & solve this problem. here on command prompt i m giving javac Name.java command which is not validating. is Main.Compile(args) i have to give to for compilation purpose.i used java.j2ee for a very long time but settings never done.so now facing problem.Please help.

vj_m@javaa at 2007-7-9 20:49:33 > top of Java-index,Developer Tools,Java Compiler...
# 2

You missed a comma, before the Visualize element:

String[] adviceStrings = {"One word: inappropriate.", "You might want to rethink that haircut.", "Your boss will respect you if you tell him what you REALLY think of him."[b],[/b] "Visualize yourself with better clothes.", "Of course you don't have to go to work today.", "Do you really think you should be leaving the house like that?", "Read a book once a year whether you need to or not."};}

killerCodingNinjaMonkeya at 2007-7-9 20:49:33 > top of Java-index,Developer Tools,Java Compiler...
# 3

Should have been:

private String[] adviceStrings = {"One word: inappropriate.", "You might want to rethink that haircut.", "Your boss will respect you if you tell him what you REALLY think of him.", "Visualize yourself with better clothes.", "Of course you don't have to go to work today.", "Do you really think you should be leaving the house like that?", "Read a book once a year whether you need to or not."};

killerCodingNinjaMonkeya at 2007-7-9 20:49:33 > top of Java-index,Developer Tools,Java Compiler...
# 4
I missed that, thanks, I thought it must be something much more than that, oh well I guess it will be a big task for me until I become familiar with all this stuff again.the String array is public though, not private.cheersChris
christograya at 2007-7-9 20:49:33 > top of Java-index,Developer Tools,Java Compiler...