How to Run Example [message #2194] |
Fri, 17 May 2002 09:55  |
Eclipse User |
|
|
|
Originally posted by: rrotstain.hotmail.com
I'm kind of new to Eclipse, and I keep seeing code examples that start
something like:
// all the imports here
public static void main( String[] args )
{
Display d = new Display();
Shell shell = new Shell(d);
// some other stuff
}
Here's what I'd like to know:
- How do I load this class from Eclipse?
- Is this class supposed to be a plug-in? If so, it is a View, or a
Perspective? Does it still require a plugin.xml file?
- What is needed to run this class inside of Eclipse? Is it simply the
class file, or does it also require some other files ( for example, if it
is a plug-in, it would obviously require plugin.xml )
Thanks in advance for any help.
Ronen.
|
|
|
Re: How to Run Example [message #2315 is a reply to message #2194] |
Fri, 17 May 2002 12:01  |
Eclipse User |
|
|
|
"Ronen Rotstain" <rrotstain@hotmail.com> schrieb im Newsbeitrag
news:ac3244$tkt$1@rogue.oti.com...
> I'm kind of new to Eclipse, and I keep seeing code examples that start
> something like:
>
> // all the imports here
> public static void main( String[] args )
> {
> Display d = new Display();
> Shell shell = new Shell(d);
> // some other stuff
> }
>
> Here's what I'd like to know:
> - How do I load this class from Eclipse?
Create a Launch Configuration (Java Application). Make sure swt.jar is in
the classpath.
> - Is this class supposed to be a plug-in? If so, it is a View, or a
> Perspective? Does it still require a plugin.xml file?
Nope. It's an Java Application :-) . Notice that SWT isn't bound to Eclipse.
You can use it in your programs
just as Swing / AWT.
If contributing a PlugIn to the workbench, you don't need to create displays
and other low-level SWT things, but "paint" on the things you'll get from
the workbench ;-)
> - What is needed to run this class inside of Eclipse? Is it simply the
> class file, or does it also require some other files ( for example, if it
> is a plug-in, it would obviously require plugin.xml )
To run it from outside eclipse you'll need the swt.jar in the cp, and the
native library
(under Windows : the swt_XYZ.dll (forgot the exact name)) in the PATH.
Take a look at SWT FAQ on eclipse.org
>
>
> Thanks in advance for any help.
> Ronen.
>
Florian
|
|
|
Powered by
FUDForum. Page generated in 0.03130 seconds