Questions tagged [default-package]
17 questions
                    
                    108
                    
            votes
                
                5 answers
            
        How to access java-classes in the default-package?
I'm working now together with others in a grails project. I have to write some Java-classes. But I need access to an searchable object created with groovy. It seems, that this object has to be placed in the default-package. 
My question is: Is there…
         
    
    
        Mnementh
        
- 50,487
- 48
- 148
- 202
                    107
                    
            votes
                
                9 answers
            
        How to import a class from default package
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…
         
    
    
        Michał Ziober
        
- 37,175
- 18
- 99
- 146
                    33
                    
            votes
                
                3 answers
            
        What is the default package in which my classes are put if I don't specify it?
Let's assume I have a file named Main.java with the following code:
public class Main {
    public static void main(String[] args) {
        System.out.println("Hello world");
    }
}
Is it put in a specific package, in (maybe?) an unnamed package?
         
    
    
        devoured elysium
        
- 101,373
- 131
- 340
- 557
                    9
                    
            votes
                
                1 answer
            
        How to run Dropwizard app in debug mode with Eclipse?
I'm looking to run my Dropwizard 0.8.5 app in debug mode whereby:
The app is running locally, using JPDA; and
In my IDE (Eclipse) I set breakpoints and use a JPDA client to connect to my locally running app (I think this is how it goes)
For the…
         
    
    
        smeeb
        
- 27,777
- 57
- 250
- 447
                    3
                    
            votes
                
                6 answers
            
        Why shouldn't we use the (default)src package?
I recently started using Eclipse IDE and have read at a number of places that one shouldn't use the default(src) package and create new packages.
I just wanted to know the reason behind this.
         
    
    
        YetAnotherG33k
        
- 272
- 3
- 7
                    2
                    
            votes
                
                0 answers
            
        Changing lua default package
I'm currently running Ubuntu and I'm having a problem with lua. When I try to run my project with cmake, it says LUA_LIBRARY-NOTFOUND.
However, I did install lua, and when I check in my /usr/include folder, I can see that lua is there.
But I have…
         
    
    
        BenoitBo
        
- 21
- 3
                    2
                    
            votes
                
                2 answers
            
        Why use of default package is not recommended in JAVA?
Why is it not recommended to use default package in JAVA? Though I understand it makes more sense to have a more reasonable and descriptive package names for maintainability and readability purposes, but are there any other reasons behind it?
         
    
    
        aamir
        
- 3,753
- 4
- 23
- 34
                    1
                    
            vote
                
                1 answer
            
        Default project missing
In my Output console, i cant seem to find default project.
Does anyone know how to get it back?
The picture with the arrow is from a youtube video, the black screen is mine.
Edit:
I noticed my location of the arrow is really stupid.
The text below…
         
    
    
        Rojhat
        
- 79
- 7
                    1
                    
            vote
                
                0 answers
            
        How can I import classes that are located inside a referenced library?
I've created a .jar file with the classes I need for my project. I created the build path for that .jar file. However, I cannot use the classes inside the referenced library that was created. So far, as I can tell, the problem is that my files…
         
    
    
        Connor Loughlin
        
- 11
- 1
                    0
                    
            votes
                
                1 answer
            
        I get a class not found exception when i rename the package from "default package"
I get a class not found exception when i rename the package from "default package" in java. When i run the code within the default package, the code works fine but when i paste the code into a new java project in eclipse and into a new package,…
         
    
    
        DEKE
        
- 31
- 3
                    0
                    
            votes
                
                1 answer
            
        How to access a Java class in the default package from jshell?
I am unable to access Java classes in the default package from jshell. I cannot import since the default package has no name and when I try to reference the name then I have an error:
jshell> Test.test(); |  Error: |  cannot find symbol |   …
         
    
    
        Pierre Thibault
        
- 1,895
- 2
- 19
- 22
                    0
                    
            votes
                
                1 answer
            
        About java default package(using Eclipse)
Now, I'm using some methods by using a jar.
But these classes I use have no package names.
I can use reflection to solve the problem of using these methods.But now I want to override some of the interface and classes.
However,others can extends…
         
    
    
        Matrix Zion
        
- 1
- 1
                    0
                    
            votes
                
                1 answer
            
        How to add prefixes to jni dll function names
I have a jni dll that has functions being called from java. The problem is that this dll has all the java classes in the default package (in the dll "Java_classname_methodname"). It is impossible to get the source of this dll and it would take…
         
    
    
        user3441843
        
- 137
- 1
- 7
                    0
                    
            votes
                
                1 answer
            
        loading config file from default package vs from classpath
I'm getting a crazy error while loading a config file in a JAX-RS application on jetty.
public class Configuration {
    public static final Properties config = new Properties();
    static {
        config.clear();
        try (InputStream…
         
    
    
        Majid Azimi
        
- 5,575
- 13
- 64
- 113
                    0
                    
            votes
                
                1 answer
            
        How can i call a JFrame from a class?
I have an project which have a Jframe under a default package.I cant call the jframe from a another main class .
public class NewJFrame extends javax.swing.JFrame {
    /**
     * Creates new form NewJFrame
     */
    public NewJFrame() {
       …
        
    