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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:53:32+00:00 2026-06-15T10:53:32+00:00

I have 2 .java files I’m working with, one that is executable and the

  • 0

I have 2 .java files I’m working with, one that is executable and the other one is a custom class.

I understand that during compilation, the custom class will be automatically imported since it’s in the same folder on my machine. However, I’m using NetBeans and if I don’t ‘pretend’ to import it in NetBeans, it would always show up with red lines indicating errors when I type the class object. Is there any way to ‘import’ the class .java file into NetBeans?

I’m a noob in java so I’m not sure how to questions like this one, sorry if my use of vocabulary isn’t appropriate.
Thank you very much!

  • 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-15T10:53:33+00:00Added an answer on June 15, 2026 at 10:53 am

    If you have the two .class files in the same location, Java will always find the second one. The same location might be, for instance, a folder on your computer, a directory on a web server, or inside a .jar file. As long as Java can find one of them, it will find the other.

    There are many tutorials on the web about Java packages and the Java classpath. These concepts are important to understand as you start to write larger programs. A good place to start is the Java Tutorial on Packages.

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

Sidebar

Related Questions

I have one War files (a Java application) consist of 64 class file along
If I have all my .java and .class files in one place (i.e. in
Have there been incompatibilities between Java releases where Java source code/Java class files targeting
I have a Java project in Eclipse with ~10 packages and ~10 class files
I have several Java files that have Japanese strings in them, and are encoded
Under WEB-INF/classes folder i have java class files structured in package hierarchy(e.g: com.company.app )
I would like to have .class and .java files in a JAR. Thus, I
I use eclipse for developing my applications. I have 2 java files, one is
I have java class files and property files in the same directory. src/main/java/com/berlin/Test.class src/main/java/com/berlin/Test.properties
HI i have 3 java files a.java b.java c.java I managed to generate .class

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.