Re: no applications
From: Andrew Thompson (SeeMySites_at_www.invalid)
Date: 05/30/04
- Next message: Andrew Thompson: "Re: Squeezy Applet - Pushing the limits"
- Previous message: RobertMaas_at_YahooGroups.Com: "Re: Somewhat of a big lie about OO in java book?"
- In reply to: Ryan Stewart: "Re: no applications"
- Next in thread: Pat Brady: "Re: no applications"
- Reply: Pat Brady: "Re: no applications"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 30 May 2004 04:40:37 GMT
On Sat, 29 May 2004 20:31:49 -0500, Ryan Stewart wrote:
> "Pat Brady" <no56@eircom.net> wrote in message
...
>> i dont run apps/applets from the cmd prompt, normally i click
>> tools - run app/applet in textpad, so this cmd prompt stuff is
>> a bit off the wall for me (please bear with me)
>>
> *nudges Andrew* Where are those anti-command-line junkies?
(chuckles) They vanish quickly at times like this!
...
> No. The classpath is where Java looks for class files, not where it looks
> for java.exe. Hence setting the classpath to the current directory (via
> "-classpath .") will usually solve your NoClassDefFoundErrors. If you don't
> *need* the classpath for anything (you probably don't), you can just remove
> the classpath environment variable, and it will default to the current
> directory.
Something I did not make clear. That idea of adding
the current directory to the class path only works when
you are 'inside' the directory with the .class file.
If you're .java and .class is located..
C:\javatest\projectA\> dir
TestRun.java
TextRun.class
..then you need to put a .bat file in the directory..
'runTheProject.bat' containing the single line..
java -cp . TestRun
So your directory may now look like..
C:\javatest\projectA\> dir
TestRun.java
TextRun.class
runTheProject.bat
If you double click 'runTheProject.bat'
the diectory 'C:\javatest\projectA\'
will be added to the classpath and
'C:\javatest\projectA\TestRun.class'
will be visible to Java..
-- Andrew Thompson http://www.PhySci.org/ Open-source software suite http://www.PhySci.org/codes/ Web & IT Help http://www.1point1C.org/ Science & Technology
- Next message: Andrew Thompson: "Re: Squeezy Applet - Pushing the limits"
- Previous message: RobertMaas_at_YahooGroups.Com: "Re: Somewhat of a big lie about OO in java book?"
- In reply to: Ryan Stewart: "Re: no applications"
- Next in thread: Pat Brady: "Re: no applications"
- Reply: Pat Brady: "Re: no applications"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|