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 6664313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:35:48+00:00 2026-05-26T02:35:48+00:00

compiling clojure files generate .class files in classes directory . Since classes direct is

  • 0

compiling clojure files generate .class files in classes directory. Since classes direct is child to current directory so for running a java program which is calling clojure will be javac -cp classes CalculateSum.java. How to run ?? java CalculateSum isn’t possible since class files are in child directory classes. java -cp classes CalculateSum isn’t working.

  • 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-26T02:35:48+00:00Added an answer on May 26, 2026 at 2:35 am

    Compile by javac

    >dir /d /b
    chapter_2
    
    >dir /b chapter_2
    CalculateSum.java
    
    >javac chapter_2/CalculateSum.java
    
    >dir /b chapter_2
    CalculateSum.class
    CalculateSum.java
    

    clojure execute command ex.)

    java -cp .;lib;lib/jline-1.0.jar;lib/clojure.jar;lib/clojure-contrib-1.2.0.jar jline.ConsoleRunner clojure.main
    

    move chapter_2 directory to under lib

    DEMO:

    Clojure 1.2.1
    user=> (import 'chapter_2.CalculateSum)
    chapter_2.CalculateSum
    user=> (. CalculateSum main (make-array String 0))
    Enter first number to add:
    2.3
    Enter second number to add:
    4.5
    2.3 + 4.5 = 6.8
    nil
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Upon compiling and running this small program to reverse a string, I get a
Since Clojure 1.3, I am confused about the directory structure needed to build something
java -cp clojure.jar clojure.main compile.clj this is compiling the clojure code. javac CalculateSum.java compiling
When compiling latex documents the compiler emits a lot of object files. This clutters
Compiling (or executing) a perl program with unmatched array braces ([ ]) or scope
After compiling some code, the compiler generates a bunch of files. I have statistics,
I am writing a Clojure class using gen-class . I have a state field
Compiling a program to bytecode instead of native code enables a certain level of
After compiling my java code under Eclipse, I got the following error messages: SLF4J:
We see in the following blog entry: http://blog.fogus.me/2011/07/21/compiling-clojure-to-javascript-pt1/ some pretty incredible syntax transformations, simplifications

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.