I have tried to use wall-hack-method but I still obtain the error: UnsatisfiedLinkError vtk.vtkConeSource.VTKInit()J vtk.vtkConeSource.VTKInit (vtkConeSource.java:-2). What I am doing wrong?
(ns project.core (:import (javax.swing JButton JFrame JPanel) (vtk vtkConeSource vtkPolyDataMapper vtkRenderWindow vtkRenderWindowInteractor vtkCamera vtkActor vtkRenderer vtkInteractorStyleTrackballCamera))) (System/loadLibrary "vtkCommonJava") (System/loadLibrary "vtkFilteringJava") (System/loadLibrary "vtkIOJava") (System/loadLibrary "vtkImagingJava") (System/loadLibrary "vtkGraphicsJava") (System/loadLibrary "vtkRenderingJava") (defn wall-hack-method [class-name method-name params obj & args] (-> class-name (.getDeclaredMethod (name method-name) (into-array Class params)) (doto (.setAccessible true)) (.invoke obj (into-array Object args)))) (defn load-lib [class vtk] (wall-hack-method java.lang.Runtime "vtkCommonJava" [Class String] (Runtime/getRuntime) class vtk)) (load-lib vtkConeSource "vtkCommonJava") (defn main [] (let [cone (doto (vtkConeSource.) (.SetHeight 3.0) (.SetRadius 1.0) (.SetResolution 10)) coneMapper (doto (vtkPolyDataMapper.) (.SetInputConnection(.GetOutputPort cone))) coneActor (doto (vtkActor.) (.SetMapper coneMapper)) ren (doto (vtkRenderer.) (.AddActor coneActor) (.SetBackground 0.1 0.2 0.4) (.ResetCamera) (-> (.GetActiveCamera) (.Azimuth 90))) renWin (doto (vtkRenderWindow.) (.AddRenderer ren) (.SetSize 300 300)) iren (doto (vtkRenderWindowInteractor.) (.SetRenderWindow renWin) (.SetInteractorStyle (vtkInteractorStyleTrackballCamera.)) (.Initialize) (.Start)) ])) (project.core/main) -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en