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

  • SEARCH
  • Home
  • 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 7812165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:25:28+00:00 2026-06-02T04:25:28+00:00

I am developing a Java program in eclipse using a proprietary API and it

  • 0

I am developing a Java program in eclipse using a proprietary API and it throws the following exception at run-time:

java.io.UnsupportedEncodingException: 
    at java.lang.StringCoding.encode(StringCoding.java:287)
    at java.lang.String.getBytes(String.java:954)...

my code:

private static String SERVER = "localhost";
private static int PORT = 80;
private static String DFT="";
private static String USER = "xx";
private static String pwd = "xx";


public static void main(String[] args) {

    LLValue entInfo = new LLValue();
    LLSession session = new LLSession(SERVER, PORT, DFT, USER, pwd);

    try {
        LAPI_DOCUMENTS doc = new LAPI_DOCUMENTS(session);
        doc.AccessPersonalWS(entInfo);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

The session appears to open with no errors, but the encoding exception is thrown at doc.AccessEnterpriseWS(entInfo)

Through researching this error I have tried using the -encoding option of the compiler, changing the encoding of my editor, etc.

My questions are:

  1. how can I find out the encoding of the .class files I am trying to use?
  2. should I be matching the encoding of my new program to the encoding of the API?
  3. If java is machine independent why isn’t there standard encoding?

I have read this stack trace and this guide already —

Any suggestions will be appreciated!

Cheers

  • 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-06-02T04:25:29+00:00Added an answer on June 2, 2026 at 4:25 am

    Run it in your debugger with a breakpoint on String.getBytes() or StringCoding.encode(). Both are classes in the JDK so you have access to them and should be able to see what the third party is passing in.

    The character encoding is used to specify how to interpret the raw binary. The default encoding on English Windows systems in CP1252. Other languages and systems may use different a different default encoding. As a quick test, you might try specifying UTF-8 to see if the problem magically disappears.

    As noted in this question, the JVM uses the default encoding of the OS, although you can override this default.

    Without knowing more about the third party API you are trying to use, it’s hard to say what encoding they might be using. Unfortunately from looking at the implementation of StringCoding.encode() it appears there are a couple different ways you could get an UnsupportedEncodingException. Stepping through with a debugger should help narrow things down.

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

Sidebar

Related Questions

I am developing a Java program using Eclipse that should exit with different codes
So suppose I'm developing a chess-like program using Java's Swing. I added a MouseListener
I am developing a simple Java program to create an Excel file using (Apache
I'm developing a multi-threaded Java program use different assertions throughout the code and run
I want to run a Java program on a specific date. I am developing
I'm beginner in Java Android developing. I'm using Eclipse SDK 3.6.1 version. I'm trying
I mean to say while developing application in eclipse. If i write java program
I'm developing a Java plugin for an existing Java program. The existing program uses
I'm new in Java. I'm developing program for Android similar to app for iOS.
I am developing two java programs that run in separate VM's that have a

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.