Package Structure In Maven - java

I have created a maven project on my Mac using Eclipse. My package structure comes in a folder and its hard for me to create a java class. Packages also do not show up.
How can I fix it? tried googling no solution? please help.

Related

This file does not belong to the project : IntelliJ IDEA

I am New to java and
Just installed JDK and IntelliJ IDEA
I created a project in IntelliJ IDEA
The below picture shows The project structure
However When I edit the file It shows: This file does not belong to the project
And the Main.java file formed is not showing in the project.
The complete structure is as follows
I dont know If this makes any sense But, In the tutorials I have watched, unlike in my case the src folder is present under the project itself.
I would Highly appreciate If someone could help

How can I add dbf.DbfReader to my java project?

I am new to Java, but I need to understand how code written on Java works. There is import org.jamel.dbf.DbfReader;. I wanted to run the code on NetBeans, but I'm confused how to add this library to the project.
There is no .jar file and I've already tried adding the whole folder to libraries in my project, but it still does not work. I've downloaded the folder with the library from https://github.com/jamel/dbf .
Could anyone tell me what I'm doing wrong?
Would be very grateful.

Errors on importing MoPub SDK on Android in Eclipse

I'm facing a lot of errors while importing MoPub SDK to my workspace. It shows over 5000 errors.
Could you tell me what I'm doing wrong? I've tried to import as Java Project, then as Android Project. I have set it as library, and referencing to it as a library from my main project.
Any help will be appreciated.
Thank you,
Wojtek
I've figured it out. After importing the project Eclipse made Java Build Path -> Source:
mopub-sdk/gen
mobup-sdk/src
But it should be:
mopub-sdk/gen
mobup-sdk/src/main/java
Simple Remove and then Add Folder... solve the issues.

Importing a checkout svn source code as java project in eclipse

I have a project whose source code is hosted in svn and I have checked out the source code already say in a folder "myfolder". The directory structure of my code is as follows:
myfolder/trunk/src/ is where my code resides. Now I create a Java project using eclipse using File -> new java project with the location to be myfolder/trunk/src/. When I do this, all the package structure gets changes and I have errors in my sources files.
It would be great if somebody can tell me what is the correct way to do this. I have found some articles on the internet, but the more I read the more I get confused.
Thanks
Vandana
You should have probably chosen to Import Existing Project into your workspace and you should try that instead. It works great as long as you have your .project file defined. To fix the errors you have now, Create a new src folder in your project and point it at trunk\src, so that it correctly recognizes all your Java files.
You probably should use myfolder\trunk as the root of your project, rather than myfolder\trunk\src. As Perception has mentioned, try to "Import Existing Project" first (rather than start a new project and point it at your source).
First, I assume you already have subversive/subclipse plugin installed in your Eclipse and you have used the right URL to import your source code.
Before checkout your source code, you may change your perspective to Java perspective.
Then you only need to use File-Import-SVN(choose SVN as your import source)-Checkout projects from SVN-Next-Give your project a Name-Finish.
If you have problem about installing SVN plugin, reference is http://subclipse.tigris.org/
http://www.eclipse.org/epsilon/doc/articles/epsilon-source-svn/

EdgeType.DIRECTED not working

I recently figured out how to add the Jung libraries to eclipse, but now I ran into a new problem. I'm using the Jung tutorial and I can't seem to run the first tutorial, because the Eclipse IDE is saying that the .DIRECTED ,in the code, cannot be resolved or is not a field. How do I fix this?
edit: Yes, using that package worked! However, I'm surprised that the Eclipse IDE did not offer to import the package for me. Is this unusual?
Make sure to include all the required JUNG2 libraries into your Eclipse project. When you do that, Eclipse will give a few suggestions after you right-click on those yellow-underlined words. Choose the one(s) related to JUNG2 to remove the warning(s).
EgeType.DIRECTED must be imported from edu.uci.ics.jung.graph.util.EdgeType package which is under jung-graph-impl-2.0.1.jar

Categories