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

Home » Public Forums » archive » Re: Java Bridge Import
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Java Bridge Import [message #60965 is a reply to message #60964] Mon, 23 June 2008 07:13 Go to previous messageGo to previous message
Nigel Wade is currently offline  Nigel Wade
Messages: 286
Registered: March 1998
Senior Member
humanumbrella@gmail.com wrote:

> Hey ~~
>
> So, I'm trying to re-use much existing Java code in this java->IDL
> rewrite process. However, if appears that I can only access Java
> classes if they're jar'd up. I need to be able to access class files
> without having to Jar them. (This is a huge application)

No, you don't need to jar them. Have you read the IDL manual about how to access
Java objects? Some of the examples there access individual class files.

>
> Here's what I mean:
> For example, I have a class "HelloWorld.java" and "HellowWorld.class"
> in D:\IDLResearch\Bridge\
>
> This code: javaClass = obj_new('IDLJavaObject$HELLOWORLD',
> 'HelloWorld.java') returns
>
> "% Class HelloWorld.java not found
> % Execution halted at: IMPORTER 3 D:\IDLResearch\Bridge
> \importer.pro
> % $MAIN$ "
>
> My idljavabrc file contains: D:\IDL\Bridge\ and D:\IDLResearch\Bridge
> -- I've tried it with each.
>
> Any thoughts ??
> Thanks in advance!
> --Justin

The problem you have there is that you have not named your class file correctly.
The classloader does not want your java source file. Further, the classloader
locates classes by package name, and '.' is the separator for packages within
the package hierarchy. What the classloader will be looking for in your example
is a file called 'HelloWorld\java.class'.

If your java class in not part of a package then you should include the
directory in which HelloWorld.class resides in the CLASSPATH and specify the
class 'HelloWorld' in the obj_new.

If your class is part of package then you need to include the base directory of
package hierarchy in the CLASSPATH and specify the fully qualified class name
in obj_new.

--
Nigel Wade
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Java Bridge Import
Next Topic: System.exit from Java class

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

Current Time: Fri Oct 10 23:11:49 PDT 2025

Total time taken to generate the page: 0.22289 seconds