trouble with example "Standalone SWT Application" [message #450165] |
Wed, 09 February 2005 03:49 |
Eclipse User |
|
|
|
Originally posted by: rlevin1.san.rr.com
-------- Original Message --------
Subject: trouble with example "Standalone SWT Application"
Date: Tue, 08 Feb 2005 19:45:27 -0800
From: Robert Levin <rlevin1@san.rr.com>
Organization: EclipseCorner
Newsgroups: eclipse.newcomer
Windows XP SP2
Eclipse Platform Version: 3.0.1
Goal: Build and run the “Standalone SWT Application” example that ships
with the Eclipse Platform.
Problem:
I followed the instructions in the "Cheat Sheet" example, with one small
exception.
The instruction say to put the following into the VM arguments area of
the Launch config dialog.
-Djava.library.path=${system:ECLIPSE_HOME}/plugins/org.eclip se.swt.${system:WS}_3.0.0/os/${system:OS}/${system:ARCH}
I discovered a small difference in the actual path on my system. 3.0.0
is actually 3.0.1. The path is
C:\Program Files\eclipse\plugins\org.eclipse.swt.win32_3.0.1\os\win32\x 86
So, I changed the “0” to a “1” and proceeded to type the following into
the VM arguments area.
Djava.library.path=" ${system:ECLIPSE_HOME}/plugins/org.eclipse.swt.${system:WS}_ 3.0.1/os/${system:OS}/${system:ARCH} "
(The double quotes are needed because of the space in "Program Files"
that turns up in the ECLIPSE_HOME variable.)
After trying to run the app...
A message box appeared with the text
"Could not find the main class. Program will exit."
The following appeared in the console area.
java.lang.NoClassDefFoundError: Djava/library/path=c:\Program
Files\eclipse/plugins/org/eclipse/swt/win32_3/0/1/os/win32/x 86
Exception in thread "main"
Next I tried to put the path in explicitly as
Djava.library.path="C:\Program
Files\eclipse\plugins\org.eclipse.swt.win32_3.0.1\os\win32\x 86 "
This yielded the same disappointing results.
------------------------------------------------------------ ----------
Questions:
1)What is wrong?
2)Why are the periods replace with slashes in the path as reported in
the console error message?
3)Since the project properties - java build path - libraries shows
swt.jar listed with the correct path, why do I have to input VM args
manually?
I have seen couple similar posts in .newcomers and .swt, but no solutions.
Thanks, and a gold star for anyone who takes the time to read all this!
Robert
|
|
|
Re: trouble with example "Standalone SWT Application" [message #450166 is a reply to message #450165] |
Wed, 09 February 2005 04:07 |
Eclipse User |
|
|
|
Originally posted by: rlevin1.san.rr.com
I just found my problem. I failed to put a hyphen before the "D" in the
VM argument!
This Caused the argument to be interpreted as a filespec. So the dots
were transformed into slashes to mean the current directory.
Well, if anyone else has this problem they can find the answer here.
-Robert
Robert Levin wrote:
>
>
> -------- Original Message --------
> Subject: trouble with example "Standalone SWT Application"
> Date: Tue, 08 Feb 2005 19:45:27 -0800
> From: Robert Levin <rlevin1@san.rr.com>
> Organization: EclipseCorner
> Newsgroups: eclipse.newcomer
>
> Windows XP SP2
> Eclipse Platform Version: 3.0.1
>
> Goal: Build and run the “Standalone SWT Application” example that ships
> with the Eclipse Platform.
>
> Problem:
>
> I followed the instructions in the "Cheat Sheet" example, with one small
> exception.
>
> The instruction say to put the following into the VM arguments area of
> the Launch config dialog.
> -Djava.library.path=${system:ECLIPSE_HOME}/plugins/org.eclip se.swt.${system:WS}_3.0.0/os/${system:OS}/${system:ARCH}
>
>
> I discovered a small difference in the actual path on my system. 3.0.0
> is actually 3.0.1. The path is
> C:\Program Files\eclipse\plugins\org.eclipse.swt.win32_3.0.1\os\win32\x 86
>
> So, I changed the “0” to a “1” and proceeded to type the following into
> the VM arguments area.
>
> Djava.library.path=" ${system:ECLIPSE_HOME}/plugins/org.eclipse.swt.${system:WS}_ 3.0.1/os/${system:OS}/${system:ARCH} "
>
> (The double quotes are needed because of the space in "Program Files"
> that turns up in the ECLIPSE_HOME variable.)
>
> After trying to run the app...
>
> A message box appeared with the text
> "Could not find the main class. Program will exit."
>
> The following appeared in the console area.
> java.lang.NoClassDefFoundError: Djava/library/path=c:\Program
> Files\eclipse/plugins/org/eclipse/swt/win32_3/0/1/os/win32/x 86
> Exception in thread "main"
>
> Next I tried to put the path in explicitly as
> Djava.library.path="C:\Program
> Files\eclipse\plugins\org.eclipse.swt.win32_3.0.1\os\win32\x 86 "
>
> This yielded the same disappointing results.
>
> ------------------------------------------------------------ ----------
>
> Questions:
>
> 1)What is wrong?
>
> 2)Why are the periods replace with slashes in the path as reported in
> the console error message?
>
> 3)Since the project properties - java build path - libraries shows
> swt.jar listed with the correct path, why do I have to input VM args
> manually?
>
> I have seen couple similar posts in .newcomers and .swt, but no solutions.
>
> Thanks, and a gold star for anyone who takes the time to read all this!
> Robert
|
|
|
Powered by
FUDForum. Page generated in 0.02747 seconds