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 also call the property like this with success.
=>(IEssbase/JAPI_VERSION)
"11.1.1"
=>

In java the code to get this API instance looks like this.

IEssbase ess = null;
ess = IEssbase.Home.create(IEssbase.JAPI_VERSION);

when in Clojure i try the following
=> (.. IEssbase Home create IEssbase.JAPI_VERSION)

I get the message no such Field exists.

Do i have to use a proxy since IEssbase is an Interface if so how do i
make call to create to get instance of API back.


-- 
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


Re: Newbie : Java Interop question

2010-10-15 Thread oak
Sorry i've tried that as well.
The problem is that Home is not a method on IEssbase. That's the
message i get back.

On Oct 15, 1:08 pm, ".Bill Smith"  wrote:
> Try using  IEssbase/JAPI_VERSION instead (replace dot with slash).
>
> On Oct 15, 11:32 am, oak  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
>
> > I can import like this in Clojure
> > =>(import `(com.essbase.api.session IEssbase))`
>
> > I can also call the property like this with success.
> > =>(IEssbase/JAPI_VERSION)
> > "11.1.1"
> > =>
>
> > In java the code to get this API instance looks like this.
>
> > IEssbase ess = null;
> > ess = IEssbase.Home.create(IEssbase.JAPI_VERSION);
>
> > when in Clojure i try the following
> > => (.. IEssbase Home create IEssbase.JAPI_VERSION)
>
> > I get the message no such Field exists.
>
> > Do i have to use a proxy since IEssbase is an Interface if so how do i
> > make call to create to get instance of API back.

-- 
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


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  wrote:
> On Fri, Oct 15, 2010 at 09:32, oak  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 what is this format? Are my guesses at the letters accurate?
>
> I == Interface
> C == Class
> M == Method
> P == ?
> s == static
> f == final
> c = class

-- 
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


Re: Newbie : Java Interop question

2010-10-18 Thread oak
Thanks just what needed to know

On Oct 15, 11:13 pm, Randy Hudson  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 as a namespace of its static members.
> So this should do it:
>
> (IEssbase$Home/create IEssbase/JAPI_VERSION)
>
> On Oct 15, 12:32 pm, oak  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
>
> > I can import like this in Clojure
> > =>(import `(com.essbase.api.session IEssbase))`
>
> > I can also call the property like this with success.
> > =>(IEssbase/JAPI_VERSION)
> > "11.1.1"
> > =>
>
> > In java the code to get this API instance looks like this.
>
> > IEssbase ess = null;
> > ess = IEssbase.Home.create(IEssbase.JAPI_VERSION);
>
> > when in Clojure i try the following
> > => (.. IEssbase Home create IEssbase.JAPI_VERSION)
>
> > I get the message no such Field exists.
>
> > Do i have to use a proxy since IEssbase is an Interface if so how do i
> > make call to create to get instance of API back.

-- 
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