[gme-users] Java Interpreter Exception-----Help!!!

Carolina carolnotrabalho at uol.com.br
Fri Nov 10 11:52:49 CST 2006


Another solution is to register all external dependencies using a reg file.
This is how we work: the java interpreter is registered the usual way using
JavaCompRegister.exe and all external dependencies are registered through a
reg file we created. This file contains the path to all external
dependencies needed to run the java interpreter, and the proper local to
register them.

Take as example a java interpreter that need 2 external libraries:
org-netbeans-lib-cvsclient.jar and jalopy-full.jar. Create a file with the
extension .reg (ex.: classpath.reg) with the following code:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\GME]
"JavaClassPath"="C:\\autbank\\eclipse\\GME\\Fenix10\\org-netbeans-lib-cvsclient.jar;C:\\autbank\\eclipse\\GME\\Fenix10\\jalopy-full.jar"

Running the .reg file will register the jars and make them available for all
interpreters.

I think the only problem is the limited size of the string allowed for the
register.

Regards,
Carolina.

----- Original Message ----- 
From: "John K Black" <John_K_Black at raytheon.com>
To: <gme-users at list.isis.vanderbilt.edu>
Sent: Thursday, November 09, 2006 3:55 PM
Subject: Re: [gme-users] Java Interpreter Exception-----Help!!!


I had a similar problem.  Instead of bunding everything into
gme.jar, I extracted everything I need into a common directory.
This is not a better solution, but it is an alternative that works
better with my development environment.

For example, suppose I have a few JAR files in d:\JARS, such
as d:\JARS\foo.jar, d:\JARS\bar.jar, etc.  I do this:

> cd D:\JARS
> md classes
> cd classes
> jar -xf ..\foo.jar
> jar -xf ..\bar.jar
...etc...

I then use D:\JARS\classes as the classpath when I register the
component.  I compile my interpreter code into the same
directory.

If anyone has a better way to do this, I'd be very interested.

-John


gme-users-bounces at list.isis.vanderbilt.edu wrote on 11/06/2006 03:18:46
AM:

> Hello,
>
> For the first point, I misunderstood the example and put the classes in
> the wrong directory. For example, the Example.class of this example
> resides in D:\mystuff\classes\foo\bar\ and not directly in
> D:\mystuff\classes\
> I still have not found how to call class in other jar files : adding it
> to the CLASSPATH variable does not seem to work and adding it to the
> Classpath in JavaCompRegister.exe does not work at all. Does someone
> know how to do it ?
>
> Thanks
>
> Daniel Thonon a écrit :
> > Hello,
> >
> > I tried something similar, but I never managed to make it work like
> > this. I had to bundle my classes in gme.jar. In fact, any class
> > outside gme.jar does not work. I tried to load them with
> > URLClassLoader, which does not raise any exception but the class is
> > still not accessible. Has someone managed to use external jars and how

> > should I do it ?
> > Configuration :
> >
> >    * GME 6.5.8
> >    * Java 1.5.0_09
> >
> > Thanks
> >
> > John K Black a écrit :
> >> Hi Adi,
> >>
> >> Is your interpreter in a package?  For example, let's say your
> >> class looks like:
> >>
> >>   package foo.bar;
> >>
> >>   public class Example {
> >>     // blah
> >>   }
> >>
> >> If you generate your .class files into D:/mystuff/classes, then
> >> in JavaCompRegister.exe you would have:
> >>
> >>   ClassPath: D:\mystuff\classes
> >>
> >>   Class: foo.bar.Example
> >>
> >> -John
> >>
> >>
> >> gme-users-bounces at list.isis.vanderbilt.edu wrote on 10/27/2006
> >> 08:21:25 AM:
> >>
> >>
> >>> Hi All,
> >>>
> >>> I have built BON interpreter in Java, and able to register it
> >>> successfully using "RegisterComponent.exe" program. When I ran the
> >>> interpreter in the model, it is throwing an exception as shown in
> >>> the attached figure.
> >>> I guess this might be due to the class path problem. I have given
> >>> the Interpreter folder path as the class path and the Example.class
> >>> as the class name.
> >>>
> >>> Is there any problem with this?
> >>>
> >>> Regards
> >>> Adi[attachment "temp.bmp" deleted by John K Black/US/Raytheon]
> >>> _______________________________________________
> >>> gme-users mailing list
> >>> gme-users at list.isis.vanderbilt.edu
> >>> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> >>>
> >>
> >> _______________________________________________
> >> gme-users mailing list
> >> gme-users at list.isis.vanderbilt.edu
> >> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> >>
> >>
> >>
> >>
> >
> > _______________________________________________
> > gme-users mailing list
> > gme-users at list.isis.vanderbilt.edu
> > http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users
> >
> >
> >
>
> _______________________________________________
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users

_______________________________________________
gme-users mailing list
gme-users at list.isis.vanderbilt.edu
http://list.isis.vanderbilt.edu/mailman/listinfo/gme-users



More information about the gme-users mailing list