Link to home
Start Free TrialLog in
Avatar of Mutley2003
Mutley2003

asked on

newbie question about java environment variables

Hi, absolute newbie to Java here.

I am trying to run a java app called KEA on XP. (fyi, it is KEA 3.0 and the URL is http://www.nzdl.org/Kea/download.html)

OK, I have unpacked it and I don't know where to start.

I do have the JRE installed at C:\Program Files\Java\jre1.5.0_11, and I know java works because I can type java at the command line and get a listing of the switches.

The readme for KEA says
"
To run KEA you need to tell the Java Virtual Machine where to look for KEA classes.  One possible way of
doing this is to add the directory that contains this README file to
the CLASSPATH environment variable that is used by the Java Virtual
Machine.

Under Linux you would do the following:

a) Set KEAHOME to be the directory which contains this README.

b) Add $KEAHOME to your CLASSPATH environment variable.

"

Now, I don't appear in my DOS environment settings to have anything called CLASSPATH, and I don't know how to "set KEAHOME".

Can you please help me with these very basic steps, and then the next one. What do I type in to make KEA run?

java KEA ?




Avatar of Mutley2003
Mutley2003

ASKER

actually the last part is answered in the readme
"
   java KEAModelBuilder -l <name_of_directory> -m <name_of_model>
"

but I still don't know how to set the "environment" varriables that java expects.

in windows,

1. right click "My Compute" icon in desktop.
2. Click Properties.
3. Click "Advanced" tab.
4. Click "environment Variables" button.
5. There add "KEAHOME" or class path as you want.
I am still stuck. Here is the output of the dos session.

You will note that I have the current directory on c: set to the java bin, and the current directory on f: set to the kea directory where the class is, but I get

F:\KEA3~1.0\KEA-3.0>c:java KEAModelBuilder.class
Exception in thread "main" java.lang.NoClassDefFoundError: KEAModelBuilder/class


F:\KEA3~1.0\KEA-3.0>c:java KEAModelBuilder.java
Exception in thread "main" java.lang.NoClassDefFoundError: KEAModelBuilder/java

The environment variables are set as below, specifically

F:\KEA3~1.0\KEA-3.0>set
CLASSPATH=$KEAHOME
CLIENTNAME=Console
KEAHOME=F:\Kea 3.0\KEA-3.0
PATH=C:\PROGRA~1\COMMON~1\INSTALLSHIELD;"C:\PROGRA~1\MICROSOFTPLATFORMSDK\BIN\WI
N95.";"C:\PROGRA~1\MICROSOFTPLATFORMSDK\BIN\.";

--------------------------------------------

F:\KEA3~1.0\KEA-3.0>c:

C:\PROGRA~1\JAVA\JRE15~1.0_1\BIN>dir
 Volume in drive C is SYSTEM
 Volume Serial Number is 146D-12FB

 Directory of C:\PROGRA~1\Java\JRE15~1.0_1\bin

snip
15/12/06  03:23 AM           118,890 java.dll
15/12/06  01:30 AM            49,248 java.exe
snip
              65 File(s)      6,911,068 bytes
               3 Dir(s)  30,194,434,048 bytes free

C:\PROGRA~1\JAVA\JRE15~1.0_1\BIN>f:

F:\KEA3~1.0\KEA-3.0>dir
 Volume in drive F is INSTALLERS
 Volume Serial Number is B27F-58FF

 Directory of F:\KEA3~1.0\KEA-3.0

