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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:24:22+00:00 2026-05-16T16:24:22+00:00

I have two Java classes giveMyOb and dataConn declared in the same directory. Both

  • 0

I have two Java classes “giveMyOb” and “dataConn” declared in the same directory. Both are public classes. “giveMyOb” has a static method “getMine()”. Inside dataConn, I called the static method as

giveMyOb.getMine();

When I try to compile dataConn.java, the following error is returned.

“Cannot find symbol

symbol: variable giveMyOb
location : class dataConn
giveMyOb.getMine(); “

It used to work earlier. But is not working now. Why is that?

Additional Information: JDK 1.6. Windows 7. 64 bit.

Update(30 days after the question): When compiled from Eclipse, the classes are referenced and it works. But the same won’t work when compiling from command line. I was unable to figure out the reason and nothing logical comes to my mind!

  • 1 1 Answer
  • 1 View
  • 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-16T16:24:23+00:00Added an answer on May 16, 2026 at 4:24 pm
    javac -classpath . *.java
    

    ought to create both .class files at the same time. It’s more complicated by packages. I’m assuming you have none.

    Learn the Sun Java coding conventions. You aren’t following them with those class names. They should start with a capital letter.

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

Sidebar

Related Questions

I have two Java-Classes as follows: public class MyClass { ... } public class
In Java I have two classes: Class A { public String ID; public Object
I have two Service classes which implement the same interface ServiceClass1 @Service public class
I have the following two classes: import java.io.*; import java.util.*; public class User {
Thanks !!i have two .java classes as trial.java and CommonActivity.java as: public void onClick(View
I have two Java class files: primegen and primecheck sitting in the same directory.
I have two classes. MetaDataExtractor(GUI) and MetaData. MetaData has the method which extracts the
I have two java classes as follows App1 without a package: class App1 {
I'm making a shopping list mobile application (Java ME) and i have two classes;
How do I do forward declarations in Java? I have two classes, each needs

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.