[gme-users] Java Interpreter Exception-----Help!!!
John K Black
John_K_Black at raytheon.com
Thu Nov 9 13:55:19 CST 2006
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
More information about the gme-users
mailing list