Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Accessing the Windows Registry
Accessing the Windows Registry [message #165550] Tue, 22 June 2004 15:06 Go to next message
Eclipse UserFriend
Originally posted by: paul.burkley.intel.com

Hi,

I'm interested in accessing the windows registry from Eclipse. Our plugin
would like to query information about another Windows application that it
needs to inter-operate with.

I searched the newsgroups and found that to access the registry from
Eclipse the suggested approach is to use the following LGPL open source
plugin:

http://www.beq.ca/tech/Products/jreg_key.shtml

We'd rather not have to depend on such a complete library as this, we
literally just need to query one key in the registry so this seems like a
fairly heavyweight solution.

I'm wondering is it possible to make use of some of Eclipse's own registry
implementation. I can see code where Eclipse accesses the registry (e.g.
org.eclipse.swt.program.Program.getKeyValue) by making JNI calls via the
org.eclipse.swt.internal.win32.OS class, but I can't find anywhere that
this code is made publicly available thru some API. The OS class is in an
internal package so we shouldn't rely on this. And the getKeyValue method
on the Program class has package visibility - so close and yet so far :)

Has anyone else had any luck with this? Any help much appreciated!

Paul.
Re: Accessing the Windows Registry [message #165558 is a reply to message #165550] Tue, 22 June 2004 20:07 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: pascal.ibm.canada

You are probably better off finding the native call in the SWT code and
recreate your own dll.
Sorry I don't know where is the code is, but you can probably find that
by asking the question on the swt newsgroup.

PaScAL

Paul Burkley wrote:

> Hi,
>
> I'm interested in accessing the windows registry from Eclipse. Our plugin
> would like to query information about another Windows application that it
> needs to inter-operate with.
>
> I searched the newsgroups and found that to access the registry from
> Eclipse the suggested approach is to use the following LGPL open source
> plugin:
>
> http://www.beq.ca/tech/Products/jreg_key.shtml
>
> We'd rather not have to depend on such a complete library as this, we
> literally just need to query one key in the registry so this seems like a
> fairly heavyweight solution.
>
> I'm wondering is it possible to make use of some of Eclipse's own registry
> implementation. I can see code where Eclipse accesses the registry (e.g.
> org.eclipse.swt.program.Program.getKeyValue) by making JNI calls via the
> org.eclipse.swt.internal.win32.OS class, but I can't find anywhere that
> this code is made publicly available thru some API. The OS class is in an
> internal package so we shouldn't rely on this. And the getKeyValue method
> on the Program class has package visibility - so close and yet so far :)
>
> Has anyone else had any luck with this? Any help much appreciated!
>
> Paul.
>
>
Re: Accessing the Windows Registry [message #165607 is a reply to message #165550] Wed, 23 June 2004 11:55 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: newsserver_mails.bodden.de

Why not just use the 1.4.2 API ?

http://java.sun.com/j2se/1.4.2/docs/api/java/util/prefs/Pref erences.html

Eric

--
Eric Bodden
ICQ UIN: 12656220
Website: http://www.bodden.de
GPG: BB465582
Re: Accessing the Windows Registry [message #165940 is a reply to message #165607] Sat, 26 June 2004 13:41 Go to previous message
Eclipse UserFriend
Originally posted by: ed.burnette.REMOVE.THIS.sas.com

The 1.4.2 API is limited to keys under local machine or user
Softare/JavaSoft/Prefs .
If there's not one already, I suggest opening a PR for a public API to
access the whole Windows registry.

--
Ed Burnette, co-author, Eclipse in Action
www.eclipsepowered.org

"Eric Bodden" <newsserver_mails@bodden.de> wrote in message
news:cbc95o$f03$2@eclipse.org...
> Why not just use the 1.4.2 API ?
>
> http://java.sun.com/j2se/1.4.2/docs/api/java/util/prefs/Pref erences.html
>
> Eric
>
Previous Topic:order of files and dirs in package view.
Next Topic:Tomcat plugin error with 3.0
Goto Forum:
  


Current Time: Wed Aug 20 22:19:51 EDT 2025

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

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

Back to the top