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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:05:44+00:00 2026-06-01T05:05:44+00:00

I currently have a small text game I’ve written in Java that utilizes System.out.print();

  • 0

I currently have a small text game I’ve written in Java that utilizes System.out.print(); to output text and a Scanner to receive input from the user.

I’ve compiled the runnable .jar and used IExpress to create a .exe that runs the batch command java -jar "foo.jar" upon execution. It’s not the best way to distribute the game, but it’s a quick way to distribute it to friends for play testing in Windows.

I’m wondering if there is an equivalent for this for OSX? I know I can write a shell script to open the terminal and execute the .jar file, but will it work if the shell script and .jar are distributed to other computers? Does each person have to give the .sh file “execute” permission? Some of these people aren’t really tech savvy and even mentioning opening terminal would turn them off to helping me play test.

So is there a way to give them something to double-click on that will open terminal and run my .jar?

Thanks in advance!

  • 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-01T05:05:46+00:00Added an answer on June 1, 2026 at 5:05 am

    Here are two possible options (the first of which will probably not open the terminal, but I’m leaving here in case you find a way to do so with the below mentioned JarBundler)

    1 – Building a native java application bundle and installer

    The answer is somewhat two-fold. OSX applications have a specific directory structure which the operating system expects to be in place, they are called application bundles (google for “osx application bundle programmers guide” for the messy intricate details). Jar Bundler is an Ant task which can build a bundle for you without you needing to understand the bundle format itself.

    That alone is enough to allow you to drag the application onto the OSX dock. However, what is more common is an installer. To build an installer, you need to build a DMG file. Some good documentation on how to create this with ant can be found here.

    The gist of it is to create a disk image, attach to it, copy your application into it, detach from it, and compress it. A typical OSX installer is a window with a copy of your application and a symbolic link to the /Applications directory. When the installer window opens up, it displays both of these items and you normally drag the application to the /Applications icon, “installing it” (in reality, just copying it to /Applications).

    The following the relevant Ant build files from my project for building an application bundle as well as building a DMG file (both are google-code links). They do not require any of the GUI tools.

    Both of those files are pretty heavily commented.

    However, I have a feeling this will not open the terminal window as you desire (you may be able to work with the stubfile option in JarBunder to get it to do what you want).

    2 – Create an application bundle from your shell script

    This link shows you how to create an application bundle out of a shell script.

    You can then create a DMG file out of your application bundle to simplify installation for your users. The DMG file will preserve the execution file attributes so they will not need to manually chmod +x your script.

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

Sidebar

Related Questions

I currently have a small Java program which I would like to run both
I currently have a small laptop and a desktop (+ gaming rig) that I
We have a small 3 developer team that is currently using Subversion for our
I have a small Java desktop app that uses Swing. There is a data
I'm creating a small win32 application. Currently I have 6 text labels coded in
I'm building a small PyGTK application and I have an text input field (currently
I have a simple application that reads data in small strings from large text
I have a small linux vps. I have written a Java client application, which
We (small team) currently have our Visual Studio projects on a network drive (no
I am working with a small theatre company. Currently they have a list of

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.