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 8099569
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:27:02+00:00 2026-06-05T22:27:02+00:00

Im having an issue when im trying to read in a text file while

  • 0

Im having an issue when im trying to read in a text file while using a JApplet and Java Web Start, basically I have a file with a users data in it which I wish to read in. The text file is stored on the web server. Here is the code:

company.readCompanyFile("file:///C:/Users/Chris/Desktop/ArFile Clients/" + companyName + "/"
                    + companyName + ".cmp");

and the readCompanyFile function is:

public void readCompanyFile(String cname)
{
    try
    {
        BufferedReader br = new BufferedReader(new FileReader(cname));

        name = br.readLine();
        quota = Float.parseFloat(br.readLine());

        String s;
        while ((s = br.readLine()) != null)
        {
            String[] parts = s.split(":");

            metadataFields.add(parts);
        }

        br.close();
    }
    catch(IOException e)
    {
        System.out.println("File does not exist, or has invalid format");
    }
}

Which throws the following error when attempting to launch via java web start

BadFieldException[ The field <extension>href has an invalid value: C:\Users\Chris\Desktop\ArFile Clients,C:\Users\Chris\Desktop\ArFile Clients]
    at com.sun.javaws.jnl.XMLUtils.getAttributeURL(Unknown Source)
    at com.sun.javaws.jnl.XMLUtils.getRequiredURL(Unknown Source)
    at com.sun.javaws.jnl.XMLFormat.handleResourceElement(Unknown Source)
    at com.sun.javaws.jnl.XMLFormat.access$800(Unknown Source)
    at com.sun.javaws.jnl.XMLFormat$2$1.visitElement(Unknown Source)
    at com.sun.javaws.jnl.XMLUtils.visitChildrenElements(Unknown Source)
    at com.sun.javaws.jnl.XMLFormat$2.visitElement(Unknown Source)
    at com.sun.javaws.jnl.XMLUtils.visitElements(Unknown Source)
    at com.sun.javaws.jnl.XMLFormat.buildResourcesDesc(Unknown Source)
    at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptorFromCache(Unknown Source)
    at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptorFromCache(Unknown Source)
    at sun.plugin2.applet.JNLP2Manager.initialize(Unknown Source)
    at sun.plugin2.main.client.PluginMain.initManager(Unknown Source)
    at sun.plugin2.main.client.PluginMain.access$200(Unknown Source)
    at sun.plugin2.main.client.PluginMain$2.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Error while initializing manager: BadFieldException[ The field <extension>href has an invalid value: C:\Users\Chris\Desktop\ArFile Clients,C:\Users\Chris\Desktop\ArFile Clients], bail out
  • 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-05T22:27:03+00:00Added an answer on June 5, 2026 at 10:27 pm

    The text file is stored on the web server.

    … whereas the applet runs on the client computer. How is it going to read the file?

    You have to make it accessible over the network, for example by HTTP (put it next to the applet on your server).

    Also, that stacktrace does not seem to have anything to do with your code. It looks like Webstart failed to parse the deployment descriptor (probably also because of referencing files on the server’s disk).

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

Sidebar

Related Questions

I'm having an issue while trying to generate some Java classes. C:\Users\kon\Desktop>wsimport -keep -verbose
hello fellow java developers. I'm having a very strange issue. I'm trying to read
I am having an issue trying to make a small text-fantasy type game involving
One of my users is having an issue when trying to open an Excel
help me please i'm having the following issue: I'm trying to read a XML
I'm trying to read UTF-8 from a text file and do some tokenization, but
What i'm trying to do is open every text file in a directory, read
I'm having an issue trying to fix a conflict between both libraries and have
I'm having an issue using a new WPF app that is trying to display
I'm having an issue trying to directly upload a file to azure blob storage.

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.