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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:42:13+00:00 2026-05-31T03:42:13+00:00

I am building a small Java program for a Mac user who is an

  • 0

I am building a small Java program for a Mac user who is an absolute novice when it comes to computing. Therefore, I would like to give him one file to execute, perhaps via a script. Before, I just gave the .jar file, which would run perfectly, but now I have to add VM arguments (max heap space). Unfortunately, I’m not well acquianted with OSX. So far, I was able to give the .jar and a .command file containing the text

#!/bin/bash

java -jar -ms128m -mx512m -jar file.jar

However, this gives the message ‘The file could not be executed because you do not have appropriate access privileges’. One solution is to use sudo in the console, but I’m afraid this is too complex. Therefore my question:

  • can I make a .command or other script run a java .jar file without going to the console?
  • or, can I wrap the .jar file in some kind of Mac executable, including VM arguments? I found a similar solution (Launch4j) for windows.
  • or, is there maybe another way to give a simple mail-downloadable, executable that runs a java program, but without installing any other programs?

edit: I do not have unlimited access to a Mac, so I would need a solution that does not require a Mac at each update of the .jar file.

Thanks a lot!

  • 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-31T03:42:15+00:00Added an answer on May 31, 2026 at 3:42 am
    1. If you have a Mac you can try out the Jar Bundler. It come with XCode or perhaps you can find it here https://developer.apple.com/downloads. With this app you can make a 1 Click Mac Executable.

    2. I don’t know if it’s possible with a Windows Eclipse version. Go to the Main-Class open the context menu and start the Export dialog. Search for Mac OS X application bundle and follow the steps.

    3. Create an extra Java “starter” class which starts itself again. You can call with ProcessBuilder another jar like this java -Xms1024M -Xmx1024M -jar app.jar.

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

Sidebar

Related Questions

I'm coming from the Java world and are building a small c++ program at
I'm building this small java applet in which I need a JPanel which will
I am building a small applet in java. It works fine (really!) when I
I'm building a small Android application, but this is more of a Java question
I'm building a small experimental application using BlazeDS AMF, Java and Hibernate, and I
I am new to Java and I am building small school project for android.
I'm building a small Java library which has to match units in strings. For
I am building some small Java application to run on Goole AppEngine. It is
I would like to find a good (up-to-date) Java Trail type beginning tutorial on
i'm building small sms-like application. I made conversation list view, but there is a

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.