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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:09:52+00:00 2026-05-13T15:09:52+00:00

Possible Duplicate: How to access java-classes in the default-package? I am using Eclipse 3.5

  • 0

Possible Duplicate: How to access java-classes in the default-package?


I am using Eclipse 3.5 and I have created a project with some package structure along with the default package. I have one class in default package – Calculations.java and I want to make the use of that class in any of the package (for instance in com.company.calc). When I try to make the use of the class which is in the default package, it’s giving me a compiler error. It’s not able to recognise the class in default package. Where is the problem?

Calculations.java – source code

public class Calculations {
    native public int Calculate(int contextId);
    native public double GetProgress(int contextId);
    static  {
        System.loadLibrary("Calc");
    }
}

I can’t put my class in any other package. This class has some native methods which are implemented in Delphi. If I put that class in any of the folders, I will have to make changes to that DLL which I want to avoid (really – I can not). That’s why I put my class in the default package.

  • 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-13T15:09:52+00:00Added an answer on May 13, 2026 at 3:09 pm

    From the Java language spec:

    It is a compile time error to import a type from the unnamed package.

    You’ll have to access the class via reflection or some other indirect method.

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

Sidebar

Ask A Question

Stats

  • Questions 491k
  • Answers 491k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Sending large number of emails at once can really bog… May 16, 2026 at 10:07 am
  • Editorial Team
    Editorial Team added an answer Take a look at the Query Plan that SQL Server… May 16, 2026 at 10:07 am
  • Editorial Team
    Editorial Team added an answer Not a direct answer, but it seems you are equating… May 16, 2026 at 10:07 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Possible Duplicate: Best Java obfuscator ? Well, I'm planning on releasing a Jar into
Possible Duplicate: Unchecked exceptions in Java: Inherit from Error or RuntimeException? Looking at how
Possible Duplicate: Check if access table exists I'm new to vba macros. Any idea
Possible Duplicate: Any way to access array directly after method call? In C# and
Possible Duplicate: Should I learn C before learning C++? As a professional (Java) programmer
Possible Duplicate: How do you give a C# Auto-Property a default value? Hi all:
Possible Duplicate: How to detect if JavaScript is disabled? I have a website which
Possible Duplicates: ‘Friends’ equivalent for Java? Is there a way to simulate the C++
Possible Duplicate: When should you use 'friend' in C++? I was brushing up on
Possible Duplicate: How to copy part of an array to another array in C#

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.