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 ?
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 ?
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.
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.
ASKER
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.NoClassDefFoundE rror: KEAModelBuilder/class
F:\KEA3~1.0\KEA-3.0>c:java KEAModelBuilder.java
Exception in thread "main" java.lang.NoClassDefFoundE rror: 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\ INSTALLSHI ELD;"C:\PR OGRA~1\MIC ROSOFTPLAT FORMSDK\BI N\WI
N95.";"C:\PROGRA~1\MICROSO FTPLATFORM SDK\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.clas s
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.clas s
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.NoClassDefFoundE rror: KEAModelBuilder/class
F:\KEA3~1.0\KEA-3.0>c:java KEAModelBuilder.java
Exception in thread "main" java.lang.NoClassDefFoundE rror: KEAModelBuilder/java
F:\KEA3~1.0\KEA-3.0>set
COMSPEC=C:\WINDOWS\SYSTEM3 2\COMMAND. COM
ALLUSERSPROFILE=C:\DOCUME~ 1\ALLUSE~1
APPDATA=C:\DOCUME~1\JOHNAI ~1\APPLIC~ 1
CLASSPATH=$KEAHOME
CLIENTNAME=Console
COMMONPROGRAMFILES=C:\PROG RA~1\COMMO N~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;.CM D;.VBS;.VB E;.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\JO HNAI~1
WINBOOTDIR=C:\WINDOWS
BLASTER=A220 I5 D1 P330 T3
BASEMAKE=C:\Progra~1\Micro soft Platform SDK\Include\BKOffice.Mak
BKOFFICE=C:\Progra~1\Micro soft Platform SDK\.
DXSDKROOT=C:\Progra~1\Micr osoft Platform SDK\.
INCLUDE=C:\Progra~1\Micros oft Platform SDK\Include\.
INETSDK=C:\Progra~1\Micros oft Platform SDK\.
LIB=C:\Progra~1\Microsoft Platform SDK\Lib\.
MSSDK=C:\Progra~1\Microsof t Platform SDK\.
MSTOOLS=C:\Progra~1\Micros oft 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\ INSTALLSHI ELD;"C:\PR OGRA~1\MIC ROSOFTPLAT FORMSDK\BI N\WI
N95.";"C:\PROGRA~1\MICROSO FTPLATFORM SDK\BIN\." ;
F:\KEA3~1.0\KEA-3.0>
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
Exception in thread "main" java.lang.NoClassDefFoundE
F:\KEA3~1.0\KEA-3.0>c:java
Exception in thread "main" java.lang.NoClassDefFoundE
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\
N95.";"C:\PROGRA~1\MICROSO
--------------------------
F:\KEA3~1.0\KEA-3.0>c:
C:\PROGRA~1\JAVA\JRE15~1.0
Volume in drive C is SYSTEM
Volume Serial Number is 146D-12FB
Directory of C:\PROGRA~1\Java\JRE15~1.0
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
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.clas
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.clas
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
Exception in thread "main" java.lang.NoClassDefFoundE
F:\KEA3~1.0\KEA-3.0>c:java
Exception in thread "main" java.lang.NoClassDefFoundE
F:\KEA3~1.0\KEA-3.0>set
COMSPEC=C:\WINDOWS\SYSTEM3
ALLUSERSPROFILE=C:\DOCUME~
APPDATA=C:\DOCUME~1\JOHNAI
CLASSPATH=$KEAHOME
CLIENTNAME=Console
COMMONPROGRAMFILES=C:\PROG
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;.CM
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\JO
WINBOOTDIR=C:\WINDOWS
BLASTER=A220 I5 D1 P330 T3
BASEMAKE=C:\Progra~1\Micro
BKOFFICE=C:\Progra~1\Micro
DXSDKROOT=C:\Progra~1\Micr
INCLUDE=C:\Progra~1\Micros
INETSDK=C:\Progra~1\Micros
LIB=C:\Progra~1\Microsoft Platform SDK\Lib\.
MSSDK=C:\Progra~1\Microsof
MSTOOLS=C:\Progra~1\Micros
WNHOME=C:\Program Files\Wordnet1.6
WNHOMEUX=C:\Program Files\Wordnet1.6
TCL_LIBRARY=C:\Program Files\Wordnet1.6\LIB\TCL7.
TK_LIBRARY=C:\Program Files\Wordnet1.6\LIB\TK4.2
PATH=C:\PROGRA~1\COMMON~1\
N95.";"C:\PROGRA~1\MICROSO
F:\KEA3~1.0\KEA-3.0>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
ASKER
"
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.