Windows SDK for Eclipse [message #233941] |
Fri, 21 September 2007 09:47  |
Eclipse User |
|
|
|
Originally posted by: tom.xxxxxx.xxx
Hello together,
is it possible to use the Windows Platform SDK or the Windows Mobile SDK
with Eclipse? If not, how is it possible to create applications for
Windows XP/Windows Mobile with Eclipse then?
Thanks for your help.
Tom
|
|
|
|
|
|
|
|
Re: Windows SDK for Eclipse [message #234013 is a reply to message #233983] |
Fri, 21 September 2007 13:36   |
Eclipse User |
|
|
|
Originally posted by: wharley.bea.com
"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fd0qss$88b$1@build.eclipse.org...
> Tom,
>
> I guess it depends a little bit how you are using it. If you are
> building OSGi bundles, you'd want to package these libraries up as a
> plugin for reuse by other plugins and so that they are available at
> runtime as a proper bundle. Otherwise you can just add the jars to the
> classpath of the Java projects that need to use them (via the pop-up
> properties of the project).
I think Tom is asking, basically, "how to write a Windows application with
Eclipse". That is, how to call Windows APIs, and in this case specifically
the APIs that are part of a different Windows distribution than the normal
desktop Win32 API.
If I'm wrong, then ignore the rest of this...
Tom, when you use Eclipse as a Java development environment, you typically
access the operating system through Java libraries. The Windows APIs aren't
exposed as Java APIs, however. Instead, some of them are reached indirectly
via the Java VM (for instance, file access and threading); others are
exposed through a windowing toolkit, such as SWT or Swing. Java
applications almost never make direct OS calls themselves.
If a Java application has to make a direct OS call, it has to do it through
the Java Native Interface (JNI). This is basically a way of calling C code
from Java. With JNI, you specify a DLL to link to and bind to a particular
function, and then call that; and there's ways to marshal parameters and
return values back and forth. Under the covers that's what the VM or
Swing/SWT have to do, also.
So, you can choose one of a few levels of abstraction:
1. Use Eclipse as a C/C++ IDE, with the CDT plug-ins, to write a C/C++
application that links directly to the appropriate Windows API libraries.
2. Use Eclipse as a Java IDE, targeting a VM and operating environment that
is designed to run on the mobile platform you have in mind. For instance,
your Java runtime library would probably be J2ME (Mobile Edition) rather
than J2SE, the default. You would also need to use an appropriate version
of whatever windowing toolkit you select.
3. Same as #2, but use JNI to make the particular OS calls you want
directly.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08476 seconds