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

  • Home
  • SEARCH
  • 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 8436307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:08:43+00:00 2026-06-10T07:08:43+00:00

I am a newer in shell script, following is a shell script: $JAVA_HOME/bin/java -Dpid=MyJava

  • 0

I am a newer in shell script, following is a shell script:

$JAVA_HOME/bin/java -Dpid=MyJava \
    -Xms${HEAP_MIN}m -Xmx${HEAP_MAX}m -cp ${CPG_CLASSPATH} \
    -Dconfig=${CFG_FILE} \
    -Dcom.test.eps.configpath=${my_config}/ \
    -Dcom.test.eps.rt.config=${my_config}/ \
    -Dlog4j.configuration=file:///${my_config}/log4j.properties.ewf.rt \
    com.test.MyJava &

Can anyone tell me the code meaning of every line above?

  • 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-10T07:08:45+00:00Added an answer on June 10, 2026 at 7:08 am

    $JAVA_HOME/bin/java — invokes the JRE binary located at the bin path of the folder designated by the $JAVA_HOME variable set in the current user’s enviornment. That is, it runs Java, specifically the version pointed at by JAVA_HOME.

    The trailing \s are escape charecters which escape the newline at the end of the line. Normally in a shell program a newline at the end of the line tells the shell that you’re done with the command and it can interpret it now. Ending a line with \ tells the shell that the command will actually continue on the next line, i.e. this is all one command.

    -Dpid=myJava — sets a system property for the jre named pid with value myJava. Java programs can basically ask, getProperty("pid") at runtime and it will return "myJava" and then choose its behavior appropriately, this is a way of configuring the programs the the JRE runs.

    -Xms${HEAP_MIN}m — sets javas min heap size to value in ${HEAP_MIN} env var. The heap size is how much memory the jre sets aside to store its stack trace.

    -Xmx${HEAP_MAX}m — sets Java’s max heap size to value in ${HEAP_MAX} env var.

    -cp ${CPG_CLASSPATH} — sets the Java classpath to the value in the ${CPG_CLASSPATH} env var.

    -Dconfig=${CFG_FILE} — sets a system property for the JRE named config with value ${CFG_FILE}.

    -Dcom.test.eps.configpath=${my_config}/ — sets a system property for the JRE named com.test.eps.configpath with value ${my_config}.

    -Dcom.test.eps.rt.config=${my_config}/ — sets a system property for the JRE named com.test.eps.rt.config with value ${my_config}.

    -Dlog4j.configuration=file:///${my_config}/log4j.properties.ewf.rt — sets a system property for the JRE named log4j.configuration with value file:///${my_config}/log4j.properties.ewf.rt.

    com.test.MyJava is a Java class essentially located on the classpath at com/test/MyJava.class which presumably has a main function. After the JRE initializes with all of the previous configurations set, it will run this class and run its main function.

    & tells the OS to run this command in its own process and not to wait for it to return before the cli gives control back to the user. It’s basically telling the OS to run this program in a process separate from the one which is running your shell.

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

Sidebar

Related Questions

I have the following line in a shell script: source bash_profile It does not
I'm newer to Objective-C though I have worked in Java, C, and C++ and
I'm newer in JavaScript.So maybe my question will seem naive. My JavaScript Code: <script
I've never done shell script before and now I'm running into a simple problem...
I'm trying to write a shell script to backup websites, I've got it to
So I'm trying to execute a shell script which produces a lot of output(in
I'm trying to execute a shell command from a java application, on the GNU/Linux
try set logindetails to (do shell script curl google.com) on error display dialog Unable
I made a shell script that get a remote file with ftp protocol, if
I have a bourne shell script which performs several tasks. One of these tasks

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.