RE: JBImp

From: Joshua Drake (JoshuaDrake_at_discussions.microsoft.com)
Date: 08/20/04


Date: Fri, 20 Aug 2004 10:27:03 -0700

Yes, as I stated:

The directory contains all relevant files. I have traced this to the
java.util.collections class. As soon as it is added to the path, the
types-getref-external error shows up.

But without those files being present the dummy items created by
/usestubrefs also fail:

jbimp.exe *.class /usestubrefs /t:library > output.txt

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.

JbImp warning: Using stub type for Class java.util.Collections<dummy>
JbImp warning: Using stub Method for 'public static java.util.Collection
java.util.Collections<dummy>.synchronizedCollection(java.util.Collection,
java.lang.Object)'
JbImp warning: Using stub Method for 'public static java.util.Set
java.util.Collections<dummy>.synchronizedSet(java.util.Set, java.lang.Object)'
JbImp error: Failed to generate IL for method java/util/Hashtable.equals.
Generating stub IL for the method
JbImp error: Failed to generate IL for method
java/util/Hashtable$Enumerator.remove. Generating stub IL for the method
JbImp error: Failed to create type for class 'java/util/Hashtable'. Creating
stub type
JbImp error: Internal Conversion Error : 'JbImp fatal error: Conversion
failed'

This only comipling the Hastable class from Java. This is the first failure
point, when I attempt to run the .dll generated from my .jar file.

Thanks,
Josh

"Sadagopan Rajaram" wrote:

> Hi Joshua,
> It looks like the classes that are shown in the errors are part of your
> class files in the path which is why the resolution is not happening to the
> the correct types in the J# Runtime. For example, there is probably a
> java.lang.Integer.class which is getting converted as part of the jar files
> or the classes in the path. Can you please see if these classes are part of
> your conversion list?
>
> Thanks,
> Sadagopan Rajaram
> Microsoft Visual J# .NET Product Team.
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
>
> --------------------
> >Thread-Topic: JBImp
> >thread-index: AcSBnUFJIIPbhRA/TrSqxt3J2a+Z3g==
> >X-WBNR-Posting-Host: 209.74.96.70
> >From: =?Utf-8?B?Sm9zaHVhIERyYWtl?= <Joshua Drake@discussions.microsoft.com>
> >Subject: JBImp
> >Date: Fri, 13 Aug 2004 18:23:07 -0700
> >Lines: 65
> >Message-ID: <48223333-A1A2-4E71-9274-BCAEDC3CAE7E@microsoft.com>
> >MIME-Version: 1.0
> >Content-Type: text/plain;
> > charset="Utf-8"
> >Content-Transfer-Encoding: 7bit
> >X-Newsreader: Microsoft CDO for Windows 2000
> >Content-Class: urn:content-classes:message
> >Importance: normal
> >Priority: normal
> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> >Newsgroups: microsoft.public.dotnet.vjsharp
> >NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> >Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA03.phx.gbl
> >Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.vjsharp:6322
> >X-Tomcat-NG: microsoft.public.dotnet.vjsharp
> >
> >I'm running JBImp with the following command line:
> >
> >jbimp.exe dartapi.jar /securescoping /t:library /usestubrefs /recurse .
> >
> >The output I get is:
> >
> >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.
> >
> >JbImp error: Internal Conversion Error : 'types-getref-external'
> >JbImp error: Unresolved Method 'public static void
> >java.lang.ExceptionInInitializerError.checkAndThrowException(java.lang.Thro
> wable)'
> >JbImp error: Unresolved Method 'public static boolean
> >java.lang.Boolean.booleanValue()'
> >JbImp error: Unresolved Method 'public static byte
> java.lang.Byte.byteValue()'
> >JbImp error: Unresolved Method 'public static char
> >java.lang.Character.charValue()'
> >JbImp error: Unresolved Method 'public static short
> >java.lang.Short.shortValue()'
> >JbImp error: Unresolved Method 'public static int
> >java.lang.Integer.intValue()'
> >JbImp error: Unresolved Method 'public static long
> java.lang.Long.longValue()'
> >JbImp error: Unresolved Method 'public static float
> >java.lang.Float.floatValue()'
> >JbImp error: Unresolved Method 'public static double
> >java.lang.Double.doubleValue()'
> >JbImp error: Unresolved Method 'public static System.Text.StringBuilder
> >java.lang.StringBuffer.ToStringBuilder()'
> >JbImp error: Unresolved Method 'public static java.lang.StringBuffer
> >java.lang.StringBuffer.FromStringBuilder(System.Text.StringBuilder)'
> >JbImp error: Unresolved Constructor 'public void
> >java.lang.NullPointerException()'
> >JbImp error: Unresolved Constructor 'public void
> >java.lang.NoSuchMethodError()'
> >JbImp error: Unresolved Constructor 'public void
> >java.lang.NoSuchMethodError(java.lang.String)'
> >JbImp error: Unresolved Constructor 'public void
> >java.lang.UnsatisfiedLinkError(java.lang.String)'
> >JbImp error: Unresolved Constructor 'public void
> >java.lang.NegativeArraySizeException()'
> >JbImp error: Unresolved Constructor 'public void
> >java.lang.ClassNotFoundException(java.lang.String)'
> >JbImp error: Unresolved Constructor 'public void
> >java.lang.CloneNotSupportedException()'
> >JbImp error: Unresolved Constructor 'public void java.lang.Object()'
> >JbImp error: Unresolved Constructor 'public void
> java.lang.Boolean(boolean)'
> >JbImp error: Unresolved Constructor 'public void java.lang.Byte(byte)'
> >JbImp error: Unresolved Constructor 'public void java.lang.Character(char)'
> >JbImp error: Unresolved Constructor 'public void java.lang.Short(short)'
> >JbImp error: Unresolved Constructor 'public void java.lang.Integer(int)'
> >JbImp error: Unresolved Constructor 'public void java.lang.Long(long)'
> >JbImp error: Unresolved Constructor 'public void java.lang.Float(float)'
> >JbImp error: Unresolved Constructor 'public void java.lang.Double(double)'
> >JbImp error: Internal Conversion Error : 'JbImp fatal error: Conversion
> >failed'
> >
> >The directory contains all relevant files. I have traced this to the
> >java.util.collections class. As soon as it is added to the path, the
> >types-getref-external error shows up.
> >Any suggestions?
> >
> >Thanks,
> >Joshua
> >
> >
>
>