*** Sorry, I hit "send" by accident, reposing ***
Hi everyone,
How do I detect if a file type is supported or not? Also, how do I detect
if a file type is supported but it cannot be processed because the parser
for it is missing (the required JARs are missing)?
For the missing JAR part, when I tried to parse a JAR file, I got this
exception:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
at java.lang.reflect.Method.invoke(Method.java:619)
at
org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
Caused by: java.lang.NoClassDefFoundError:
org.objectweb.asm.ClassVisitor
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:306)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:154)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:777)
Is there a way for me to make an API call to find out if the file can be
handled or not instead of depending on the exception? Depending on the
exception isn't reliable.
Thanks
Steve
On Fri, Feb 5, 2016 at 3:40 PM, Steven White <[email protected]> wrote:
> Hi everyone,
>
> How do I detect if a file type is supported or not? Also, how do I detect
> if a file type is supported but it cannot be processed because the parser
> for it is missing (the required JARs are missing)?
>
> For the missing JAR part, when I tried to parse a JAR file, I got this
> exception:
>
>
>
> Thanks
>
> Steve
>