[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

newbie question about java environment variables

Posted on 2007-03-27
6
Medium Priority
?
420 Views
Last Modified: 2013-11-23
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 ?




0
Comment
Question by:Mutley2003
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Author Comment

by:Mutley2003
ID: 18804763
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.

0
 
LVL 26

Expert Comment

by:ksivananth
ID: 18804921
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.
0
 

Author Comment

by:Mutley2003
ID: 18805086
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>
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Accepted Solution

by:
objects earned 1000 total points
ID: 18805105
u shouldn't be inclusing the .class extension, just:

java KEAModelBuilder
0
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 1000 total points
ID: 18809401
Mutley2003, have a look at this to understand classpath:

http://www.experts-exchange.com/Programming/Languages/Java/Q_22450095.html#18722480
0
 

Author Comment

by:Mutley2003
ID: 18821051
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.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question