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

The Archive Base Latest Questions

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

Is there a way to tell jvm to look for a class with entry

  • 0

Is there a way to tell jvm to look for a class with entry main method automatically rather than to specify it when invoking java ClassWithMainMethod?

In other words, I have directory with many compiled classes one of which has main method and I want to only specify that directory.

  • 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-28T03:42:57+00:00Added an answer on May 28, 2026 at 3:42 am

    No, there is no way to do that. You can create an executable jar, and define what the main class is in the jar manifest, allowing you to use

    java -jar MyJar.jar
    

    though.

    See http://docs.oracle.com/javase/tutorial/deployment/jar/appman.html

    You may also deliver your app with a script which executes the appropriate command for you:

    #startup.cmd
    java -cp ... com.foo.bar.Main
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to tell db4o to call class default constructor while activating
Is there a way to tell Tomcat 7 the path to the JVM that
Is there a way to tell the browser to look down a list of
Is there any way to tell Tomcat not to automatically start application which I
Is there a way to tell a method with optional parameters to use the
Is there any way to tell GCC to not initialize a particular global array
Is there a way to tell excel to not display non-significant series in a
Is there a way to tell ifort or gfortran to just try to parse
Is there a way to tell Visual Studio 2005 to not rearrange your SSIS
Is there a way to tell the php complier that I want a specific

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.