Re: Java interop question

2019-02-05 Thread Thiago Araújo
That works, thanks a lot! Em terça-feira, 5 de fevereiro de 2019 11:55:32 UTC-3, jvshahid escreveu: > > > Thiago Araújo > writes: > > > Hi, > > > > I'm a newcomer to java interop. I'm trying to run the following code > > without success: > > > > (javafx.scene.layout.HBox.

Re: Java interop question

2019-02-05 Thread John Shahid
Thiago Araújo writes: > Hi, > > I'm a newcomer to java interop. I'm trying to run the following code > without success: > > (javafx.scene.layout.HBox. (javafx.scene.control.Label. "Foo")) > > I get: > > IllegalArgumentException No matching ctor found for class >

Java interop question

2019-02-05 Thread Thiago Araújo
Hi, I'm a newcomer to java interop. I'm trying to run the following code without success: (javafx.scene.layout.HBox. (javafx.scene.control.Label. "Foo")) I get: IllegalArgumentException No matching ctor found for class javafx.scene.layout.HBox

java interop question: how to access Class object statically

2011-09-15 Thread Andrew Xue
Hi all -- Trying to basically do something like Integer.class -- but ... user= (Integer/class) user= java.lang.NoSuchFieldException: class (NO_SOURCE_FILE:2) user= (Integer/getClass) java.lang.NoSuchFieldException: getClass (NO_SOURCE_FILE:4) Some (not so pretty) workarounds are (.getClass

Re: java interop question: how to access Class object statically

2011-09-15 Thread Dave Ray
How about just Integer? :) Clojure Integer java.lang.Integer Clojure (class Integ­er) java.lang.Class Dave On Thu, Sep 15, 2011 at 1:31 PM, Andrew Xue and...@lumoslabs.com wrote: Hi all -- Trying to basically do something like Integer.class -- but ... user= (Integer/class) user=

Re: java interop question

2011-02-04 Thread clwham...@gmail.com
Yes, Ken's original suggestion was correct -- the clojure code had to look like a real java bean. It works perfectly now, so thanks! On Feb 3, 3:55 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote: I don't know what select * from StockTick(symbol=... is doing, but it looks like the error is

Re: java interop question

2011-02-03 Thread clwham...@gmail.com
Thanks for the tip on how to express a java bean -- that appears to only be part of the problem; I still have the error I posted above. But I'm going to keep flailing at it. On Feb 2, 10:11 am, Ken Wesson kwess...@gmail.com wrote: On Wed, Feb 2, 2011 at 11:15 AM, clwham...@gmail.com

Re: java interop question

2011-02-03 Thread Stuart Sierra
I don't know what select * from StockTick(symbol=... is doing, but it looks like the error is coming from the library handling that query, not Clojure. -Stuart Sierra clojure.com -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group,

java interop question

2011-02-02 Thread clwham...@gmail.com
I am doing some prototyping with the event processing framework Esper (http://esper.codehaus.org/) and I'm running up against my ignorance of clojure/java interop. I would like to create a java bean in clojure that is visible to the Esper runtime; I found some sample Java code that I clojurized as

Re: Newbie : Java Interop question

2010-10-18 Thread oak
P = Property. Guess it could have been lower case p. On Oct 15, 11:19 pm, Michael Ossareh ossa...@gmail.com wrote: On Fri, Oct 15, 2010 at 09:32, oak ismail.oka...@gmail.com wrote: Hi All, This is how i see the package in package explorer. IEssbase.class  (I) IEssbase      (C, s f)

Re: Newbie : Java Interop question

2010-10-18 Thread oak
Thanks just what needed to know On Oct 15, 11:13 pm, Randy Hudson randy_hud...@mac.com wrote: Nested classes require the syntax AClass$NestedClass -- this being the real name of the class in the JVM. Static members of classes are referenced as AClass/member -- essentially treating the class

Newbie : Java Interop question

2010-10-15 Thread oak
Hi All, This is how i see the package in package explorer. IEssbase.class (I) IEssbase (C, s f) Home (M, s) create(String) IEssbase (M, c) Home() (P, s f) JAPI_VERSION I can import like this in Clojure =(import `(com.essbase.api.session IEssbase))` I can

Re: Newbie : Java Interop question

2010-10-15 Thread .Bill Smith
Try using IEssbase/JAPI_VERSION instead (replace dot with slash). On Oct 15, 11:32 am, oak ismail.oka...@gmail.com wrote: Hi All, This is how i see the package in package explorer. IEssbase.class   (I) IEssbase       (C, s f) Home              (M, s) create(String) IEssbase              

Re: Newbie : Java Interop question

2010-10-15 Thread Randy Hudson
Nested classes require the syntax AClass$NestedClass -- this being the real name of the class in the JVM. Static members of classes are referenced as AClass/member -- essentially treating the class as a namespace of its static members. So this should do it: (IEssbase$Home/create

Re: Newbie : Java Interop question

2010-10-15 Thread Michael Ossareh
On Fri, Oct 15, 2010 at 09:32, oak ismail.oka...@gmail.com wrote: Hi All, This is how i see the package in package explorer. IEssbase.class (I) IEssbase (C, s f) Home (M, s) create(String) IEssbase (M, c) Home() (P, s f) JAPI_VERSION Out of interest

RE: Java interop question: proxy or gen-class?

2010-04-17 Thread Kevin
Many thanks to Meikel Brandmeyer, whose code (after a one-character typo correction) worked the first time. As soon as I saw it, I understood every line of it; the problem was, it wouldn't have occurred to me to put all those elements (which, individually, I understood) together in just that way.

Re: Java interop question: proxy or gen-class?

2010-04-16 Thread Gregg Williams
Many thanks to Meikel Brandmeyer, whose code (after a one-character typo correction) worked the first time. As soon as I saw it, I understood every line of it; the problem was, it wouldn't have occurred to me to put all those elements (which, individually, I understood) together in just that way.

Re: Java interop question: proxy or gen-class?

2010-04-14 Thread Meikel Brandmeyer
Hi, My try. Not tested, though... (defn create-toggle-shape Creates an ellipse that changes shape when it is clicked. [] (let [fIsPressed? (atom false) shape (proxy [PPath] [] (paint [#^PPaintContext paintContext]

Re: Java interop question: proxy or gen-class?

2010-04-13 Thread Gregg Williams
Since my last post, I've implemented and successfully run everything in this sample program except the ToggleShape class, and I absolutely cannot figure out how to use proxy correctly. Here's the Java code that I'm trying to re-create in Clojure: class ToggleShape extends PPath {

Java interop question: proxy or gen-class?

2010-04-09 Thread Gregg Williams
Hi--I'm continuing on my path to learning how to use Clojure with the graphics library Piccolo2D (http:// www.piccolo2d.org) by re-implementing some of Piccolo2D's sample programs. This time, I'm working on the Building the Interface program described at

Java interop question

2009-01-11 Thread wal
Is it possible to access a constant inside a public static class which is defined inside a public interface? For example: package com.rabbitmq.client; import java.io.IOException; [...skipped...] public interface AMQP { public static class PROTOCOL { public static final int MAJOR =

Re: Java interop question

2009-01-11 Thread Chouser
On Sun, Jan 11, 2009 at 3:30 PM, wal valebe...@gmail.com wrote: Is it possible to access a constant inside a public static class which is defined inside a public interface? For example: package com.rabbitmq.client; import java.io.IOException; [...skipped...] public interface AMQP {

Re: Java interop question

2009-01-11 Thread wal
On 12 янв, 01:01, Chouser chou...@gmail.com wrote: On Sun, Jan 11, 2009 at 3:30 PM, wal valebe...@gmail.com wrote: Is it possible to access a constant inside a public static class which is defined inside a public interface? For example: package com.rabbitmq.client; import

Java interop question

2008-12-14 Thread David
work (.getName (.getClass 0)) java.lang.Integer work (.getName java.lang.Integer) ; Evaluation aborted. Why does the second expression fail? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to

Re: Java interop question

2008-12-14 Thread Dave Newton
--- On Sun, 12/14/08, David wrote: work (.getName java.lang.Integer) ; Evaluation aborted. Why does the second expression fail? Would that work in Java? Dave --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Java interop question

2008-12-14 Thread Rich Hickey
On Dec 14, 2:26 pm, David dsieg...@yahoo.com wrote: work (.getName (.getClass 0)) java.lang.Integer work (.getName java.lang.Integer) ; Evaluation aborted. Why does the second expression fail? There used to be a long answer as to why:

Re: Java interop question

2008-12-14 Thread Dave Newton
Sneaky, but I bet I'll get confused by the extra functionality at some point. --- On Sun, 12/14/08, Rich Hickey richhic...@gmail.com wrote: There used to be a long answer as to why: http://groups.google.com/group/clojure/msg/8fc6f0e9a5800e4b Now there is a short one - it does work!

Java interop question

2008-12-11 Thread Mark Engelberg
I understand how Clojure lets you consume Java objects, and pass Clojure objects to Java programs. However, it is not uncommon for Java libraries to be designed in such a way that you need to create a subclass of something in the library in order to make use of the library. I don't understand

Re: Java interop question

2008-12-11 Thread Brian Doyle
This article has a good example using the proxy function. http://gnuvince.wordpress.com/2008/11/18/fetching-web-comics-with-clojure-part-2/ On Thu, Dec 11, 2008 at 1:22 PM, Randall R Schulz rsch...@sonic.net wrote: On Thursday 11 December 2008 11:31, Mark Engelberg wrote: I understand how

Re: java interop question

2008-10-27 Thread Phil Jordan
notallama wrote: this may be more of a java question than a clojure question. i dunno. how do i use a java class from clojure? it's easy enough if it's one of the default java libraries, but so far all i have managed with classes i wrote is unable to resolve to classname i tried