Author Topic: Java class path error checking  (Read 972 times)

rygaard

  • Community Member
  • Posts: 63
  • Hero Points: 1
Java class path error checking
« on: September 07, 2022, 02:02:08 PM »
In Build->Java Options, in the Classpath tab, it would be very helpful to highlight invalid entries.

Sometimes when I restructure directories in my Java project, I need to update the class path.  When this happens, it is all too easy to forget to update the class path in SlickEdit.  Occasionally this will go undetected for a long time, then cause cause problems that can be quite confusing.  It would be helpful if SlickEdit did some rudimentary error checking of its class path.

For each entry in the list:

   if ( entry does not exist )
   {
      highlight the entry
   }
   else if ( entry should be a file )
   {
      if ( entry is a directory )
      {
         highlight the entry
      }
   }
   else if ( entry should be a directory )
   {
      if ( entry is a file )
      {
         highlight the entry
      }
   }
   else if ( entry appears higher in the list )
   {
      highlight the entry
   }


I don't think in-depth error checking is needed.  Examples of overkill include:
  • Confirm that JAR files are valid zip files
  • Confirm that there are .java or .class files below each directory

(I have created a command-line tool to inspect the system classpath and point out these errors, and it has saved me a LOT of time).