Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java.lang.UnsatisfiedLinkError: pRegOpenBaseKey error

5 views
Skip to first unread message

Lijie YIN

unread,
Jun 8, 2001, 12:47:37 AM6/8/01
to
Hi,

On windows NT plateform,

I try to use com.ms.lang.RegKey class to read environment variable from
window NT registry, if I use miscrosoft VM it is OK, I can read registry key
and value, But if I use sun VM I got following errors:

Exception in thread "main" java.lang.UnsatisfiedLinkError: pRegOpenBaseKey
at com.ms.lang.RegKey.pRegOpenBaseKey(Native Method)
at com.ms.lang.RegKey.<init>(RegKey.java)
at com.ms.lang.RegKey.<clinit>(RegKey.java)
at Test2.main(Test2.java)

Can some one please help me to solve this problem?, or can tell me another
way to read environment variable on windows NT plateform.

Thanks

The testing code Test2.java as following

============================================================
import java.util.*;
import com.ms.lang.*;

public class Test2
{
public static void main(String[] args)
{
RegKey rk = null;
try
{
rk = new RegKey(RegKey.USER_ROOT,"Environment",
RegKey.KEYOPEN_READ);
}catch(RegKeyException ex)
{
ex.printStackTrace();
System.out.println("Can not find register key!" );
System.exit(1);
}

String workPath = null;
try
{
workPath = rk.getStringValue("WORK_PATH");
}catch(RegKeyException ex)
{
ex.printStackTrace();
System.out.println("Can not find work path!" );
System.exit(1);
}

System.out.println("The work path is: " + workPath);
}


0 new messages