Kevin Knowles

Ranch Hand
+ Follow
since Dec 29, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Kevin Knowles

I have a java program that came with a book I purchased. The program consists of an *.exe file and many class files. None of the class files contain the equations used in the program, so I suppose those are in the exe file. My past experience with Java was that you don't create .exe files. If I am wrong and you can create exe files with Java, will someone please explain how that is done?
20 years ago
would like to see and example of dynamic arrays.
20 years ago
I'd like to know more about the XDoclet mentioned in the book excerpts.
Is it a free download somewhere? Does it operate similar to an IDE.

This code would call all of the parents constructors or methods. Is that correct?
21 years ago
In HashMap and other classes and in general, what is the difference between keys and values?
21 years ago
Someone in a different fourm said it had something to do with case sensitivenes. I
don't see how that applies here, the cases match.
???
???
[ June 30, 2003: Message edited by: Kevin Knowles ]
Dick,
I decided to just e-mail you a zipped project file. That way you can see what's going on quicker.
I think your suggestion worked a little bit, but when the message about the paths not matching went away another error message came up about unresolved class or something like that.
[ June 29, 2003: Message edited by: Kevin Knowles ]
P.S. - just thought I would note that the package should be in a "subdirectory underneath the root directory from which javi is run". I don't know how important that is because the packages meet that criteria I think.
[ June 29, 2003: Message edited by: Kevin Knowles ]
I have all of my paths set correctly as far as I can tell, but I'm getting this error message during compile.

I can not understand what the problem is. Will someone kindly explain?
[ June 29, 2003: Message edited by: Kevin Knowles ]
Well, the only problem I'm having now is with ant.
from the command prompt:

I don't understand why it keeps giving me the warning: JAVA_HOME environment variable is not set, because I've set the JAVA_HOME variable inside windows and again with my SetJavaEnv.bat file. The junit tests work fine now.
21 years ago
Ok, well I've partly solved the problem.
I have been following the junit and ant installation instrutctions. However, I am using WindowsXP (as I thought I stated previously), so I suppose that is part of the problem. For example, instead of entering set classpath= etc
(which is what I tried to do) I needed to enter (in my environment variable settings) variable classpath and under Value
".;%classpath%;c:\junit3\junit.jar;." (I read after doing some searches that I need the ".;" first in the classpath definition) and then at the prompt I need to type in set classpath and it sets the classpath for me. However, for ant and java I wound up putting the home paths in the path variable. Maybe I should define the ant_home and Java_home in the variable settings and use a batch file to set those and take them out of the path setting. What would you suggest?
21 years ago
All right, Richard, I copies JWhich.class to my C:\junit3 directory and from the console prompt switched to that directory. Here is what I got:

and

and

By the way, for some reason my "system" must not be accepting the classpath I set in the environment variable, because when I type
C:\junit3>Classpath
I get the following:
c:\junit3>classpath
'classpath' is not recognized as an internal or external command, operable program or batch file.
c:\junit3>
beside results from JWhich doesn't return a classpath.
P.S.- When I set classpath, this is what I get back:

[ June 26, 2003: Message edited by: Kevin Knowles ]
21 years ago
Reply to:
Richard Jensen
ranch hand
Member # 49873
All right, well, my user variables for Kevin are:
variable | value
--------------------------------------------------
set classpath | %classpath%;c:\junit3\junit.jar;.
set path | C:\windows\system32;%j2sdk1.4.1_03%\bin;c:\windows\system32;%c:\ant%\bin; (note: I'm not sure this is supposed to be here. It just showed up so I added the ant path to it too. I should prbably delete it.)
System Variables:
variable | value
--------------------------------------------------
set ANT_HOME |c:\ant;
set classpath|%classpath%;c:\junit\junit.jar;.
set JAVA_HOME|c:\j2sdk1.4.1_03;
set path |%path%;%ANT_HOME%\bin;.
-------------------------------------------------
Note: There are other a few other setttings in the above, but these are the ones pertaining to this thread.
The following are the results I get:


As I said before, if I manually set the classpath for junit from the Command Prompt and run the Java junit tests I get a Frame/window, but I can't tell about the results because there is a message at the bottom saying it can't find the AllTests or whatever.
21 years ago
Reply to:
Richard Jensen
ranch hand
Member # 49873
and others
I downloaded JWhich and tried to run it, but basically it's the same problem until I change to the C:\JWhich directory where I installed it, but it still says it can't find the AllTests class. I suppose this is the class I should be looking for. I've just been trying to test junit from the command line. If change directory to C:\junit3\junit\samples and try to run the 3 samples, I get the same error message as before. From JBuilder9 the error messages (unresolved classes as I remember) in the test *.java files have gone away. I suppose that is good, but the junit test files don't seem to run right until I enter the classpath definition from the command line.
I son't know how to use the test files yet anyway, they were just given to me as part of the project package I'm trying to work on.
21 years ago


Frank Carver
sheriff
Member # 27
posted June 26, 2003 08:40 AM
--------------------------------------------------------------------------------
I guess you need to add another ";." to the end of the classpath:
set classpath=%classpath%;c:\junit3\junit.jar;.
so it will find your classes in/under the "current directory" (.) too.


Thanks, Frank, but that doesn't work either.
What else should I try?
21 years ago


Frank Carver
sheriff
Member # 27
posted June 26, 2003 03:01 AM
--------------------------------------------------------------------------------
I'm guessing that should have been:
set classpath=%classpath%;c:\junit3\junit.jar
INSTALL_DIR is just a symbol indicating that you should use whatever directory you installed into


Right, I tried that two.
When I type in "set classpath=%classpath%;c:\junit3\junit.jar" on the command line and <enter> then when I run the tests the window or dialogue boxes come up for the 2nd and 3rd tests, but it says it can't find the tests in the dialogue boxes. In addition, in JBuilder9, it says the test files designated in the package can't be found (or resolved I think).
21 years ago