VM arguments [message #607756] |
Fri, 13 May 2005 19:22 |
Eclipse User |
|
|
|
Originally posted by: schesvo.cs.ndsu.edu
I am trying to build a standalone application with the visual editor. I
create
an SWT shell with no problem. The following code is generated:
--------------------------------------------------
/*
* Created on May 12, 2005
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package testPackage;
/**
* @author Doug Schesvold
*
* TODO To change the template for this generated type comment go to
* Window - Preferences - Java - Code Style - Code Templates
*/
public class TestStandalone {
private org.eclipse.swt.widgets.Shell sShell = null;
public static void main(String[] args) {
/* Before this is run, be sure to set up the following in the launch
configuration
* (Arguments->VM Arguments) for the correct SWT library path.
* The following is a windows example:
*
-Djava.library.path=" installation_directory\plugins\org.eclipse.swt.win32_3.0.0\o s\win32\x86 "
*/
org.eclipse.swt.widgets.Display display =
org.eclipse.swt.widgets.Display.getDefault();
TestStandalone thisClass = new TestStandalone();
thisClass.createSShell() ;
thisClass.sShell.open();
while (!thisClass.sShell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep ();
}
display.dispose();
}
/**
* This method initializes sShell
*/
private void createSShell() {
sShell = new org.eclipse.swt.widgets.Shell();
sShell.setSize(new org.eclipse.swt.graphics.Point(300,200));
sShell.setText("Shell");
}
}
--------------------------------------------------
I follow the instructions in the comment concerning VM arguments and enter
the following in the VM arguments section of the run configuration:
-Djava.library.path=C:\Program
Files\eclipse\plugins\org.eclipse.swt.win32_3.0.2\os\win32\x 86
When I enter a space between "Program" and "Files" it puts in a newline.
When I click run, I get a message that says:
"Could not find the main class. Program will exit"
and an error message that says:
"java.lang.NoClassDefFoundError:
Files\eclipse\plugins\org/eclipse/swt/win32_3/0/2\os\win32\x 86 "
It seems to be having a problem with " " and "." in the path. It seems to
be
substituting a "/" for the "."
Are these special characters that need to be quoted somehow?
The eclipse version is 3.0.2 and the VE version is 1.0.2.1.
Thanks,
Doug.
|
|
|
Powered by
FUDForum. Page generated in 0.04046 seconds