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

  • SEARCH
  • Home
  • 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 8100117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:39:32+00:00 2026-06-05T22:39:32+00:00

Context If I want Lein 1.7 to start out with a particular class loaded,

  • 0

Context

If I want Lein 1.7 to start out with a particular class loaded, I do:

:repl-init init.init

Now, instead of having lein load up a *.clj file, I want lein to do the equiv of “java Foo”, where Foo is classes/Foo.class

Question:

My project.clj look alike:

(defproject ...
  :aot [Foo]
  ???? )

What do I put in ???? to make “lein repl” startup by executing “java Foo” ?

Thanks!

  • 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-06-05T22:39:33+00:00Added an answer on June 5, 2026 at 10:39 pm

    If I understand your question, you can still use :repl-init for this by having a call to the class you want pre-loaded in a namespace that gets loaded by the repl. in this example i’m using println statement as a standin for the setup you want done 🙂

    project.clj:

    (defproject foooo "1.0.0-SNAPSHOT"
      :description "FIXME: write description"
      :dependencies [[org.clojure/clojure "1.3.0"]]
      :aot [foooo.core]
      :main foooo.core
      :repl-init foooo.core)
    

    core.clj

    (ns foooo.core
      (:gen-class))
    (println "setting up for fun")
    
    (defn -main [])
    

    compiling:
    arthur@a:~/foooo$ lein compile
    Compiling foooo.core
    Compilation succeeded.

    running:

    arthur@a:~/foooo$ CLASSPATH=./lib/clojure-1.3.0.jar:./classes/ java foooo.core 1
    setting up for fun
    

    or:

    arthur@a:~/foooo$ lein run
    setting up for fun
    

    REPLing:

    arthur@a:~/foooo$ lein repl
    REPL started; server listening on localhost port 63392
    setting up for fun
    foooo.core=>  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bitmap image context and want to let this appear blurry. So
My question is exactly that but in context I want to examine the selection
I want to use Context.Items to store some info of a User Control like:
I want to rename an context private file created with openFileOutput() but I don't
I want to replace the first context of web/style/clients.html with the java String.replaceFirst method
I want to pass a security context to my rest service. On server side
I want to contribute a command to the context menu of any text editor
I want to inject one additional variable into the context of a view that
I want to use the exclusive key to open context menu that are available
Context: .Net, C# I want to print a complex number made from two doubles.

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.