Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Jar creation errors
Jar creation errors [message #218401] Sun, 06 November 2005 02:40 Go to next message
Eclipse UserFriend
Hi,
I am trying to export a Java application to jar file using the
JarPackageData class.
I use IJarExportRunnable runnable=
description.createJarExportRunnable(null); where "description" is the
object of type JarPackageData with manifest details and other required
things (set before calling createJarExport....).
After that I use
ProgressMonitorDialog pd = new ProgressMonitorDialog(null);
pd.run(true,true, runnable);
which throws java.lang.reflect.InvocationTargetException: "JAR creation
failed. See details for additional information."
(this is thrown while executing pd.run....). Now how do I see the exact
error that caused the JAR creation failure.
I tried stack tracing the target exception of InvocationTargetException ..
not of much use though.

Thanks for your time
-Shrinivas Joshi.
Re: Jar creation errors [message #218790 is a reply to message #218401] Fri, 11 November 2005 18:50 Go to previous message
Eclipse UserFriend
Hi,
Found solution for this problem. Just mentioning it here so that if someone
else faces the same prob it cud be of some help:

The IJarExportRunnable that you create can be queried for its status as :
IStatus is = runnable.getStatus(); // runnable is variable of type
IJarExportRunnable
you can then check children status (if any) of this status object as :
IStatus[] statArray = stat.getChildren();
for (int i = 0; i < statArray.length; i++) {
System.out.println("CHILD STATUS "+statArray[i]);
}
The base error that causes - java.lang.reflect.InvocationTargetException:
"JAR creation
failed. See details for additional information." exception is recorded in
the child status objects.

-Shrinivas Joshi


"Shrinivas Joshi" <sjoshi@cc.gatech.edu> wrote in message
news:dkkc15$e8l$1@news.eclipse.org...
> Hi,
> I am trying to export a Java application to jar file using the
> JarPackageData class.
> I use IJarExportRunnable runnable=
> description.createJarExportRunnable(null); where "description" is the
> object of type JarPackageData with manifest details and other required
> things (set before calling createJarExport....).
> After that I use
> ProgressMonitorDialog pd = new ProgressMonitorDialog(null);
> pd.run(true,true, runnable);
> which throws java.lang.reflect.InvocationTargetException: "JAR creation
> failed. See details for additional information."
> (this is thrown while executing pd.run....). Now how do I see the exact
> error that caused the JAR creation failure.
> I tried stack tracing the target exception of InvocationTargetException ..
> not of much use though.
>
> Thanks for your time
> -Shrinivas Joshi.
>
>
>
Previous Topic:Code formatter
Next Topic:Incorrect raw type warning?
Goto Forum:
  


Current Time: Sun Jul 13 10:27:44 EDT 2025

Powered by FUDForum. Page generated in 0.05485 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top