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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T17:56:01+00:00 2026-06-06T17:56:01+00:00

Specifically I am trying to open a file from SharePoint, but it’s really just

  • 0

Specifically I am trying to open a file from SharePoint, but it’s really just a website, and I have the proper access so that’ not an issue. I am trying to use the desktop api in java to open it, but it gives me an error message “File does not exist!” Does desktop only work locally? If it does work for websites, what am I doing wrong?

new code based on stephen c’s suggesttions, it still does not work however. What am I missing?

public class ParseURL {
        public static void main(String[] args) throws Exception {
            try {
            URL url = new URL("http://wss/is/sites/itsd/network/Remote%20Access/Soft%20Tokens/Your%20new%20RSA%20Soft%20Token%20for%20Android%20-%20INC%20XXXXXXX.oft"); 
            InputStream is = url.openStream(); 
            is.close();
            } catch(IOException err) { 
              }
        }
    }

old code

 public static void main(){

        try {

            File oftFile = new File("http://wss/is/sites/itsd/network/Remote%20Access/Soft%20Tokens/Your%20new%20RSA%20Soft%20Token%20for%20Android%20-%20INC%20XXXXXXX.oft
");
            if (oftFile.exists()) {

                if (Desktop.isDesktopSupported()) {
                    Desktop.getDesktop().open(oftFile);
                } else {
                    System.out.println("Awt Desktop is not supported!");
                }

            } else {
                System.out.println("File does not exist!");
            }

            System.out.println("Done");

          } catch (Exception ex) {
            ex.printStackTrace();
          }
    }
    }
  • 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-06T17:56:03+00:00Added an answer on June 6, 2026 at 5:56 pm

    Try using HttpURLConnection.

    This is a web address and you need to connect to the url and read the contents from the stream you get from the connection.

    See Usage here

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

Sidebar

Related Questions

I'm trying to read and process lines from a file in Ruby. I have
Specifically, I'm trying to figure out if it's possible to generate SQL that does
I'm trying to target mobile devices (specifically the iPad and iPhone) but using CSS3
I'm trying to get the plain text from a word document. Specifically, the xpath
I'm trying to write a plugin that will extend InheritedResources . Specifically I want
I have a problem that I have been trying to find a solution for
I've been at this for hours but it just isn't working. I'm trying to
I'm trying to add an autocmd to vim that will execute whenever I open
I'm trying to parse a webpage using open-uri + hpricot but it seems to
I am trying to scrape http://www.nscb.gov.ph/ggi/database.asp , specifically all the tables you get from

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.