comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » java bridge question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
java bridge question [message #46522] Fri, 25 November 2005 00:24 Go to next message
Antonio Santiago is currently offline  Antonio Santiago
Messages: 201
Registered: February 2004
Senior Member
Hi group,
I don't know if any of you has had the same problem with the
"idljavabrc" file. The problem is:

(1) If I use the sentence:
JVM Classpath = $CLASSPATH:$HOME/some_java_class_file

The idl (6.1) doesn't find the class.

(2) If I use the sentence with absolute path all is right:
JVM Classpath = $CLASSPATH:/path/to/some_java_class_file


Any ideas??

PD: I'm working on linux with IDL6.1.

--
-----------------------------------------------------
Antonio Santiago P�rez
( email: santiago<<at>>grahi.upc.edu )
( www: http://www.grahi.upc.edu/santiago )
( www: http://asantiago.blogsite.org )
-----------------------------------------------------
GRAHI - Grup de Recerca Aplicada en Hidrometeorologia
Universitat Polit�cnica de Catalunya
-----------------------------------------------------
Re: Java Bridge Question [message #50092 is a reply to message #46522] Thu, 14 September 2006 06:25 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
pskellicker@ameritech.net writes:

> I would suggest verifying what is in the .jar file:
>
>> jar tf TryGeometry.jar
> .. should dump out the class names in the jar file. Verify you have
> a class called Point and not ("fanning.com.Point" or "point" or
> "TryGeometry$Point")
>
> Then verify that there is a public constructor for Point that takes 2
> floats as parameters.
>
>> javap -classpath TryGeometry.jar Point
> Should dump out the public methods of Point.

Sigh... Ok, I'm in that "learn everything at once"
stage.

When I downloaded the JAVA distribution, it
came with the NetBeans IDE, which is what I have been
using to edit, build, and run my JAVA programs. According
to the NetBeans documentation, when you "build" a project,
it creates a "package" of the objects in its "dist" directory.
This is, in fact, where I find the TryGeometry.jar file.

So, I agree I need to examine the contents of this file.
But I don't know how to access the "command line" where
these commands are to be run. I've tried the Windows
command line, but these commands are not recognized
as valid commands.

There is a disconnect, obviously, between the book I am
using to learn JAVA and the NetBeans IDE. (Not to mention
errors in the book, which I am learning to recognize, but
which nevertheless slow me down.) The book assumes a
command line, too, but doesn't mention how to install
it. (If that is what one does with it.) It does
suggest the JDK as a way to access these commands,
and I certainly have that, but don't have the foggiest
idea what to do with it or how to send a command to it.

I could probably spend 7-8 hours trying to figure this
out and become an expert in the damn thing in the process,
or maybe some kind soul can give me a clue. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Java Bridge Question [message #50093 is a reply to message #46522] Thu, 14 September 2006 05:38 Go to previous messageGo to next message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
pskellicker@ameritech.net wrote:

> I would suggest verifying what is in the .jar file:
>
>> jar tf TryGeometry.jar
> .. should dump out the class names in the jar file. Verify you have
> a class called Point and not ("fanning.com.Point" or "point" or
> "TryGeometry$Point")
>
> Then verify that there is a public constructor for Point that takes 2
> floats as parameters.
>
>> javap -classpath TryGeometry.jar Point
> Should dump out the public methods of Point.
>

If the constructor was invalid/missing the error would be:

% Constructor Point::Point(float,float) not found

I would agree that you need to look at the structure of the jar. Did you include
any paths in the jar? i.e. did you create the jar from the directory containing
the class files and specify them as *.class, so that there is no preceding
path? Java is very fussy about paths and packages, and the path must match the
package declaration exactly.

jar tf TryGeometry.jar

should list at least:

META-INF/
META-INF/MANIFEST.MF
Point.class


--
Nigel Wade, System Administrator, Space Plasma Physics Group,
University of Leicester, Leicester, LE1 7RH, UK
E-mail : nmw@ion.le.ac.uk
Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555
Re: Java Bridge Question [message #50097 is a reply to message #46522] Wed, 13 September 2006 23:37 Go to previous messageGo to next message
Mike Wallace is currently offline  Mike Wallace
Messages: 25
Registered: May 2006
Junior Member
If I may ask, how are you creating the jar file? What do you see when
you run "jar tf path\to\TryGeometry.jar"?

-Mike
Re: Java Bridge Question [message #50100 is a reply to message #46522] Wed, 13 September 2006 17:39 Go to previous messageGo to next message
pskellicker is currently offline  pskellicker
Messages: 2
Registered: September 2006
Junior Member
I would suggest verifying what is in the .jar file:

> jar tf TryGeometry.jar
.. should dump out the class names in the jar file. Verify you have
a class called Point and not ("fanning.com.Point" or "point" or
"TryGeometry$Point")

Then verify that there is a public constructor for Point that takes 2
floats as parameters.

> javap -classpath TryGeometry.jar Point
Should dump out the public methods of Point.

ScottK


David Fanning wrote:
> David Fanning writes:
>
>>
>> I have modified the idljavabrc configuration file in IDL
>> in the following way:
>>
>> JVM Classpath =
>> $CLASSPATH;C:\RSI\IDL62\external\objbridge\java\jbexamples.j ar
>> JVM Classpath =
>> $CLASSPATH;C:\RSI\IDL62\external\objbridge\java\TryGeometry. jar
>
> I've noticed in my log file that this doesn't set put my
> TryGeometry.jar file on the JVM path, so I have modified the
> configuration file to this:
>
> JVM Classpath = $CLASSPATH;C:\RSI\IDL62\external\objbridge\java
> \jbexamples.jar;C:\RSI\IDL62\external\objbridge\java\TryGeom etry.jar
>
> This sets my JVM Classpath to have the right jar files, but
> I get the same result when I try to create the object. :-(
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Java Bridge Question [message #50108 is a reply to message #46522] Wed, 13 September 2006 10:31 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

>
> I have modified the idljavabrc configuration file in IDL
> in the following way:
>
> JVM Classpath =
> $CLASSPATH;C:\RSI\IDL62\external\objbridge\java\jbexamples.j ar
> JVM Classpath =
> $CLASSPATH;C:\RSI\IDL62\external\objbridge\java\TryGeometry. jar

I've noticed in my log file that this doesn't set put my
TryGeometry.jar file on the JVM path, so I have modified the
configuration file to this:

JVM Classpath = $CLASSPATH;C:\RSI\IDL62\external\objbridge\java
\jbexamples.jar;C:\RSI\IDL62\external\objbridge\java\TryGeom etry.jar

This sets my JVM Classpath to have the right jar files, but
I get the same result when I try to create the object. :-(

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Java Bridge Question [message #50181 is a reply to message #46522] Thu, 14 September 2006 12:07 Go to previous message
news.qwest.net is currently offline  news.qwest.net
Messages: 137
Registered: September 2005
Senior Member
"David Fanning" <davidf@dfanning.com> wrote in message
news:MPG.1f7320e65f72c019989cc1@news.frii.com...
> Here is my basic problem:
>
> "By collaborating and exploiting core integration
> technology, tool producers can leverage platform
> reuse and concentrate on core competencies to
> create new development technology."
>
> I don't have the foggiest idea what the hell this means! :-(


Basically, a focus on core competencies presents challenges in
the context of strategic decision-making oriented to market
growth vectors.
Similarly, developing operational and conceptual learning means that
management must concentrate on the operational imperative of increasing the
visibility of key business metrics.

I hope that clears it up!

Cheers,
bob
Re: Java Bridge Question [message #50183 is a reply to message #46522] Thu, 14 September 2006 10:37 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mike Wallace writes:

> Don't knock it just yet. The plug-in capability is one of Eclipse's
> strongest features. They are actually one of the few products that
> handled plug-ins/extensibility correctly.

Alright, I admit it, it's pretty cool. If you want me
in the next couple of months I'll be over at comp.lang.java,
hanging out, learning JAVA.

Cheers,

David

P.S. Who said there wasn't life after IDL!?

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Java Bridge Question [message #50184 is a reply to message #46522] Thu, 14 September 2006 09:34 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mike Wallace writes:

> Don't knock it just yet. The plug-in capability is one of Eclipse's
> strongest features. They are actually one of the few products that
> handled plug-ins/extensibility correctly.

Oh, I'm not knocking it yet. (Although I do wish that
whoever is writing their technical documentation would
try to follow his own directions once.) I was just thinking
that the description of the product reminded me of another
piece of software I use frequently. In any case, I'm always
in favor of humor in technical documentation. It's the only
way to get through it, usually. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Java Bridge Question [message #50185 is a reply to message #46522] Thu, 14 September 2006 09:21 Go to previous message
Mike Wallace is currently offline  Mike Wallace
Messages: 25
Registered: May 2006
Junior Member
> Eclipse installed!! First line in the Overview:
>
> "Eclipse is a kind of universal tool platform -
> an open extensible IDE for anything and nothing
> in particular."
>
> Oh, oh. :-(


Don't knock it just yet. The plug-in capability is one of Eclipse's
strongest features. They are actually one of the few products that
handled plug-ins/extensibility correctly.

-Mike
Re: Java Bridge Question [message #50186 is a reply to message #46522] Thu, 14 September 2006 08:59 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

Eclipse installed!! First line in the Overview:

"Eclipse is a kind of universal tool platform -
an open extensible IDE for anything and nothing
in particular."

Oh, oh. :-(

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Java Bridge Question [message #50187 is a reply to message #46522] Thu, 14 September 2006 08:37 Go to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
David Fanning wrote:
> Here is my basic problem:
>
> "By collaborating and exploiting core integration
> technology, tool producers can leverage platform
> reuse and concentrate on core competencies to
> create new development technology."
>
> I don't have the foggiest idea what the hell this means! :-(

I'd file it under "Management bullshit", and just try to use Eclipse. I
*think* that that MBS piece is meant to otehr developers who might
consider using Eclipse as a basis for their development environment
(i.e. someone at ITTVIS is trying to figure out what that really
means).

Maarten
Re: Java Bridge Question [message #50188 is a reply to message #46522] Thu, 14 September 2006 08:19 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> Well, if you believe rumours, we are ALL going to be
> using this soon. Guess I better go download it and start
> getting used to it...You available this afternoon? I'll
> probably have questions. :-)

Here is my basic problem:

"By collaborating and exploiting core integration
technology, tool producers can leverage platform
reuse and concentrate on core competencies to
create new development technology."

I don't have the foggiest idea what the hell this means! :-(

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Java Bridge Question [message #50189 is a reply to message #46522] Thu, 14 September 2006 08:13 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Mike Wallace writes:

> The tryGeometry directory in your jar file should correspond to the
> package declaration in your java files. I'm not familiar with NetBeans,
> but it may have automatically added the package line for you when you
> created a new Java file. By convention package names in Java begin with
> a lowercase letter so the IDE may have lowercased the package name
> without you noticing.

It appears to have done just this. The odd thing though, is
that the name is spelled differently just about *everywhere*!
When I look in the Projects window, under "Source Packages" it
is spelled "trygeometry". Go figure.

> Since we're already on the topic, I'd like to take this moment to give a
> plug for Eclipse -- the best Java IDE out there. :-)

Well, if you believe rumours, we are ALL going to be
using this soon. Guess I better go download it and start
getting used to it...You available this afternoon? I'll
probably have questions. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: Java Bridge Question [message #50190 is a reply to message #46522] Thu, 14 September 2006 08:01 Go to previous message
Mike Wallace is currently offline  Mike Wallace
Messages: 25
Registered: May 2006
Junior Member
> OK, I added the JDK to my PATH and the commands now work
> from the command window. When I examine the contents of
> my TryGeometry jar file, I get this:
>
> tryGeometry/
> tryGeometry/Line.class
> tryGeometry/Main.class
> tryGeometry/Point.class
>
> I don't know WHY the tryGeometry here starts with a lowercase
> t instead of the UPPERCASE T I've used every other damn place,
> but that apparently is the problem! Now I can successfully
> create my object in IDL!


The tryGeometry directory in your jar file should correspond to the
package declaration in your java files. I'm not familiar with NetBeans,
but it may have automatically added the package line for you when you
created a new Java file. By convention package names in Java begin with
a lowercase letter so the IDE may have lowercased the package name
without you noticing.

Since we're already on the topic, I'd like to take this moment to give a
plug for Eclipse -- the best Java IDE out there. :-)

-Mike
Re: Java Bridge Question [message #50191 is a reply to message #50092] Thu, 14 September 2006 06:50 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> So, I agree I need to examine the contents of this file.
> But I don't know how to access the "command line" where
> these commands are to be run. I've tried the Windows
> command line, but these commands are not recognized
> as valid commands.

OK, I added the JDK to my PATH and the commands now work
from the command window. When I examine the contents of
my TryGeometry jar file, I get this:

tryGeometry/
tryGeometry/Line.class
tryGeometry/Main.class
tryGeometry/Point.class

I don't know WHY the tryGeometry here starts with a lowercase
t instead of the UPPERCASE T I've used every other damn place,
but that apparently is the problem! Now I can successfully
create my object in IDL!

IDL> obj = obj_new("IDLJAVAOBJECT$TRYGEOMETRY_POINT", $
"tryGeometry.Point", 0.25, 0.25)

Sigh... What a lot of work. Thanks, everyone, for your help.
Now, on to the next BIG thing... :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Image stabilization filter
Next Topic: Array matching?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:12:47 PDT 2025

Total time taken to generate the page: 0.00685 seconds