473,657 Members | 2,369 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I read a win Registry value in Java

12 New Member
hello everyone,
I'm Celia and I 'd like to know how can I read the value of a a Win (XP) registry in
Java?
If someone could help me with that.

Thank you!

Celia
Jul 26 '07 #1
2 2230
JosAH
11,448 Recognized Expert MVP
hello everyone,
I'm Celia and I 'd like to know how can I read the value of a a Win (XP) registry in
Java?
If someone could help me with that.

Thank you!

Celia
You can't do that; reading/writing registry values is highly platform dependent
and Java is supposed to know zilch about the platform it runs on. You have to
use JNI (Java Native Interface) for those purposes. If you do so you tie your
program to one single platform, e.g. it won't run on Linux or whatever non Windows.

kind regards,

Jos
Jul 26 '07 #2
celiaachkar
12 New Member
Thank you Jos for your answer.

Celia
Jul 27 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
6493
by: salavi | last post by:
What is the simplest way to get a Win (XP) registry value for a given key in Java. This will obviously not be portable code, but it's a necessity. Thanks.
2
8497
by: fabrice | last post by:
hello, Is it possible to read a registry key in ASP, and use the value in an application via a session variable. I'm using II6 on windows server 2003. I'd like to create a key in the registry (under HKLM) and store a value (connection string for example). In the ASP application, read the value and store it in a session variable with global.asa.
6
5552
by: George Hester | last post by:
This location has a parasite checker using javascript. It is in a js file called parasite.js. It is freely available. http://www.doxdesk.com/parasite/ He\She is the only one I trust on the Net who has such a thing. But their js I believe cannot detect coolwebsearch parasites which are the most common such parasites on the Net today. So I'd like to incorporate a check for those parasites in the js. Any suggestions on how this can...
5
34332
by: Logan McKinley | last post by:
I was wondering if there is any way for me to read the device manager in my C# program? I have a program that crashes when some third party hardware is not installed or is set to the wrong port and I could solve that problem if I could read a couple entries from the registry. Thanks in advance, ~Logan
3
17752
by: Bo | last post by:
I am using RegistryKey.GetValue() method to retrieve values from Windows Registry. I don't know how to read type REG_MULTI_SZ into a string array. I have tried string array = (string) RKey.GetValue(name); But it gave me "Invalid Cast Exception". Please provide C# sample code in your reply. Thank you.
2
1960
by: Henry Fleming | last post by:
I have an C# assembly that is supposed to read a registry key: RegistryKey regCurrentUser = Registry.CurrentUser; RegistryKey regSoftware = regCurrentUser.OpenSubKey("Software",true); RegistryKey regFamily = regSoftware.OpenSubKey("MyCompany", true); RegistryKey regApp = regFamily.OpenSubKey("MySystem", true); RegistryKey regSet = regApp.OpenSubKey("Set0", true); m_strDSN = (string) regSet.GetValue("DSN", m_strDSN); The string value...
0
1108
by: Frustrated Newbe | last post by:
Hi, Intro: WinXP Pro, MS.NET 2003 Enterprise Architect, IIS 5.1, logged user belongs to Administrators group. I'm trying to run a demo application (some ASP.NET web components). The application throws a NullReferenceException at some point. I traced it and found that aspnet_wp can't read the value (a directory path) from the registry. RegMon confirmed that aspnet_wp looks at the right place. The key does exist in the registry,...
2
1797
by: Bmack500 | last post by:
Hello, and thanks in advance. I have the below code which keeps returning "1" as the result. It's never successful, and I don't know what I'm doing wrong. I know that when I get to objManagementClass & objManagmeentBaseObject, the VB debugger says "can't read value" on all lines. Bu tI can read the objPath, and the scope just fine. Dim strStringValue As String = "" 'Dim strValue As String
3
2656
by: MSK | last post by:
Hi I am a newbie to ASP.NET and VBScript, currently I am designing a page to show all the mapped drives using client-side scripts.. I want to read all the mapped drive details (name and Remote Path) from the registry ("JKEY_CURRENT_USER\Network\") then I want to show this in list box like P: \\machine1\folder1 Z: \\mahcine2\folder2
0
8399
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8312
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8504
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8606
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7337
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.