如何在Eclipse中使用逆时针使用编译的Clojure类 [英] How to use a compiled Clojure class in Eclipse with Counterclockwise

查看:176
本文介绍了如何在Eclipse中使用逆时针使用编译的Clojure类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在clojure和逆时针的eclipse中创建了一个基本的hello世界类,我可以用clojure编译它没有问题。

I created a basic hello world class in eclipse with clojure and counterclockwise and I'm able to compile it with clojure no problem.


(ns ca.ckovacs.test.helloWorld
    (:gen-class))

(defn -main
  [greetee]
  (println (str "Hello " greetee "!")))



我看到这会在我的/ classes文件夹中生成三个类:

I see that this generates three classes in my /classes folder:



helloWorld__init.class
helloWorld$_main__135.class
helloWorld$loading__6309__auto__133.class

But why don't I get a helloWorld.class? 

我最终希望能够在Eclipse中使用Clojure编译的类。

I eventually want to be able to use a Clojure compiled class within Eclipse.

显然,但是通过编译页面clojure.org阅读,发布的示例hello world说,你可以像任何其他java类一样加载helloWorld类。

I must be missing something obvious, but reading through the Compilation page at clojure.org, the posted example hello world says you can just load the helloWorld class like any other java class.

谢谢。 / p>

Thanks.

推荐答案

我不知道是什么问题,但我结束了重命名我的包名称,我得到helloWorld.class文件

I don't know what the problem was, but I ended up renaming my package name and I get the helloWorld.class file as expected.

我怀疑这个问题可能是因为我有两个独立的源路径(一个用于Java,一个用于Clojure)共享同一个包命名空间。

I suspect the problem may be because I had two seperate source paths (one for Java, one for Clojure) that shared the same package namespace.

这篇关于如何在Eclipse中使用逆时针使用编译的Clojure类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