> And the code for Exercise2.java (which tries to import the MyClass file):
>
[quoted text clipped - 6 lines]
> }
> }
m.showMe() should read: m.greeting(). I made a mistake with copy/pasting the
code. In my code the method names are identical. So this is not the problem
;-)
Figured it out myself. For some reason the CLASSPATH variable wouldn't get
propagated to UltraEdit, from which I compile and run the programs. I had to
explicitly give the classpath as an argument to the javac and java commands
to make it work (e.g. java -classpath ".;c:\java\mylib" Exercise2). Still it
boggles me why UltraEdit doesn't seem to use the classpath environment
variable while it works perfectly from the command line prompt.
Owen Jacobson - 01 Mar 2006 15:12 GMT
> Figured it out myself. For some reason the CLASSPATH variable wouldn't get
> propagated to UltraEdit, from which I compile and run the programs. I had to
> explicitly give the classpath as an argument to the javac and java commands
> to make it work (e.g. java -classpath ".;c:\java\mylib" Exercise2). Still it
> boggles me why UltraEdit doesn't seem to use the classpath environment
> variable while it works perfectly from the command line prompt.
Under Windows, the 'SET' command doesn't propagate back to the GUI. Check
under Control Panel/System/Advanced/Environment Variables instead, then
*restart UltraEdit*. Windows programs acquire their environment at
startup, and don't receive changes from the outside world.
-Owen
jussij@zeusedit.com - 02 Mar 2006 00:05 GMT
> Still it boggles me why UltraEdit doesn't seem to use the classpath
> environment variable while it works perfectly from the command line
> prompt.
As a test you could create a batch file that looks like this:
Set classpath
and run this batch file from within UltraEdit. The captured
output should show the current system wide classpath value.
If the classpath displayed above is not complete then you
need to use the control panel to setup the classpath.
Jussi Jumppanen
Author: Zeus for Windows Java IDE
http://www.zeusedit.com