Skip to content

Commit

Permalink
Update JAR management reporting classes not identified (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
masesdevelopers authored Sep 27, 2024
1 parent fc32883 commit b4f7a90
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/net/JNetReflector/InternalExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
using System.Text.RegularExpressions;
using Org.Mases.Jnet;
using System.Diagnostics;
using MASES.JCOBridge.C2JBridge;

namespace MASES.JNetReflector
{
Expand Down Expand Up @@ -432,11 +433,16 @@ public static string JVMFullQualifiedClassName(this ZipArchiveEntry entry)

public static Class JVMClass(this ZipArchiveEntry entry)
{
var cName = entry.JVMFullQualifiedClassName();
try
{
var cName = entry.JVMFullQualifiedClassName();
return Class.ForName(cName, true, Class.SystemClassLoader);
}
catch (JVMBridgeException cnfe)
{
ReflectionUtils.ReportTrace(ReflectionUtils.ReflectionTraceLevel.Error, $"JVMClass: {cnfe.GetType().Name} loading {cName} with message: {cnfe.Message}");
return null;
}
catch
{
return null;
Expand Down
8 changes: 8 additions & 0 deletions src/net/JNetReflector/JNetReflector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,15 @@
<ItemGroup>
<Compile Include="..\JNet\Developed\Java\Lang\Annotation\Annotation.cs" Link="Java\Lang\Annotation\Annotation.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Class.cs" Link="Java\Lang\Class.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\ClassFormatError.cs" Link="Java\Lang\ClassFormatError.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\ClassLoader.cs" Link="Java\Lang\ClassLoader.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\ClassNotFoundException.cs" Link="Java\Lang\ClassNotFoundException.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Error.cs" Link="Java\Lang\Error.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Exception.cs" Link="Java\Lang\Exception.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Iterable.cs" Link="Java\Lang\Iterable.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\LinkageError.cs" Link="Java\Lang\LinkageError.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Module.cs" Link="Java\Lang\Module.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\NoClassDefFoundError.cs" Link="Java\Lang\NoClassDefFoundError.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\NoSuchMethodException.cs" Link="Java\Lang\NoSuchMethodException.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Object.cs" Link="Java\Lang\Object.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Package.cs" Link="Java\Lang\Package.cs" />
Expand All @@ -77,8 +82,11 @@
<Compile Include="..\JNet\Developed\Java\Lang\Reflect\Type.cs" Link="Java\Lang\Reflect\Type.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Reflect\TypeVariable.cs" Link="Java\Lang\Reflect\TypeVariable.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Reflect\WildcardType.cs" Link="Java\Lang\Reflect\WildcardType.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\RuntimeException.cs" Link="Java\Lang\RuntimeException.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\SecurityManager.cs" Link="Java\Lang\SecurityManager.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Throwable.cs" Link="Java\Lang\Throwable.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\UnsupportedClassVersionError.cs" Link="Java\Lang\UnsupportedClassVersionError.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\UnsupportedOperationException.cs" Link="Java\Lang\UnsupportedOperationException.cs" />
<Compile Include="..\JNet\Developed\Java\Util\Collection.cs" Link="Java\Util\Collection.cs" />
<Compile Include="..\JNet\Developed\Java\Util\Iterator.cs" Link="Java\Util\Iterator.cs" />
<Compile Include="..\JNet\JNetCoreBase.cs" Link="JNetCoreBase.cs" />
Expand Down

0 comments on commit b4f7a90

Please sign in to comment.