Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1060487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:20:04+00:00 2026-05-16T18:20:04+00:00

I ran lein uberjar on my project and it created the corresponding jar files.

  • 0

I ran lein uberjar on my project and it created the corresponding jar files. When I run the jar a ClassNotFoundException: explodingdots.core is thrown. I specified explodingdot.core as my main class. I extracted the jar file and there was indeed no core.class in the corresponding directory. What did I forget?

I have the following code in src/explodingdots/core.clj

(ns explodingdots.core  
 (:import (java.awt Color Dimension Graphics2D AlphaComposite RenderingHints)
          (java.awt.event ActionListener MouseAdapter WindowAdapter)
          (javax.swing Timer JPanel JFrame))
  (:gen-class))

[ ... ]

(defn -init[] exploding-dots)
(defn -main[_]
  (let [ed (new explodingdots.core)]
    (.init ed)))

The content of my project.clj is:

(defproject explodingdots "0.1"
  :dependencies [[org.clojure/clojure "1.2.0"]
                 [org.clojure/clojure-contrib "1.2.0"]]
  :main explodingdots.core)

Note: I am using leiningen 1.3.1

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T18:20:04+00:00Added an answer on May 16, 2026 at 6:20 pm

    Ok I solved my original problem. It is kind of embarassing to admit it, but I think I have to do it for the sake of completeness of this thread. I got mixed up with my paths. I have the same file within a Netbeans project and in a leiningen project. And I was editing the Netbeans file. Sorry.

    But then I had an other problem. The main method is found but I get an

    java.lang.IllegalArgumentException: Wrong number of args (0) passed to: core$-main
    

    I tried changing my main method from
    (defn -main [_] ...) to (defn -main [& args] ...) like Arthur suggested but that didn’t work. To solve this I wrote just (defn -main[]...) with no args.

    The next problem was that calling (init) from (main) resulted in an error. I worked around that by not calling (init) at all but calling (exploding-dots) directly from (main).

    So to make everything work my src/explodingdots/core.clj looks like

    (ns explodingdots.core  
     (:import (java.awt Color Dimension Graphics2D AlphaComposite RenderingHints)
              (java.awt.event ActionListener MouseAdapter WindowAdapter)
              (javax.swing Timer JPanel JFrame))
      (:gen-class))
    
    [ ... ]
    
    (defn -main[] (exploding-dots))
    

    By looking at the solution I have to think, why didn’t I write that right ahead. It is the most simple and most straight forward way. Maybe I need a vacation ;).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to build a C++ extension for python using swig. I've followed the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.