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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:03:21+00:00 2026-06-02T08:03:21+00:00

I have a homework assignment in Java that is tested using the commands: make

  • 0

I have a homework assignment in Java that is tested using the commands:

make
./<program_name> <arguments> 

my make file compiles my java program successfully, but how can the program be run without using the command:

java <program_name> 

I have investigated how to convert a .jar into an .exe but I am convinced that is not the answer I am looking for.

I believe the test is run on a Linux machine. Is there something I can include in the make file to cause the command

./<program_name> 

to run a compiled java class?

  • 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-02T08:03:22+00:00Added an answer on June 2, 2026 at 8:03 am

    Without converting the java program in a native executable file, that will be different for linux, for windows and any other platform (so you will loose Java portability), the only thing you can do is to create a launch script.

    On *nix system you can create a bash script and on windows a batch script. Then in this script you have to call java <program_name>.
    With the script you are now able to launch your application with a single command.

    For example on unix you can create myapp.sh:

    #!/bin/bash
    java -classpath bin com.test.YourApp $*
    

    and make this script runnable with command

    chmod a+x myapp.sh
    

    in this example when you write myapp.sh command you launch your Java class com.test.YourApp using the folder bin as classpath.

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

Sidebar

Related Questions

I have a homework assignment to make a simple program in assembly language for
I have a homework assignment where I need to take input from a file
Wrote up a basic file handler for a Java Homework assignment, and when I
As part of a homework assignment, I have to program a simple chess game
For a homework assignment I have to make a makefile (physically and in software)
A homework assignment requires me to make a bag data structure in Java by
I have a homework assignment where I am buildign a GUI JPane that holds
Our homework assignment asks us to prove that the Java LinkedList implementation is doubly-linked
So in my java class we have a homework assignment to use System.currentTimeMillis to
I have a homework assignment that asks to create an order form. The order

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.