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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:58:08+00:00 2026-05-26T16:58:08+00:00

I have four java files in my folder. They are all in the same

  • 0

I have four java files in my folder. They are all in the same package. Here’s the package declaration
package com.osama.GHide

All of these classes are in the same package. I want to know how can I compile them using javac (i mean i do not know how to compile multiple files that are using each other). And once that is done how do I launch then using java command in the CLI? here are the file names.
EnteringPoint.java
HidingProcess.java
ListFiles.java

  • 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-26T16:58:09+00:00Added an answer on May 26, 2026 at 4:58 pm

    From the project’s root directory:

    javac src/com/osama/GHide/*.java
    

    To run, assuming no other dependencies:

    java -cp ./src com.osama.GHide.EnteringPoint
    

    (Assuming EnteringPoint has the normal main function.)

    The javac command compiles all the .java files in the package’s directory. Since they’re all in the same package/directory, this works. It also puts the generated .class files in the same directory, which may or may not be what you want.

    To put them in a different directory, use the -d option and supply a path.

    javac -d bin src/com/osama/GHide/*.java
    

    Then to run:

    java -cp ./bin com.osama.GHide.EnteringPoint
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have four public websites running on the same database with different schema(Oracle). All
I have four tables containing exactly the same columns, and want to create a
I have four flags Current = 0x1 Past = 0x2 Future = 0x4 All
I have some databases that have four files each; one for PRIMARY, IDX, IMAGE,
I have an e-commerce package called Prestashop. They allow you to sell virtual products,
I have some java source code. It an just an archive which is four
I am writing a Java application, and I have four radio buttons, call them
I have four tables, USER, CONTACT, CONACT_TYPE, and USER_CONTACT USER_CONTACT stores all of the
I have several java objects with four string properties as below: For e.g. say
I have four classes which share some arrangement of four properties. I have currently

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.