Re: Running a Java Program



On my system at home I have a .bat file containing:
c:\j2sdk1.4.2_10\bin\java Submit. I run that bat file from the directory
that contains Submit.class, and it works. When I do then same thing on my
system at work I get the error message I listed before.
"Lew" <lew@xxxxxxxxxxx> wrote in message
news:KYadnYP424oWPt_YnZ2dnUVZ_u2dnZ2d@xxxxxxxxxxxxxx
jerry wrote:
When I try to run a JAVA program I have compiled I get the following
error:
Exception in thread "main" java.lang.NoClassDefFoundError: test.
I am in the directory that contains the .class file. Why can't it be
found,
and how can I fix this problem?

Look up the "classpath" parameter to the java command.

BTW, class names should start with an upper-case letter.

- Lew


.



Relevant Pages

  • Re: Package Statement Problem
    ... Try putting a .bat file in the directory ... with the class file. ... rem: change to the root of the package ... java -classpath. ...
    (comp.lang.java.programmer)
  • Re: bad data from urllib when run from MS .bat file
    ... That should show whether python is seeing the identical input from the server. ... That would say whether line generation chunking on input ... BTW, what command line options are in use to start your interactive session ... Could the .BAT file be seeing a different environment? ...
    (comp.lang.python)
  • Re: VB6 Service cant run .bat file
    ... BTW, I can make this work by calling the executables directly in each line of the .bat file. ... But I would really like to know how to run a .bat file from a service in case I ever need to do it again. ... I'm sure there's some sort of a permissions issue with the account the service is running under but I've tried the local system account as well as the administrator's account and there is no difference. ...
    (microsoft.public.vb.general.discussion)