Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Eclipse and Jdom error
Eclipse and Jdom error [message #232856] Wed, 24 June 2009 09:17 Go to next message
Antonio is currently offline AntonioFriend
Messages: 39
Registered: July 2009
Member
Hi guys, thanks all for your help

i use eclipse ganymede (3.41) and i want to install fromework jdom,
i download jdom-1.1.zip, i am exstract this zip file in e:\jdom, i open
eclipse
and i go in Project propreties, build path, add exsternal jar file
I select jdom.jar.
Later i crete this easy project


package prova;
import java.io.FileWriter;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.output.XMLOutputter;


/**
* This class controls all aspects of the application's execution
*/
public class Application implements IApplication {

/* (non-Javadoc)
* @see
org.eclipse.equinox.app.IApplication#start(org.eclipse.equin ox.app.IApplicationContext)
*/
public Object start(IApplicationContext context) throws Exception {


Element carElement = new Element("auto");
carElement.setText("Hello Word");
Document doc =new Document(carElement);


XMLOutputter outputter =new XMLOutputter();
try
{
outputter.output(doc, new FileWriter("JDOMoutput.xml"));

}
catch(Exception e)
{
System.err.println(e);
}



return IApplication.EXIT_OK;
}

/* (non-Javadoc)
* @see org.eclipse.equinox.app.IApplication#stop()
*/
public void stop() {
// nothing to do
}
}


but when i launch this application i ha this error:

!SESSION 2009-06-24
10:11:48.857 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_13
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=it_IT
Framework arguments: -application prova.application
Command-line arguments: -application prova.application -data
E:\work2/../runtime-prova.application -dev
file:E:/work2/.metadata/.plugins/org.eclipse.pde.core/prova. application/dev.properties -
os win32 -ws win32 -arch x86

!ENTRY org.eclipse.osgi 4 0 2009-06-24 10:11:49.357
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: org/jdom/Element
at prova.Application.start(Application.java:22)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Caused by: java.lang.ClassNotFoundException: org.jdom.Element
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
... 14 more


where i mistake? can you help me?

bast regads
Antonio
Re: Eclipse and Jdom error [message #232875 is a reply to message #232856] Wed, 24 June 2009 12:57 Go to previous message
Eclipse UserFriend
Originally posted by: dcarver.starstandard.org

Crossposting the newcomers newsgroup.

Dave

Antonio De Curtis wrote:
>
> Hi guys, thanks all for your help
>
> i use eclipse ganymede (3.41) and i want to install fromework jdom,
> i download jdom-1.1.zip, i am exstract this zip file in e:\jdom, i open
> eclipse
> and i go in Project propreties, build path, add exsternal jar file
> I select jdom.jar.
> Later i crete this easy project
>
>
> package prova;
> import java.io.FileWriter;
> import org.eclipse.equinox.app.IApplication;
> import org.eclipse.equinox.app.IApplicationContext;
> import org.jdom.Document;
> import org.jdom.Element;
> import org.jdom.output.XMLOutputter;
>
>
> /**
> * This class controls all aspects of the application's execution
> */
> public class Application implements IApplication {
>
> /* (non-Javadoc)
> * @see
> org.eclipse.equinox.app.IApplication#start(org.eclipse.equin ox.app.IApplicationContext)
>
> */
> public Object start(IApplicationContext context) throws Exception {
>
>
> Element carElement = new Element("auto");
> carElement.setText("Hello Word");
> Document doc =new Document(carElement);
>
>
> XMLOutputter outputter =new XMLOutputter();
> try
> {
> outputter.output(doc, new FileWriter("JDOMoutput.xml"));
>
> }
> catch(Exception e)
> {
> System.err.println(e);
> }
>
>
>
> return IApplication.EXIT_OK;
> }
>
> /* (non-Javadoc)
> * @see org.eclipse.equinox.app.IApplication#stop()
> */
> public void stop() {
> // nothing to do
> }
> }
>
>
> but when i launch this application i ha this error:
>
> !SESSION 2009-06-24 10:11:48.857
> -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.6.0_13
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=it_IT
> Framework arguments: -application prova.application
> Command-line arguments: -application prova.application -data
> E:\work2/../runtime-prova.application -dev
> file:E:/work2/.metadata/.plugins/org.eclipse.pde.core/prova. application/dev.properties
> - os win32 -ws win32 -arch x86
>
> !ENTRY org.eclipse.osgi 4 0 2009-06-24 10:11:49.357
> !MESSAGE Application error
> !STACK 1
> java.lang.NoClassDefFoundError: org/jdom/Element
> at prova.Application.start(Application.java:22)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(Eclips eAppHandle.java:193)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:110)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:79)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
> Caused by: java.lang.ClassNotFoundException: org.jdom.Element
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl assInternal(BundleLoader.java:481)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:397)
>
> at
> org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:385)
>
> at
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loa dClass(DefaultClassLoader.java:87)
>
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> ... 14 more
>
>
> where i mistake? can you help me?
>
> bast regads
> Antonio
>
Previous Topic:displaying an image on JSP
Next Topic:Galileo and WebSphere CE
Goto Forum:
  


Current Time: Fri Apr 26 18:29:33 GMT 2024

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

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

Back to the top