I'm working through "Clojure for the Brave and True." Right now I'm focused 
on Java interop, in particular creating a simple Java package and accessing 
it from Clojure. My applicable directory structure is listed below along 
with some code, examples of it executing, and my classpath.

For starters, two questions:

1) Is it possible to run PirateConversation from Clojure, and if so, how?

2) If I move my pirate_phrases directory from phrasebook directory to my 
HOME directory (on my classpath), how do I change the import statement in 
PirateConversation.java to access it for compilation?

Michael

----------------------  

Home
  phrasebook
    pirate_phrases
      Greetings.class
      Farewells.class
    PirateConversation.class

PirateConversation.java:

import pirate_phrases.*;

public class PirateConversation
{
  public static void main(String[] args)
  {
    Greetings greetings = new Greetings();
    greetings.hello();

    Farewells farewells = new Farewells();
    farewells.goodbye();
  }
}

[mrice@localhost phrasebook]$ java PirateConversation
Shiver me timbers!!!
A fair turn of the tide for ye thar, ye magnificent sea friend!!
[mrice@localhost phrasebook]$
[mrice@localhost phrasebook]$ cd
[mrice@localhost ~]$ java PirateConversation
Shiver me timbers!!!
A fair turn of the tide for ye thar, ye magnificent sea friend!!
[mrice@localhost ~]$ echo $CLASSPATH
.:/home/mrice/myclasses:/home/mrice/phrasebook
    

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to