Groups | Blog | Home
all groups > vj# > february 2005 >

vj# : import or include java .class file


chanmm
2/9/2005 3:39:28 PM
Dear All,

How can I import or include java .class file in Visual J#.
Please help

Best regards,
chanmm

Lars-Inge Tønnessen [VJ# MVP]
2/10/2005 5:46:55 PM

You must first convert the java byte code into .net code with the
"jbimp.exe" tool. After that just add a reference the library in your J#
app.


Regards,
Lars-Inge Tønnessen

Pete Loveall
2/11/2005 6:09:44 AM
You are using Java 2 and above methods and classes. J# only supports Java
1.1.4 (with some additions). This is why you are not able to import the
classes. My guess is you had errors when you tried to compile the source in
J# and that is why you are trying to import. If they won't compile, they
won't import. jbimp is really designed to import classes for which you do
not have source. It is under the same constraints as J# with regards to
compatibility requirements.

Pete Loveall

[quoted text, click to view]

chanmm
2/11/2005 3:59:44 PM
Dear Lars,

I have written a simple add function in a class and use jbimp to convert to
dll it works perfectly. But when I tried to convert JWNL class, it returns
the error as below and I have tried several arguments but it does not help.
Any suggestion?

Error:
Microsoft (R) Java-language bytecode to MSIL converter version 1.1.4322.0

for Microsoft (R) .NET Framework version 1.1.4322

Copyright (C) Microsoft Corp 2000-2002. All rights reserved.

Please convert all unresolved references and resubmit for successful
conversion

JbImp error: Couldn't find class 'net.didion.jwnl.JWNLException'

Unresolved class 'net.didion.jwnl.JWNLException' is not also present in the
CLASSPATH

JbImp error: Couldn't find class 'javax.xml.parsers.DocumentBuilderFactory'

Unresolved class 'javax.xml.parsers.DocumentBuilderFactory' is not also
present in the CLASSPATH

JbImp error: Couldn't find class 'javax.xml.parsers.DocumentBuilder'

Unresolved class 'javax.xml.parsers.DocumentBuilder' is not also present in
the CLASSPATH

JbImp error: Couldn't find class 'org.w3c.dom.Document'

Unresolved class 'org.w3c.dom.Document' is not also present in the CLASSPATH

JbImp error: Couldn't find class 'org.w3c.dom.Element'

Unresolved class 'org.w3c.dom.Element' is not also present in the CLASSPATH

JbImp error: Couldn't find class 'net.didion.jwnl.util.ResourceBundleSet'

Unresolved class 'net.didion.jwnl.util.ResourceBundleSet' is not also
present in the CLASSPATH

JbImp error: Couldn't find class 'org.w3c.dom.Node'

Unresolved class 'org.w3c.dom.Node' is not also present in the CLASSPATH

JbImp error: Couldn't find class 'org.w3c.dom.NodeList'

Unresolved class 'org.w3c.dom.NodeList' is not also present in the CLASSPATH

JbImp error: Couldn't find class 'net.didion.jwnl.data.PointerType'

Unresolved class 'net.didion.jwnl.data.PointerType' is not also present in
the CLASSPATH

JbImp error: Couldn't find class 'net.didion.jwnl.data.Adjective'

Unresolved class 'net.didion.jwnl.data.Adjective' is not also present in the
CLASSPATH

JbImp error: Couldn't find class 'net.didion.jwnl.data.VerbFrame'

Unresolved class 'net.didion.jwnl.data.VerbFrame' is not also present in the
CLASSPATH

JbImp error: Couldn't find class 'net.didion.jwnl.JWNL$Version'

Unresolved class 'net.didion.jwnl.JWNL$Version' is not also present in the
CLASSPATH

JbImp error: Couldn't find class 'net.didion.jwnl.util.factory.Element'

Unresolved class 'net.didion.jwnl.util.factory.Element' is not also present
in the CLASSPATH

JbImp error: Couldn't find class 'net.didion.jwnl.util.factory.Param[]'

Unresolved class 'net.didion.jwnl.util.factory.Param[]' is not also present
in the CLASSPATH

JbImp error: Couldn't find class 'net.didion.jwnl.util.factory.ParamList'

Unresolved class 'net.didion.jwnl.util.factory.ParamList' is not also
present in the CLASSPATH

JbImp error: Couldn't find class 'net.didion.jwnl.util.factory.ValueParam'

Unresolved class 'net.didion.jwnl.util.factory.ValueParam' is not also
present in the CLASSPATH

JbImp error: Couldn't find class
'net.didion.jwnl.util.factory.NameValueParam'

Unresolved class 'net.didion.jwnl.util.factory.NameValueParam' is not also
present in the CLASSPATH

JbImp error: Couldn't find class 'org.w3c.dom.NamedNodeMap'

Unresolved class 'org.w3c.dom.NamedNodeMap' is not also present in the
CLASSPATH

JbImp error: Couldn't find class 'net.didion.jwnl.JWNL$OS'

Unresolved class 'net.didion.jwnl.JWNL$OS' is not also present in the
CLASSPATH

JbImp error: Couldn't find class 'net.didion.jwnl.JWNLRuntimeException'

Unresolved class 'net.didion.jwnl.JWNLRuntimeException' is not also present
in the CLASSPATH

JbImp error: Couldn't find class 'net.didion.jwnl.dictionary.Dictionary'

Unresolved class 'net.didion.jwnl.dictionary.Dictionary' is not also present
in the CLASSPATH

chanmm

"Lars-Inge T?nessen [VJ# MVP]" <http://emailme.larsinge.com> wrote in
message news:u56UoA5DFHA.228@tk2msftngp13.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button