>> Unfortunately this is impossible due to the way the classloaders in
>> the
>> JVM work; you can't modify your classpath at runtime and have it work
>> consistently.

Doesn't this seem a little crazy though? My day job is Java dev in
Eclipse and a little IntelliJ and both IDEs allow you to modify
classpath at any time. It seems like it would be a basic requirement
for any IDE. Think of how often you do this. If I had to reboot
Eclipse every time I'd go crazy. Then throw in the lack of image
support and it becomes a real obstacle.

Does anyone know exactly when the JVM is booted for the REPL? Is it
from swank or clojure-mode or one of these systems? Couldn't there be
a way to reboot this subsystem instead of all Emacs?

Maybe from the command line you could execute the (add-to-list
'swank-clojure-extra-classpaths "/whatever") then reboot the subsystem
which invokes the JVM? Or modify the .emacs file and just reboot the
subsystem?

It's tough because I'm completely new to Emacs and I'm not clear on
how all the pieces fit together yet.


On Wed, Jul 8, 2009 at 7:14 PM,
mccraigmccraig<mccraigmccr...@googlemail.com> wrote:
>
> what's the problem with adding urls to the current ClassLoader ?
>
> i've seen remarks to the effect that it doesn't work well, but i don't
> understand why...
>
> c
>
> On 8 Jul 2009, at 17:37, Phil Hagelberg wrote:
>
>>
>> Robert Campbell <rrc...@gmail.com> writes:
>>
>>> The main reason this is an issue for me is during development I
>>> sometimes find I need another library added to my classpath. Right
>>> now
>>> the only way I know how to modify the classpath in Emacs is to change
>>> the .emacs file with an add-to-list 'swank-clojure-extra-classpaths
>>> and reboot. I think my looking for an image solution might be a
>>> cop-out itself; I need to learn Emacs better so I can figure out how
>>> to modify the classpath without rebooting.
>>
>> Unfortunately this is impossible due to the way the classloaders in
>> the
>> JVM work; you can't modify your classpath at runtime and have it work
>> consistently.
>>
>> The solution I've settled on is to have a static classpath; no matter
>> what the project is, my classpath is always the same:
>> src/:target/dependency/:target/classes/:test/
>>
>> When you need to add a new library, instead of putting the jar on the
>> classpath, just unpack the jar in the target/dependency directory.
>> Then
>> you can access it without restarting the JVM.
>>
>> -Phil
>>
>> >
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to