Add own Class to CLASSPATH [message #194971] |
Mon, 19 February 2007 05:42  |
Eclipse User |
|
|
|
Originally posted by: roland.kluge.gmx.de
Hello!
I have got a problem which makes me despair!!
I want to define an own class in a separate .java file, e.g. called
"Window.java"
Now I want a programm (PasswordCheck.java) to use this newly defined
class "Window"!
The recommended command for this is
import Window;
....
PasswordWindow = new Window();
....
etc.
I have to code provided in a tutorial, so this should work!
My problem is that I do not manage to make Eclipse use Window.java /
Window.class as an alternative CLASSPATH.
Can anybody give me advise how to deal with this problem???
Thank You in advance!!
Roland
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Add own Class to CLASSPATH [message #195287 is a reply to message #195105] |
Tue, 20 February 2007 20:44  |
Eclipse User |
|
|
|
Originally posted by: dtoland.email.uophx.edu
Yes, thank you, I do know that.
--
Dave Toland
dave.toland@verizon.net
"GinKGO" <ginkgo_w@yahoo.com.cn> wrote in message news:rnukt2top8e9ohsamktdfvse4hj9ksni2v@4ax.com...
| On Mon, 19 Feb 2007 20:26:07 -0500, "Dave Toland"
| <dtoland@email.uophx.edu> wrote:
|
| >I stand corrected, then. Thank you for straightening me out on that. I find it
| >surprising, and guess that it must be a bit of a maintenance headache, but would
| >certainly have advantages.
|
| I think you should know the classpath that eclipse used is not the
| classpath that you defined with "CLASSPATH" in your system path
| variable.
|
| Eclipse use his own management. if you explore your project folder,
| you will find a .classpath file. It is a xml file define the classpath
| that eclipse used.
|
| In [Window]->[Preferences]->[java]->[build path] or [installed jre].
|
| when you need Window.class, you should add this by using [context
| menu] -> [build path].
|
| BTW. if you run your program out the eclipse you should add the
| Window.class to your system CLASSPATH.
|
|
|
Powered by
FUDForum. Page generated in 0.36281 seconds