API throws java.io.UnsupportedEncodingException
<p>I am developing a Java program in eclipse using a proprietary API and it throws the following exception at run-time:</p>

<pre><code>java.io.UnsupportedEncodingException: 
    at java.lang.StringCoding.encode(StringCoding.java:287)
    at java.lang.String.getBytes(String.java:954)...
</code></pre>

<p>my code:</p>

<pre><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();
    }
}
</code></pre>

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

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

<p>My questions are:</p>

<ol>
<li>how can I find out the encoding of the .class files I am trying to use?</li>
<li>should I be matching the encoding of my new program to the encoding of the API?</li>
<li>If java is machine independent why isn't there standard encoding?</li>
</ol>

<p>I have read <a href="http://stackoverflow.com/questions/4927575/java-compiler-platform-file-encoding-problem">this</a> stack trace and <a href="http://illegalargumentexception.blogspot.ca/2009/05/java-rough-guide-to-character-encoding.html#javaencoding_sourcefiles" rel="nofollow">this</a> guide already --</p>

<p>Any suggestions will be appreciated!</p>

<p>Cheers</p>
