Author Topic: Add Jar Wildcard... is always recursive.  (Read 669 times)

rygaard

  • Community Member
  • Posts: 63
  • Hero Points: 1
Add Jar Wildcard... is always recursive.
« on: September 09, 2022, 01:35:20 AM »
If I add JARs to the SlickEdit class path using Add Jar Wildcard..., it always includes all JARs in all subdirectories below the selected directory.  This causes compile problems and makes my classpath dramatically longer.

Once I tracked down the problem, I reproduced it this way:
  • I created a directory structure containing JARs in its root and in its subdirectories.
  • I placed this new directory on a drive other than the drive containing my SlickEdit project.
  • I added the new directory to the SlickEdit class path using Build->Java Options, on the Classpath tab, using the Add Jar Wildcard... button.  I made sure the Recursive check box was deselected.
  • I invoked project-compile, using a keyboard shortcut.  I captured the command line that wrote to the build window.  (Because the JARs were on a different drive, project-compile listed them explicitly on the command line instead of listing them in its temporary JAR file.)
The JARs in the subdirectories were explicitly listed on the command line.

I would prefer that you didn't touch my classpath.  However, if you do something with my classpath, you MUST let me know what you are doing.  When I run into problems, visibility into what is happening can help me understand what is going wrong.  Just as importantly, it will help me understand if the bug is mine or SlickEdit's.

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Add Jar Wildcard... is always recursive.
« Reply #1 on: September 09, 2022, 06:45:07 PM »
That is definitely a bug.  It is always doing a recursive file match for jar file wildcards. 

I'm taking a look it it.  It is hot fixable.
 

patrick

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1818
  • Hero Points: 151
Re: Add Jar Wildcard... is always recursive.
« Reply #2 on: September 14, 2022, 02:38:00 PM »
I'm finishing up testing for the fix for this today.  It will be in the next v26 hotfix.  With it, the "recursive" checkbox for Add Wildcards will take effect when adding wildcards for jar files.  I noticed that Add Path would also show a "recursive" checkbox, I've removed that, as recursive searches were only ever supported for wildcards, and never done for a class search path.

One caveat.  When you apply this fix, you will find that your project will continue to do the recursive searches for your existing class path wildcards, until you remove and re-add the wildcard entries.   Wildcards added before the fix will keep the original recursive behavior  Wildcards added after the fix  will follow the setting given in the Add Wildcards dialog box.