Skip to main content



      Home
Home » Newcomers » Newcomers » java.lang.NoClassDefFoundError
java.lang.NoClassDefFoundError [message #20713] Sat, 29 January 2005 18:50 Go to next message
Eclipse UserFriend
Originally posted by: david_deshayes.yahoo.fr

Hi all,

I followed the help of welcome for making an Standalone SWT application.
I downloaded all plugins possibles with the version Eclipse 3.0.1. (My
platform is WinXP Pro.)
I get the following error :
java.lang.NoClassDefFoundError:
3/01\eclipse/plugins/org/eclipse/swt/win32_3/0/1/os/win32/x8 6
Exception in thread "main"

I use the argument with the VM :
-Djava.library.path=${system:ECLIPSE_HOME}/plugins/org.eclip se.swt.${system:WS}_3.0.1/os/${system:OS}/${system:ARCH}

you can see my class HelloWorld :
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
public class HelloWorld {
public static void main(String[] args) {
Display display = new Display ();
Shell shell = new Shell (display);
Label label = new Label (shell, SWT.CENTER);
label.setText ("Hello_world");
label.setBounds (shell.getClientArea ());
shell.open ();
while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
}
}

I tested multiples settings but I don't understand the reason of this
error.

Could you help me, please ?

Best regards.
Re: java.lang.NoClassDefFoundError [message #22207 is a reply to message #20713] Tue, 01 February 2005 09:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tjohnson.swri.org

I am a also experiencing the EXACT problem. Exactly! These help files
for beginners are not that great. They leave you hanging right when you
need them. Anyone have any other help file that are better for NewComers?
-=Theresa


dédé wrote:

> Hi all,

> I followed the help of welcome for making an Standalone SWT application.
> I downloaded all plugins possibles with the version Eclipse 3.0.1. (My
> platform is WinXP Pro.)
> I get the following error :
> java.lang.NoClassDefFoundError:
> 3/01eclipse/plugins/org/eclipse/swt/win32_3/0/1/os/win32/x86
> Exception in thread "main"

> I use the argument with the VM :
>
-Djava.library.path=${system:ECLIPSE_HOME}/plugins/org.eclip se.swt.${system:WS}_3.0.1/os/${system:OS}/${system:ARCH}

> you can see my class HelloWorld :
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.widgets.Display;
> import org.eclipse.swt.widgets.Label;
> import org.eclipse.swt.widgets.Shell;
> public class HelloWorld {
> public static void main(String[] args) {
> Display display = new Display ();
> Shell shell = new Shell (display);
> Label label = new Label (shell, SWT.CENTER);
> label.setText ("Hello_world");
> label.setBounds (shell.getClientArea ());
> shell.open ();
> while (!shell.isDisposed ()) {
> if (!display.readAndDispatch ()) display.sleep ();
> }
> display.dispose ();
> }
> }

> I tested multiples settings but I don't understand the reason of this
> error.

> Could you help me, please ?

> Best regards.
Re: java.lang.NoClassDefFoundError [message #22618 is a reply to message #22207] Tue, 01 February 2005 12:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

I would guess that either you have eclipse installed in a directory that
has a space somewhere in the hiearchy, or the system:ECLIPSE_HOME variable
isn't pointing to the right place. The space in the resulting path is
causing the VM to parse the first part as the library path and the second
part as the class to run. The resulting launch command would be something
like this java -Djava.library.path=path_with_space
3/01eclipse/plugins/org/eclipse/swt/win3...

You can verify this by opening up a Debug perspective. Expand one of your
launch attempts in the Debug view. Select the second line of the launch.
It should start with <terminated, exit value. Right click and select
Properties from the context menu.

This will give you a dialog box with the command line used to run the
program. Check carefully to see if there are any spaces in the
java.library.path. If there are and the paths look correct, surround the
java.library.path VM argument with quotation marks.

If the ECLIPSE_HOME path doesn't look correct, then the eclipse home
directory isn't being picked up by eclipse.

Theresa wrote:

> I am a also experiencing the EXACT problem. Exactly! These help files
> for beginners are not that great. They leave you hanging right when you
> need them. Anyone have any other help file that are better for NewComers?
> -=Theresa


> dédé wrote:

>> Hi all,

>> I followed the help of welcome for making an Standalone SWT application.
>> I downloaded all plugins possibles with the version Eclipse 3.0.1. (My
>> platform is WinXP Pro.)
>> I get the following error :
>> java.lang.NoClassDefFoundError:
>> 3/01eclipse/plugins/org/eclipse/swt/win32_3/0/1/os/win32/x86
>> Exception in thread "main"

>> I use the argument with the VM :
>>
>
-Djava.library.path=${system:ECLIPSE_HOME}/plugins/org.eclip se.swt.${system:WS}_3.0.1/os/${system:OS}/${system:ARCH}

>> you can see my class HelloWorld :
>> import org.eclipse.swt.SWT;
>> import org.eclipse.swt.widgets.Display;
>> import org.eclipse.swt.widgets.Label;
>> import org.eclipse.swt.widgets.Shell;
>> public class HelloWorld {
>> public static void main(String[] args) {
>> Display display = new Display ();
>> Shell shell = new Shell (display);
>> Label label = new Label (shell, SWT.CENTER);
>> label.setText ("Hello_world");
>> label.setBounds (shell.getClientArea ());
>> shell.open ();
>> while (!shell.isDisposed ()) {
>> if (!display.readAndDispatch ()) display.sleep ();
>> }
>> display.dispose ();
>> }
>> }

>> I tested multiples settings but I don't understand the reason of this
>> error.

>> Could you help me, please ?

>> Best regards.
Re: java.lang.NoClassDefFoundError [message #22749 is a reply to message #22618] Tue, 01 February 2005 14:35 Go to previous message
Eclipse UserFriend
Originally posted by: david_deshayes.yahoo.fr

Thanks David,

I installed Eclipse in a directory : "eclipse 3.01".
So, I modifyed by "eclipse_3.01", I modified the properties of my project
(Libraries in my Java Build Path) and my project runs.
Previous Topic:How do I limit where I search...
Next Topic:Installation for JAVA programing
Goto Forum:
  


Current Time: Sun Jul 13 11:16:07 EDT 2025

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

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

Back to the top