beginners

Melody 2025-05-02T01:26:19.788519Z

How do you import two java classes of the same name?

(ns calibration.frequency-analysis
  (:require [clojure.string :as str])
  (:import [org.apache.commons.math3.transform DftNormalization FastFourierTransformer TransformType]
           [org.apache.commons.math3.complex Complex])
  (:import [com.github.psambit9791.jdsp.filter Butterworth]
           [uk.me.berndporr.iirj Butterworth]))

phronmophobic 2025-05-02T01:50:42.443579Z

I'm not sure that you can import two classes with the same short name, but you can always import a fully qualified name

(ns calibration.frequency-analysis
  (:require [clojure.string :as str])
  (:import [org.apache.commons.math3.transform DftNormalization FastFourierTransformer TransformType]
           [org.apache.commons.math3.complex Complex])
  (:import com.github.psambit9791.jdsp.filter.Butterworth
           uk.me.berndporr.iirj.Butterworth))

Alex Miller (Clojure team) 2025-05-02T02:01:07.323939Z

You don’t - fully qualify one of them

2025-05-02T02:06:31.781719Z

there is no reason to :import a fully qualified name like that, you can just use the fully qualified name anywhere

Melody 2025-05-02T02:07:52.345059Z

Got it, now I see, thank you all!