I created a NetBeans project. I took the project folders zipped to another machine and tried opening it in NetBeans. NetBeans didn't identify it as a NetBeans project. I have transfered projects in this way before but why is it not working now? Are any of my project files corrupted. Is there any way to retrieve my files from this?
Try using create new project from existing resources. This may solve the issue.
I just copied whole project into place in system where NetBeans stores projects (in windows it's user\username\Documents\NetBeansProjects\ by default), then started NetBeans and voila - worked great :)
You can try this:
Create a new project on the target machine
Find where the project you want to open is stored and open the src folder.
Copy all the files and stuff in the /src folder
Go on Netbeans, expand the tree view of the project you have just created, right click on source packages and click paste. It should paste the files in the /src folder as packages. You should also see the code these packages contain.
I discovered this solution and it worked for me: http://netbeans-org.1045718.n5.nabble.com/Netbeans-Crashes-Since-Windows-Update-td5752603.html
The fix is to remove the GodMode shortcut that may have been created on your Desktop or on the root of the %systemdrive%.
Related
I'm currently working on a groupproject. We're using github to save our code. I have just installed eclipse to work on. I foound to open the project to use import. This has opened the project, except the SRC folder is empty whereas the first SRC folder (the main which was made through github) has several .java files within.
Why is this and how do I go about putting them in. I am unable to work on the code through eclipse at the moment due to this. Thank you, much appreciated.
The easiest way would be to:
clone manually the GitHub repo (in command line)
import the Eclipse project in your Eclipse workpace
Then push to the GitHub repo
Or you can clone the GitHub project through Egit directly,, following this tutorial.
The OP pokeairguy reports in the comments an alternative solution:
create a new project in eclipse like normal.
Then drag the contents of the src folder from GitHub into the folder directory within eclipse.
Then selecting link in the pop up window.
I think it works by thinking its a new project but saves everyone done under the GitHub folder, for GitHub to work.
My directory structure in the Project seems to have disappeared. The first picture is the "bad". I recently upgraded to 12.1 and the vim emulator at about the same time. I don't know if I missed a dialog that reset something? I can't figure out how to get it back like the second picture.
I've tried to re-import the project but it has not helped. I keep the project on Dropbox and have another PC where I have not reloaded project. Is there a way to get my view from that machine?
The picture is the "good" and how I want it to look.
I've come across this problem a few times myself. What happened is that intellij lost the module in my project settings. Here's my steps to fix it:
File -> Project Structure -> Click on modules (notice empty list) ->
Click on '+' -> Click on import module -> Find existing myProj.iml
I also have quite a few IntelliJ projects and also git folders of text files. I found IntelliJ does not always reconstruct the .idea files correctly. However the following methods work for me.
Open IntelliJ in the top folder where there is no .idea folder. Often IntelliJ will just construct a new .idea folder and works.
Copy an .idea folder from a similar project and modify to fit. The xml files in the .idea are reasonable to modify.
Open IntelliJ in the root project level works for me.
I have a mixed project folder tree like the following:
git_root
- proj_android
- proj_ios
- proj_react
- lib
- src
My problem is that when I open IntelliJ on my proj_react folder, I could not see my src folder or lib folder. (My proj_react is one level down from my git_root.)
Then I open IntelliJ on git_root, I could see everything. The problem is solved.
If you are working on a software development project where you are using Maven, Gradle, Flash Builder etc., the below mentioned steps should restore the project structure:
Ctrl+Alt+Shift+S (or) File>>Project Structure
Select 'Modules' in 'Project Settings'
Alt+Insert (or) Select '+' to add a new module
Select 'Import Module'
Select the folder you want to import the module from(Generally the parent folder)
Select 'Import module from external model' and the corresponding external model
This resets your project structure.
You can sometimes rescue projects like these by going and resetting their content root in the module settings. Or even recreate the module as another answer suggests.
This is something that would happen to me if I opened an IntelliJ project in PhPStorm, then tried to open it in IntelliJ again.
However as was mentioned the project format changed recently, so you should use the same version of intelliJ to work on your project.
If you have a content root for a project module that intersects with another content root, then this problem will occur. For example:
Project A (content root)
- source for A
- module B (content root)
- source for B
If you have a project that has a source root for "Project A" and you add a source root for "module B" you will end up with missing structure, such as your first picture. This happens because the content root for module B is within project A structure.
This worked at one time, as I have the setup above with multiple modules. When I upgraded to 12.1.6 this stopped working. If you have overlapping source roots you will see this problem.
I'm using 12.1.6 on windows 7.
On Mac:
Preferences
search for Project Structure or go directly to:
Project: Your_Project_Name / Project Structure
Mark all as Sources (mine was marked as "Excluded")
What did you update from? If you did a few major versions update, intellij really changed how their projects are laid out. You probably need to edit the projuct structure and add a new java module.
This issue is 8 years old and the problem still exists in IntelliJ. For projects with many modules, it can be a real pain reconstructing them after each time this occurs. I suggest that once you reconstruct the modules, back up the .idea folder so you can easily restore it next time
In the bottom left corner of IntellIJ you'll find an icon, using which you can fetch project structure, etc..,
This is the quick fix that i have done:
Close the IDE and open the project folder in file manager
Delete the .idea folder and reopen the project in IDE.
To view the hidden folder and files:
Open the folder and press cntrl+H (in linux), And in windows Go to folder options and check view hidden files option.
I have been working on a project locally and at some point I gave the project to someone else to work on.
Since that time, I have created another package with classes and so on in my own project version. Since I want the other person to have this package, I gave him the package folder which he copied in the path ProjectName/src/packageName.
Of course, he didn't see it right away, so I used New->Source Folder and refresh/clean/pray to make it work.
The question is: is there some other way to add packages to projects? as I'm not sure this is the right solution.
A refresh is sufficient after you have dropped the new source files inside the source folder. No need to add a new source folder.
The clean way to collaborate is to use a version control system, like Subversion, git, or whatever. Copying files between developers is a recipe for chaos.
From backend, Go to ProjectName/src and copy/paste all the package, and then right click and select "Refresh".
Simply dropping in the files and refreshing is sufficient. Eclipse will automatically ammend the package declaration in the Java sources.
That all being said, you should be looking at using a version control system such as CVS or subversion for example.
Copy the folder at desired location.
Refresh the project in eclipse. It will be visible now.
Right click on the folder in eclipse under project explorer. Select Build path>Use as source folder.
I have used Eclipse before. I changed to IntelliJ. Now I am wondering how to import existing files into IntelliJ 10 IDE. In Eclipse I was used to just drag the directory into the src folder, but I cannot do it here.
IDEA doesn't have such feature, you either set up a project on top of the existing sources or you copy files to the existing project externally, using Finder or your favorite file manager.
Actually you can tell IDEA to open a project and when you get prompted with the file explorer you select the eclipse project file. IDEA will then create it's own specific project files and setup the classpath for you. It's pretty nifty.
I have just started playing with Java, and I really like the language. I am using the NetBeans IDE, and I find one odd oversight. I can create a new class in a project, but NetBeans doesn't appear to support any way to import an existing class into a project.
I manage to get it done by going to some other project where the desired class already occurs, and then I copy/paste it into the source code folder of the new project, then change the package name at the top of the pasted file to match the package name of the new project.
Is there a nice direct way to do this from the NetBeans interface?
Thanks for any help on this.
In the Projects window you can expand the project that you are working on. Right Click on Libraries and select Add Project.... You will get a dialog allowing you to select another Netbeans Project with the Java classes that you wish to use.
You have to just make the .jar file of that/those java files which you want to use in another project.
right click on file->export->java->.jar then finish.
Now you can use these jar into your another project.
When you build the java project in netbeans it creates a jar file on the dist folder in the current project directory.
You can use this jar file for the other project as a package by adding this as ADD jar in the next project.I have tried this ,i am using my old project jar file for new project development.
Use the 'Clean and build' your project option from the netbeans application, that creates the 'dist' folder which you are looking for (and obviously can't find because you havn't cleaned&buld)
The netbeans itself creates .jar files and you can add the jar file to the current project you are working on.