28/03/07  10:16 AM    <DIR>          .
28/03/07  10:16 AM    <DIR>          ..
19/03/04  05:50 PM    <DIR>          doc
19/03/04  05:50 PM             9,052 KEAKeyphraseExtractor.class
21/05/01  08:30 PM    <DIR>          weka
16/03/04  11:10 AM               101 ACKNOWLEDGMENTS
18/05/01  04:29 PM    <DIR>          Chinese_test
19/03/04  05:50 PM            12,215 StopwordsEnglish.class
16/03/04  04:44 PM            18,356 KEAModelBuilder.java
18/03/04  01:43 PM             9,646 README
16/03/04  02:27 PM             1,757 Stemmer.java
16/03/04  02:27 PM             1,195 Stopwords.java
16/03/04  05:13 PM            10,727 GermanStemmer.java
22/05/01  01:21 PM    <DIR>          CSTR_abstracts_test
19/03/04  05:19 PM            14,263 KEAKeyphraseExtractor.java
19/03/04  05:50 PM             6,417 StopwordsGerman.class
18/05/01  11:30 AM             1,579 Counter.java
19/03/04  05:50 PM               899 Stemmer.class
19/03/04  05:50 PM             1,201 IteratedLovinsStemmer.class
19/03/04  05:50 PM             6,174 KEAPhraseFilter.class
19/03/04  05:50 PM               608 Counter.class
19/03/04  05:50 PM            10,139 KEAModelBuilder.class
19/03/04  05:21 PM            42,324 KEAFilter.java
19/03/04  05:50 PM             2,974 NumbersFilter.class
16/03/04  02:12 PM            23,964 LovinsStemmer.java
16/03/04  02:07 PM            19,111 StopwordsEnglish.java
19/03/04  05:50 PM               265 Stopwords.class
18/05/01  04:06 PM    <DIR>          Chinese_train
19/03/04  05:50 PM            17,930 KEAFilter.class
18/05/01  11:38 AM            13,667 KEAPhraseFilter.java
16/03/04  02:07 PM            10,687 StopwordsGerman.java
16/03/04  02:00 PM             2,059 IteratedLovinsStemmer.java
19/03/04  05:50 PM             3,240 GermanStemmer.class
18/05/01  11:38 AM             5,483 NumbersFilter.java
22/05/01  01:23 PM    <DIR>          CSTR_abstracts_train
18/05/01  11:42 AM            17,977 COPYING
19/03/04  05:50 PM            14,764 LovinsStemmer.class
28/03/07  11:18 AM             3,339 ContextInfo.log
              30 File(s)        282,113 bytes
               8 Dir(s)  10,009,395,200 bytes free

F:\KEA3~1.0\KEA-3.0>c:java
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)
snip

F:\KEA3~1.0\KEA-3.0>c:java KEAModelBuilder.class
Exception in thread "main" java.lang.NoClassDefFoundError: KEAModelBuilder/class


F:\KEA3~1.0\KEA-3.0>c:java KEAModelBuilder.java
Exception in thread "main" java.lang.NoClassDefFoundError: KEAModelBuilder/java

F:\KEA3~1.0\KEA-3.0>set
COMSPEC=C:\WINDOWS\SYSTEM32\COMMAND.COM
ALLUSERSPROFILE=C:\DOCUME~1\ALLUSE~1
APPDATA=C:\DOCUME~1\JOHNAI~1\APPLIC~1
CLASSPATH=$KEAHOME
CLIENTNAME=Console
COMMONPROGRAMFILES=C:\PROGRA~1\COMMON~1
COMPUTERNAME=J3
HOMEDRIVE=C:
HOMEPATH=\Documents and Settings\John Aitchison
KEAHOME=F:\Kea 3.0\KEA-3.0
LOGONSERVER=\\J3
NUMBER_OF_PROCESSORS=1
OS=Windows_NT
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PROCESSOR_ARCHITECTURE=x86
PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 9, GenuineIntel
PROCESSOR_LEVEL=15
PROCESSOR_REVISION=0409
PROGRAMFILES=C:\PROGRA~1
PROMPT=$p$g
QL_DIR=e:\Program Files\QuantLib
SESSIONNAME=Console
SYSTEMDRIVE=C:
SYSTEMROOT=C:\WINDOWS
TEMP=C:\WINDOWS\TEMP
TMP=C:\WINDOWS\TEMP
USERDOMAIN=J3
USERNAME=John Aitchison
USERPROFILE=C:\DOCUME~1\JOHNAI~1
WINBOOTDIR=C:\WINDOWS
BLASTER=A220 I5 D1 P330 T3
BASEMAKE=C:\Progra~1\Microsoft Platform SDK\Include\BKOffice.Mak
BKOFFICE=C:\Progra~1\Microsoft Platform SDK\.
DXSDKROOT=C:\Progra~1\Microsoft Platform SDK\.
INCLUDE=C:\Progra~1\Microsoft Platform SDK\Include\.
INETSDK=C:\Progra~1\Microsoft Platform SDK\.
LIB=C:\Progra~1\Microsoft Platform SDK\Lib\.
MSSDK=C:\Progra~1\Microsoft Platform SDK\.
MSTOOLS=C:\Progra~1\Microsoft Platform SDK\.
WNHOME=C:\Program Files\Wordnet1.6
WNHOMEUX=C:\Program Files\Wordnet1.6
TCL_LIBRARY=C:\Program Files\Wordnet1.6\LIB\TCL7.6
TK_LIBRARY=C:\Program Files\Wordnet1.6\LIB\TK4.2
PATH=C:\PROGRA~1\COMMON~1\INSTALLSHIELD;"C:\PROGRA~1\MICROSOFTPLATFORMSDK\BIN\WI
N95.";"C:\PROGRA~1\MICROSOFTPLATFORMSDK\BIN\.";

F:\KEA3~1.0\KEA-3.0>
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thankyou, people.  It was I think a classpath problem, and maybe also because I had some spaces in the path. Anyway, it is going now, so .. thanks for the help.