Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7159323
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:12:43+00:00 2026-05-28T13:12:43+00:00

My Java program fails with the following error on Windows. Exception in thread main

  • 0

My Java program fails with the following error on Windows.

Exception in thread "main" java.lang.UnsatisfiedLinkError: no XSvcSocket in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)

I tried different things like

  • adding the location of DLL to system’s path env variable
  • setting location of DLL explicitly in the program as below

            String libpath = System.getProperty("java.library.path");
            libpath = "C:\\extlibs;" + libpath;
            System.setProperty("java.library.path", libpath);
            libpath = System.getProperty("java.library.path");
    

java.library.path I get see is shown below.

"Lib Path: C:\extlibs;C:\Program Files\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows"

The DLL in question is available in “C:\extlibs”. Couple of observation are that when I place the DLL into “C:\Program Files\Java\jre6\bin”, my program doesn’t crib about the DLL (i.e it loads it) but I have to take care of many other DLLs too.

Can anyone shed some light on this behavior? by the way I am also not able to figure out from where eclipse is picking C:\Program Files\Java\jre6\bin and adding to java.library.path? it’s not part of system’s path environment variable.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:12:44+00:00Added an answer on May 28, 2026 at 1:12 pm

    The correct way to add native libraries in eclipse is as shown below. Go to Properties/Java Build Path/Libraries/Expand the jar file for which you want to add the native library/Select Native Library location/Click Edit/Add the DLL

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have found following question: $0 (Program Name) in Java? Discover main class? but
I get the following error when my program attempts to connect to a URL
When trying to run the following command to compile some_file.java in Windows javac -classpath
I have a Java program that loads thirdparty class files (classes I did not
We have a java program that requires a large amount of heap space -
From within my Java program I want to determine which .NET Framework is installed
I wrote a Java program to add and retrieve data from an MS Access.
You launch a java program from a console (maybe using a .bat script). I
We have a Java program run as root on Unix, that therefore can read
I am running a java program that sets up a database connection to an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.