How to get started (very basic) [message #16850] |
Fri, 16 August 2002 16:12  |
Eclipse User |
|
|
|
I think I'm missing something very basic about Eclipse.
I've downloaded GEF and installed it and played with the logic designer.
(DYN: On the properties sheet for the editor, you can select "Manhattan"
routing?)
Fine, so create a new project and copy and paste simple code from the
documentation; but it won't compile, since the GEF and Draw2d stuff isn't on
the classpath.
Take #1:
I laborously add the SWT, Draw2d and GEF jarfiles to my project classpath (I
use the ECLIPSE_HOME classpath variable).
However, when I try to run the stuff:
java.lang.UnsatisfiedLinkError: no swt-win32-2047 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
at java.lang.Runtime.loadLibrary0(Runtime.java:749)
at java.lang.System.loadLibrary(System.java:820)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:10 4)
at org.eclipse.swt.internal.win32.OS.<clinit>(OS.java:41)
at org.eclipse.swt.internal.win32.TCHAR.<clinit>(TCHAR.java:26)
at org.eclipse.swt.widgets.Widget.<clinit>(Widget.java:80)
at Demo2.main(Demo2.java:20)
Exception in thread "main"
(Window2000, BTW)
So, I guess I could update my PATH environment variable and restart Eclipse
.... but I can run the logic designer, so why can't I run my example. I know
it starts up a new process to run my code, why is the SWT not in that new
process' PATH?
Take #2
I tried importing the GEF plugin as a binary project ... and kept at it
until I had most of Eclipse imported as a binary project. Same problem.
I have the strange feeling that I'm missing something very, very obvious.
|
|
|
Re: How to get started (very basic) [message #16942 is a reply to message #16850] |
Sun, 18 August 2002 23:18   |
Eclipse User |
|
|
|
Originally posted by: hudsonr.spam.com
Your first step should be to run some SWT examples. See the SWT homepage or
Eclipse articles about getting started. Then you look at plugins and learn
how plugin classpath's work.
Ultimately, you should be writing a plugin yourself, using the PDE. The PDE
will set you classpath automatically based on your plugin.xml file. When
you launch your runtime, the SWT DLL will be found using the plugin
classpath, which doesn't exist unless you are doing plugin development.
"Howard M. Lewis Ship" <hlship@attbi.com> wrote in message
news:ajjlu7$70u$1@rogue.oti.com...
> I think I'm missing something very basic about Eclipse.
>
> I've downloaded GEF and installed it and played with the logic designer.
>
> (DYN: On the properties sheet for the editor, you can select "Manhattan"
> routing?)
>
> Fine, so create a new project and copy and paste simple code from the
> documentation; but it won't compile, since the GEF and Draw2d stuff isn't
on
> the classpath.
>
> Take #1:
>
> I laborously add the SWT, Draw2d and GEF jarfiles to my project classpath
(I
> use the ECLIPSE_HOME classpath variable).
>
> However, when I try to run the stuff:
>
> java.lang.UnsatisfiedLinkError: no swt-win32-2047 in java.library.path
> at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
> at java.lang.Runtime.loadLibrary0(Runtime.java:749)
> at java.lang.System.loadLibrary(System.java:820)
> at org.eclipse.swt.internal.Library.loadLibrary(Library.java:10 4)
> at org.eclipse.swt.internal.win32.OS.<clinit>(OS.java:41)
> at org.eclipse.swt.internal.win32.TCHAR.<clinit>(TCHAR.java:26)
> at org.eclipse.swt.widgets.Widget.<clinit>(Widget.java:80)
> at Demo2.main(Demo2.java:20)
> Exception in thread "main"
>
> (Window2000, BTW)
>
> So, I guess I could update my PATH environment variable and restart
Eclipse
> ... but I can run the logic designer, so why can't I run my example. I
know
> it starts up a new process to run my code, why is the SWT not in that new
> process' PATH?
>
> Take #2
>
> I tried importing the GEF plugin as a binary project ... and kept at it
> until I had most of Eclipse imported as a binary project. Same problem.
>
> I have the strange feeling that I'm missing something very, very obvious.
>
>
|
|
|
Re: How to get started (very basic) [message #17199 is a reply to message #16942] |
Tue, 20 August 2002 12:48  |
Eclipse User |
|
|
|
Looks like the "obvious things I was missing" was:
1) Give up on running SWT stuff standalone, just get going with PDE
2) Use the option to convert PDE plugin references into libraries
"Randy Hudson" <hudsonr@spam.com> wrote in message
news:ajpnki$1h1$1@rogue.oti.com...
> Your first step should be to run some SWT examples. See the SWT homepage
or
> Eclipse articles about getting started. Then you look at plugins and
learn
> how plugin classpath's work.
>
> Ultimately, you should be writing a plugin yourself, using the PDE. The
PDE
> will set you classpath automatically based on your plugin.xml file. When
> you launch your runtime, the SWT DLL will be found using the plugin
> classpath, which doesn't exist unless you are doing plugin development.
>
> "Howard M. Lewis Ship" <hlship@attbi.com> wrote in message
> news:ajjlu7$70u$1@rogue.oti.com...
> > I think I'm missing something very basic about Eclipse.
> >
> > I've downloaded GEF and installed it and played with the logic designer.
> >
> > (DYN: On the properties sheet for the editor, you can select
"Manhattan"
> > routing?)
> >
> > Fine, so create a new project and copy and paste simple code from the
> > documentation; but it won't compile, since the GEF and Draw2d stuff
isn't
> on
> > the classpath.
> >
> > Take #1:
> >
> > I laborously add the SWT, Draw2d and GEF jarfiles to my project
classpath
> (I
> > use the ECLIPSE_HOME classpath variable).
> >
> > However, when I try to run the stuff:
> >
> > java.lang.UnsatisfiedLinkError: no swt-win32-2047 in java.library.path
> > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
> > at java.lang.Runtime.loadLibrary0(Runtime.java:749)
> > at java.lang.System.loadLibrary(System.java:820)
> > at org.eclipse.swt.internal.Library.loadLibrary(Library.java:10 4)
> > at org.eclipse.swt.internal.win32.OS.<clinit>(OS.java:41)
> > at org.eclipse.swt.internal.win32.TCHAR.<clinit>(TCHAR.java:26)
> > at org.eclipse.swt.widgets.Widget.<clinit>(Widget.java:80)
> > at Demo2.main(Demo2.java:20)
> > Exception in thread "main"
> >
> > (Window2000, BTW)
> >
> > So, I guess I could update my PATH environment variable and restart
> Eclipse
> > ... but I can run the logic designer, so why can't I run my example. I
> know
> > it starts up a new process to run my code, why is the SWT not in that
new
> > process' PATH?
> >
> > Take #2
> >
> > I tried importing the GEF plugin as a binary project ... and kept at it
> > until I had most of Eclipse imported as a binary project. Same problem.
> >
> > I have the strange feeling that I'm missing something very, very
obvious.
> >
> >
>
>
|
|
|
Re: How to get started (very basic) [message #17333 is a reply to message #17199] |
Tue, 20 August 2002 11:27  |
Eclipse User |
|
|
|
Howard Lewis Ship wrote:
> Looks like the "obvious things I was missing" was:
> 1) Give up on running SWT stuff standalone, just get going with PDE
You can do that, but I think you should ask yourself if your application
will *need* all the services that the Eclipse platform provides.
- Lazy loading of plugins (for faster startup of a large Java app)
- Notification framework
- Update manager
- ...
If you're doing a small simple app that doesn't need all or most of the
above features, standalone SWT is fine (I've used it for this sort of
app before).
In that case, you just need to add the directory with your SWT shared
library to the java.library.path variable in your launch settings.
There are some good small examples of basic standalone SWT applications
on the Wiki to help you get started. You can also search eclipse.tools
for *many* threads describing how to do what you are asking about.
If you decide to use the Eclipse framework (and if you're using GEF, I'd
guess you probably will wind up taking this approach), then Randy's
suggestions are excellent.
Good luck!
Dave
--
Dave Orme
Advanced Systems Concepts
http://www.asc-iseries.com
|
|
|
Powered by
FUDForum. Page generated in 0.02760 seconds