Author Topic: Different classpath for Live Errors and antmake  (Read 7072 times)

RobFreundlich

  • Community Member
  • Posts: 47
  • Hero Points: 2
Different classpath for Live Errors and antmake
« on: June 06, 2007, 05:51:00 PM »
I'm on a team developing a multi-component Java app.  I've set up a SE project for my stuff, and another for the rest of the stuff.

When I first turned on Live Errors, I was getting "no symbol" errors for "other stuff" symbols, so I added the jarfile for the other stuff to my project's SE classpath.  Now, when I run my ant-based build, I get errors.  Those errors go away if I remove the "other stuff" jarfile from my SE classpath.

Obviously, having otherStuff.jar in the classpath when calling ant is problematic - I think it's because the ant scripts are trying to build classes that end up in otherStuff.jar, and that confuses the compiler.

Is there any way to tell antmake to *not* use the SE classpath?  My ant scripts take care of referencing everything necessary, so in my case, the SE classpath is *only* for Live Errors, so this would solve my problem.

If there isn't a way, my choices are to either turn off Live Errors or to replace the Build and Rebuild commands with my own ant calls that don't go through antmake.  I'd prefer to not do either.

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Different classpath for Live Errors and antmake
« Reply #1 on: June 09, 2007, 08:13:42 PM »
Well I took a few minutes to try to hack you up a fix...but I couldn't find anything I could do just with SlickC that would provide an appropriate solution.  It looks like vsbuild is directly getting this classpath value for itself, so a fix for this might have to wait until I can get you a new vsbuild.exe. 

As far as a long term solution is concerned, what would you like to see?  I would think there are people out there who would want antmake to reference the SE classpath that they have set up...so maybe just a toggle option under Java Options > Classpath? 

- Ryan

buggyfunbunny

  • Senior Community Member
  • Posts: 233
  • Hero Points: 4
Re: Different classpath for Live Errors and antmake
« Reply #2 on: June 10, 2007, 02:47:36 PM »
When LiveError first appeared, it wouldn't work with the project SourcePath.  One had to build it all into the classpath.  Moreover, LiveError will only work with 1.6.  Has any of this changed?

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Different classpath for Live Errors and antmake
« Reply #3 on: June 10, 2007, 05:07:47 PM »
Quote
When LiveError first appeared, it wouldn't work with the project SourcePath.  One had to build it all into the classpath.

Right now, any source that is not compiled must be added to the project.  Live Errors builds the sourcepath that it needs from the all of the source in your project, and any external source must be compiled and placed in the classpath.  You have other source that you are specifying in Java Options > Compiler > Other Options as "-sourcepath /path/to/source"?  We should be able to get Live Errors working with this sourcepath specification for 12.0.2.

Quote
Moreover, LiveError will only work with 1.6

This will not change...Live Errors will only work with JDK 1.6 or later because we make use of some tools added in 1.6.  Note that there is no requirement that you build your code with 1.6, there is a separate JDK specification for Live Errors.  Also, Live Errors will use the source compliance level you have set under Java Options > Compiler > Source Compliance level...so if you would like Live Errors to generate messages based on JDK 1.4, you can still accomplish this.

- Ryan

RobFreundlich

  • Community Member
  • Posts: 47
  • Hero Points: 2
Re: Different classpath for Live Errors and antmake
« Reply #4 on: June 10, 2007, 08:59:33 PM »
Well I took a few minutes to try to hack you up a fix...but I couldn't find anything I could do just with SlickC that would provide an appropriate solution.  It looks like vsbuild is directly getting this classpath value for itself, so a fix for this might have to wait until I can get you a new vsbuild.exe. 

I've got a short-term fix - I added all of the code I might be relying on to my project, rather than splitting things into multiple projects.  This puts all of the project code into the "all of the source in your project" category, and thus eliminates my need for putting anything in classpath.  Not great for long-term, but for now, I can live with it if it means you can concentrate on the long-term solution instead of a short-term new version of vsbuild.exe.

As far as a long term solution is concerned, what would you like to see?  I would think there are people out there who would want antmake to reference the SE classpath that they have set up...so maybe just a toggle option under Java Options > Classpath? 

I'm not so sure that anyone would want antmake to work this way - all of the uses I've ever seen of ant had explicit classpaths set up within the build.xml files, so no external classpath was needed.  But I'm all in favor of options, so I think your idea of an option (defaulted to "don't use this for antmake") would be fine.

Thanks!
Rob

Ryan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 986
  • Hero Points: 77
Re: Different classpath for Live Errors and antmake
« Reply #5 on: June 15, 2007, 04:08:36 PM »
This issue will be fixed in 12.0.2. 

Regarding the external sourcepath for Live Errors, we are going to change the Java Options dialog for SlickEdit 2008 to provide more support for specifying sourcepath directories, and this change will be incorporated in that release.

- Ryan