Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » VM arguments
VM arguments [message #91008] Fri, 13 May 2005 19:22 Go to next message
Eclipse UserFriend
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.
Re: VM arguments [message #91037 is a reply to message #91008] Fri, 13 May 2005 19:38 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

This is bug in the JDT launcher. It doesn't understand that the argument
could have spaces. We just ourselves found this out an hour ago. We've
opened a bug against JDT launcher:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=95216


--
Thanks,
Rich Kulp
Re: VM arguments [message #607758 is a reply to message #91008] Fri, 13 May 2005 19:38 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

This is bug in the JDT launcher. It doesn't understand that the argument
could have spaces. We just ourselves found this out an hour ago. We've
opened a bug against JDT launcher:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=95216


--
Thanks,
Rich Kulp
Previous Topic:VM arguments
Next Topic:Adding JRadioButton to ButtonGroup generates improper code
Goto Forum:
  


Current Time: Fri Apr 26 11:56:54 GMT 2024

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

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

Back to the top