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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T06:40:34+00:00 2026-05-16T06:40:34+00:00

Okay I have a folder say… http://oldserver.net/file/index.jar How would I be able to protect

  • 0

Okay I have a folder say… http://oldserver.net/file/index.jar

How would I be able to protect the file “index.jar” from being downloaded from regular web browsers?

I’ve seen this done before, I just want to protect it from being accessed from web browsers, and keep it strictly java download access only.

What I mean by java download access only is, I could simply use a java downloader to download index.jar. But I can’t download it via web browser.

How would I protect the file “index.jar” ?

Thanks:)

  • 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-16T06:40:35+00:00Added an answer on May 16, 2026 at 6:40 am

    You need to think about what this requirement means specifically – from the point of view of your server, how can it tell whether an incoming request is a “java download” or not?

    In short, I don’t think there’s a way to do exactly what you’re after. The classic way to secure resources would be by requiring authentication (i.e. you need a valid username and password to get the index.jar file) but it doesn’t sound like that’s what you want here.

    Bear in mind that Java simply sends HTTP requests (or other protocols that it knows how to speak) down a connection. Any other program could send identical requests, so there’s quite simply no way to enforce this limit in the way that you’ve specified.

    One approach that might simulate what you’re after is to not have the index.jar accessible via HTTP, so browsers wouldn’t be able to get at it by default, and then access it via another protocol in Java (e.g. FTP, SFTP, whatever). Though as mentioned above, any tool that can speak this new protocol would be able to download the file.

    Another approach would be to look for Java-specific headers, such as the User-Agent field (assuming this is populated with something recognisable). But again – this is not secure, as any tool could send through the same headers and impersonate a java download.


    If you mean in your question that you only want your files to be downloaded by a specific Java application, then things get a bit more feasible. You can distribute an application that contains some authentication (e.g. public/private key pair) and have the server challenge for this when index.jar is requested. But even then this is dubious – by definition the Java app has to contain sufficient information to authenticate as itself; and by definition you have to distribute this information publically; so it wouldn’t be difficult to extract the private keys and have some other application masquerade as your Java one.


    Basically, I can’t see any way around this issue given the confines you’ve stated. If there’s a narrower scope you’d be willing to entertain you may be able to come up with a viable compromise, but right now the answer is simply “no”.

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

Sidebar

Related Questions

Okay so let's say I have a folder and in a folder I have
I am unable to unzip file on sdcard. I have tested http://www.jondev.net/articles/Unzipping_Files_with_Android_%28Programmatically%29 How to
Okay so I have a web view that holds the chat bar div from
My OS environment is linux. I have a php file in this folder -
okay, so i have an asp.net (C#) application and i want to add a
okay I have a dilemma. I am want to be able to upload a
Okay, So I have a PHP file that uploads a image to my server.
Hello there okay so this is the deal i have a folder where my
Okay I have a large CRUD app that uses tabs with Forms embedded in
Okay I have a series of objects based on a base class which are

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.