all groups > vj# > april 2004 >
You're in the

vj#

group:

Extend Classpath by custom classes


Extend Classpath by custom classes MrEasy
4/19/2004 3:41:02 AM
vj#:
Hi
I converted an old project from J++ to J# and works fine, only thing is that I have to create an object via Class.forName("com.bla.ClassName"); and the class is not found due to classpath issue
Already read through the MSDN lib. and it said "extend the classpath" but not how to do thi

Re: Extend Classpath by custom classes Ice
4/19/2004 1:33:39 PM
I think assembly that contains the class must be in the GAC or in the
applications directory.

ice
[quoted text, click to view]
that I have to create an object via Class.forName("com.bla.ClassName"); and
the class is not found due to classpath issues
[quoted text, click to view]

Re: Extend Classpath by custom classes MrEasy
4/21/2004 1:51:04 AM
thanks for your reply
what's GAC? (global assembly center?)

my situation is as followed: i hava a jar containing class-files (which can be unpacked from the jar of course), if i have to define an assembly, what do i have to do ?

----- Ice wrote: -----

I think assembly that contains the class must be in the GAC or in the
applications directory.

ice
Re: Extend Classpath by custom classes Ice
4/21/2004 10:09:21 AM
all ur class files need to be converted to assemblies.
Global Assembly Cache - GAC
[quoted text, click to view]
can be unpacked from the jar of course), if i have to define an assembly,
what do i have to do ?
[quoted text, click to view]

RE: Extend Classpath by custom classes rlacas NO[at]SPAM online.microsoft.com
4/28/2004 10:38:33 PM
Hello - Please see the J# docs on Runtime Binding: Class.forName Semantics

http://msdn.microsoft.com/library/en-us/dv_vjsharp/html/vjgrfruntimebindingc
lassfornamesemantics.asp

You might want to try the forName method that also takes the assembly name
as a param. And, double-check that your class is in the assembly with the
VS.NET object browser or the ildasm .NET SDK tool.

If your project conversion did not include the class files in the jar, you
will need to convert these to a .NET assembly. You can use the jbimp tool,
available from the VS.NET command prompt, or add them to the conversion
process when the wizard prompts you for additional items.

|
| Hi,
I converted an old project from J++ to J# and works fine, only thing is
that I have to create an object via Class.forName("com.bla.ClassName"); and
the class is not found due to classpath issues
Already read through the MSDN lib. and it said "extend the classpath" but
not how to do this

thanks in advance for any help
|
AddThis Social Bookmark Button