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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:47:23+00:00 2026-06-12T18:47:23+00:00

I want to ship a single security policy file to our customers – for

  • 0

I want to ship a single security policy file to our customers – for both Linux and Windows. In the java.security file, I add a line to point to our file, but due to path differences I have to specify it differently for Windows and Linux

policy.url.3=file:/${our.home}/lib/OurSecurity.policy  # Windows
policy.url.3=file:${our.home}/lib/OurSecurity.policy   # Linux

That first “/” after the “file:” is needed on windows since the variable our.home is defined as “C:\foo”. I have the same problem in the policy file itself:

grant codeBase "file:/${our.home}/-"   // Windows
grant codeBase "file:${our.home}/-"    // Linux

I’m especially looking for a clever way to specify the codeBase in a platform independent way. By the way, redefining our.home is not really an option, as it’s needed in a FilePermission clause.

  • 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-12T18:47:24+00:00Added an answer on June 12, 2026 at 6:47 pm

    If it were me, I would accept the fact that I needed different files and generate the linux version from the windows version by having a script to remove the “/”.

    However if you really need to use the same file, you could swap one pain for another by just defining another environment variable to represent the “/” on windows and have it blank on linux.

    # our.hack = "/" on windows
    # our.hack = "" on linux
    policy.url.3=file:${our.hack}${our.home}/lib/OurSecurity.policy
    

    Perhaps our.hack is not the best name in a production environment, but you get the idea. The variable is not used for anything else, so should not interfere with the rest of the app.

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

Sidebar

Related Questions

I want to ship a single 32/64-bit universal binary of my desktop Mac OS
I want to ship a text file along with my App and read it
Below is a method that I want to ship off into a background worker
want to open pdf file when a user clicks on hyperlink shown in gridview
Want to open firefox from terminal at linux with firebug enabled // Terminal $
I want to ship static read-only data for use in my Core Data model.
I want to ship some default data with my app. This data can be
I've a FreeMarker library that I want to ship with my product, and I'm
I want to ship my iPhone app with some preferences but I don't need
I have developed a number of frameworks that I want to ship with my

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.