Re: no applications

From: Pat Brady (no56_at_eircom.net)
Date: 05/30/04


Date: Sun, 30 May 2004 19:25:37 +0100


"Andrew Thompson" <SeeMySites@www.invalid> wrote in message
news:1hybrgbn1qx60.osi3q8d5kr78.dlg@40tude.net...
> 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

doods

ive no idea what yer on about

however
ive uninstalled all the java stuff
then installed it all again

and for sure it all works
(i.e. compile/run from textpad)

im not certain about the cmd prompt stuff
so i think i'll leave it for now
is it that necessary ?
are there any good books/sites explaining
about it ?
ive got 'HeadFirstJava' and Deitel 'How to ...'
but both of these seem to expect you to know this
stuff

i guess its 'Command Prompt for Dummies' for me !

this is my first time using a newsgroup and i have to
say the vibe is excellent

Andrew, ive made a small (i am a student) donation
to your site
keep up the good work

thanks a mill

pat



Relevant Pages

  • Re: javac vs Makefile problem ...
    ... any Java class even if the Java source did not change. ... javac uses the directory as specified with -d to store compiled .class files, however, it does not automatically search in that directory when looking for type information. ... Instead, it uses the classpath, and, when defined, the sourcepath to search for classes and source code. ... Some time ago I considered to write a special make for Java, which allows to specify cyclic dependencies, and does the grouping into sets of cyclic dependent source code internally. ...
    (comp.lang.java.programmer)
  • Re: no applications
    ... They vanish quickly at times like this! ... The classpath is where Java looks for class files, ...
    (comp.lang.java.help)
  • Re: Compiling and Running with the JDK
    ... Sounds like your classpath is not set correctly - its an environment ... variable that is used to find class files. ... java -classpath. ...
    (comp.lang.java.programmer)
  • Re: PATH
    ... > there is a classpath that Java uses to find its class files. ... The path statement that tells the system where Java is. ...
    (alt.os.linux.suse)
  • Re: Corsaire Security Advisory: ChainKey Java Code Protection Bypass issue
    ... Security Manager -> Interpreter All 4 of these sub-components are part ... Classloader that accepts encrypted .class files if you are talking about ... server-side Java. ... and you can customize that to force encryption. ...
    (Bugtraq)