DISQUS

Caffeinated Simpleton: Java, please stop ruining my fun.

  • Mark Reid · 5 months ago
    I had a similar cringe of disgust when I started playing with Clojure so my first priority was to set up a simple environment that hid a lot of the painful classpath nonsense and even I wrote up how I did it.

    Granted, it's a little bit of messing around but you'll only have to do it once and then you can just type `clj` from anywhere in your shell and be in the REPL. Extra libraries can be easily added on a per-project basis by adding their names to a `.clojure` file in the project's directory. When you run `clj` in this directory all the named paths or jars are automatically added.

    Hope that eases the pain somewhat.

    Regards,

    Mark.
  • justin · 5 months ago
    I wrote essentially the same thing myself, but perhaps I'll start using yours. Yours looks a bit slicker, and the more people we have using the same tool, the more likely it will be to work itself into the standard workflow.
  • Phil · 5 months ago
    > After reading a bit I find that Maven downloads and builds dependencies and installs them in a local repository, along with the library you are trying to compile. Perfect! Sounds like exactly what I want. However, it doesn’t mention anything about the classpath.

    You can run "mvn process-resources" and Maven will unpack all your dependencies into the target/dependency directory. That way you can keep your classpath simple.

    You can also check out Corkscrew, which is a project I've created to handle dependencies for Clojure projects without writing any icky XML or knowing anything about Maven. (It uses Maven under the covers, but you don't have to touch it.) http://github.com/technomancy/corkscrew

    It's still pretty early in the development stage, but it already makes things easier for me.
  • justin · 5 months ago
    Corkscrew looks pretty good, I'll try it out sometime. This tool, combined with some tools like Mark's that make working on the command line easier could really take some of the Java nastiness out of an otherwise elegant language.
  • mebaran · 5 months ago
    I think alot of the Java badness is mostly due to its reliance on IDE's. If you use the Enclojure plugin for Netbeans, repl'ing, building, and runnining your project become trivial because it manages the evils of Classpath and friends and gives you quick tools to run your REPL from within the GUI. However it's hooks are essentially masks over the obtuseness of Java configuration.

    I have to admit, I do miss the convenience of Rubygems.....
  • Chiropractic marketing · 2 months ago
    I really want to know more about Java although it is difficult but if you learn it its enjoyable and interesting and this will help you in any business.
  • Timothy Pratley · 3 weeks ago
    Excellent articulation of the pain points Java inflicts.