class name clashes on importing classes of same name from different Java packages into the same clojure namespace...

445 views
Skip to first unread message

Sunil S Nandihalli

unread,
Oct 18, 2012, 11:27:58 AM10/18/12
to clo...@googlegroups.com
Hi Everybody,
class name  clashes on importing same named classes from different java-packages into same clojure namespace. Is this expected. I think that it should be possible to import them and can be used by completely qualifying the class name with the appropriate java-package name. 
Thanks,
Sunil.

Sunil S Nandihalli

unread,
Oct 18, 2012, 11:30:36 AM10/18/12
to clo...@googlegroups.com
Am I doing it wrong ? is there a way to get around this?.. I guess I pressed the send button before I completed the email.. 

Thanks,
Sunil.

Tassilo Horn

unread,
Oct 18, 2012, 11:37:17 AM10/18/12
to clo...@googlegroups.com
Sunil S Nandihalli <sunil.na...@gmail.com> writes:

Hi!

> class name clashes on importing same named classes from different
> java-packages into same clojure namespace. Is this expected.

Yes, that's expected. Import the one you are using more frequently and
access the other one qualified.

> it should be possible to import them and can be used by completely
> qualifying the class name with the appropriate java-package name.

Then why do you want to import them in the first place if you have to
qualify them?

Bye,
Tassilo

Jim foo.bar

unread,
Oct 18, 2012, 11:44:42 AM10/18/12
to clo...@googlegroups.com
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@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+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

simply don't import them...just use the fully-qualified name

Jim

Sunil S Nandihalli

unread,
Oct 18, 2012, 11:56:16 AM10/18/12
to clo...@googlegroups.com
thanks tassillo, that fixed it .. I didn't know that we can use the classes with out importing them. 
Sunil.

Sunil S Nandihalli

unread,
Oct 18, 2012, 11:57:06 AM10/18/12
to clo...@googlegroups.com
Thanks Jim,
 That fixed the issue. I did not know that I can access the classes without importing them..
Sunil.

On Thu, Oct 18, 2012 at 9:14 PM, Jim foo.bar <jimpi...@gmail.com> wrote:
On 18/10/12 16:27, Sunil S Nandihalli wrote:
Hi Everybody,
class name  clashes on importing same named classes from different java-packages into same clojure namespace. Is this expected. I think that it should be possible to import them and can be used by completely qualifying the class name with the appropriate java-package name.
Thanks,
Sunil.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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

For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

simply don't import them...just use the fully-qualified name

Jim
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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
Reply all
Reply to author
Forward
0 new messages