DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Guest

    classpath issues

    Currently, if I try to execute a java class file I get the 'Exception in
    thread "main" java.lang.NoClassDefFoundError: ClassName' error though I have
    the directory that contains the file in the classpath. If I then type 'set
    classpath=' and then execute the java class file it executes successfully.
    Is my classpath corrupt...or what can I do to fix the problem? I've looked
    through my classpath several times and no problems stand out.

    Thanks-
    John



  2. #2
    Paul Clapham Guest

    Re: classpath issues

    If it works when you set the classpath, then that means your classpath
    wasn't set up correctly before you typed 'set classpath=...'. To find out
    what's really in your classpath, just type 'SET' at the command line.
    You'll get a list of all your environment variables, including CLASSPATH.
    Perhaps you have a space in it? That doesn't work in all environments (e.g.
    Windows 98).

    PC2

    <tony> wrote in message news:3a8c0027@news.devx.com...
    > Currently, if I try to execute a java class file I get the 'Exception in
    > thread "main" java.lang.NoClassDefFoundError: ClassName' error though I

    have
    > the directory that contains the file in the classpath. If I then type

    'set
    > classpath=' and then execute the java class file it executes successfully.
    > Is my classpath corrupt...or what can I do to fix the problem? I've

    looked
    > through my classpath several times and no problems stand out.
    >
    > Thanks-
    > John
    >
    >




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links