Folder Not Syncing In Netbeans - netbeans

I just started having an odd problem in Netbeans 15. I have my project set up to upload via FTP on Save. In one folder in my project, it doesn't work. Any other file in any other folder uploads just fine on save.
It used to work just fine. I have no clue as to why it isn't working for files within this particular folder. The folder name is mvc which shouldn't matter.
I re-created the project and rebooted my Mac. The on thing I haven't tried is creating entirely new folders and copying my code into them. Before I go to that extreme, I was hoping someone might have an idea.

Related

Can I restore a netbeans project from the .jar file?

Ack! I'm in a pickle here. An app developer friend of mine were both laid-off, when we came back and were trying to get projects up and running again one of our Projects in NetBeans won't work properly. I have the .jar file, but when I go in to re-load the project in NetBeans to makes some tweaks, the nbproject folder is totally missing (as you can see in the screen shot.)
This project hasn't been touched in at least two years and is housed on a Remote Computer, I can't just right click and restore a previous version. Is there another way to restore this project without having to totally rebuild it?
Be patient with me, I'm not all that experienced with these things. But, as you can see, the nbproject folder is just simply gone. I'd love to say when this happened, but I have no idea. I've tried to look for a previous version but there is no previous version on this remote computer. I've tried everything I can think of to restore the missing folder, now I'm trying to find out if there is a way to import the .jar and rebuild from that.

LibGDX Assets are not updating

I have changed some image files in my assets folder and they are appearing correctly in the Package Explorer of Eclipse but when I run my game the new versions do not appear and the old versions are still being used. When I add a new file and try to use it in code I get a "Couldn't load file" error, even though it is appearing in the file hierarchy. It seems like my assets are stuck as what they were 6 hours ago all of a sudden. What could cause this?
EDIT: The only thing I can think of is that I added new dependencies to the build.gradle file, and I think that was around the time new resources stopped loading. Could that be connected?
Have you tried doing Project->Clean, followed by a Project->Build All?
Eclipse will most likely not recompile your project automatically, if you do not change the source and just swap out some resources. Thus, your old resource files still reside in the build folder (and in the path at run time).
Your new files only seem to be present in the source folder and are not used at run time.
You can try deleting the bin folder in the project and then rebuilding. This will definitely change it.
The above is not, a permanent fix.

Cannot create project from folder because it is already in the workspace

I created a Spring project with SpringToolSuite from a SVN project. It worked successfully. Now I deleted the project without deleting the content on disk. I want to create a project from the folder of the previously deleted project but I could not create it : there is a message stating that a project of the same name already exists in the workspace. So how to fix that ?
I do not know about SPringToolSuite, I work with Visual Studio. There, if you remove your project from the solution happens the same, it kept on the hard drive just disappears from the solution explorer.
If you want to reopen it, you can just open the project file or add it back to your solution.
If you want to create another project with the same name at the same location, you have to manually delete or move the folder of your old excluded project.
Depending on your use case, you can try to do something similar.
I hope this helps.

Files disappeared, could be related to Eclipse

I have lost files mysteriously a few times from my Eclipse workspace folder, and previously I assumed that I must have deleted them, but this time I know for sure that I didn't.
I entered a folder for a Java project. I listed the files. There were several text files. I then opened one in gedit to look at it. As far as I remember, I then did something in libreoffice Calc (to a spreadsheet file in a completely separate location), then I made some changes to the Java file in Eclipse. It would then have been automatically compiled. I then went back to the terminal to execute the program, but it wouldn't run. Listing the files shows that the reason it wouldn't run is that all the text files have disappeared and so has one of the .jar files (called stanford-parser.jar) but not another. I've searched my computer for these files and I can confirm they've gone.
A screenshot from my terminal illustrates this.
Can anyone help me to understand how this is happened, so I can avoid it happening again? Could compilation delete the files?
You seem to be storing source files in the bin directory of your Eclipse project, which is probably the target directory used by Eclipse to put the compiled classes. Store your sources in the source folder. The target folder is completeley deleted by Eclipse each time the project is cleaned up.
Note that non .java files stored in the source directory are automatically copied to the target directory by Eclipse. They're considered as resources that must be available at runtime in the compiled application.

"Sources directory is already netbeans project" error when opening a project from existing sources

I've installed NetBeans 6.9.1 and installed few updates for it.
Then I've created a new project from existing sources. After a few changes I've closed it. And now I am having an error, when trying to open a new project from existing sources (the same files):
Sources directory is already netbeans project (maybe only in memory).
After Googling it, I noticed it happened not only with me. But I didn't find the correct solution. I've tried to restart the IDE, I've tried to restart the PC, I've tried to reinstall NetBeans. Nothing helped.
Thank you!
I was having the same problem:
Sources directory is already NetBeans project (maybe only in memory).
Netbeans creates a folder in your project named "nbproject". Once you delete that, restart the IDE and you're good to go.
When you create a NetBeans project from existing sources, NetBeans uses the same directory to add its own files: a netbeans folder with .proj files.
Solution: delete the netbeans folder and restart the IDE. Opening a new project should now work.
Go to the folder containing your project
Delete the folder named nbproject
Restart Netbeans
Try creating your project again from the original folder
This means the project folder is already a netbeans project. So instead of adding it as a new project open it as
This happens(i believe) because netbeans tries to version control the files created or edited.
Under the project folder netbeans create a netbeans directory just delete it . This has been tested in Ubuntu. Then you can import your project if php then php using existing sources.
Click File >> Recent Projects > and you should be able to use edit it again. Hope it helps :)
On Windows at least none of these answers work (for me anyway!). I have found the only way is to copy an existing netbeans project folder in to your new project and manually edit the xml project name.
I also opened the private/private.xml and removed the open files xml just incase these caused problems.
Once I'd done this the project works as normal.
I checked the "Put NetBeans metadata in separate directory" tick and it works fine.
This is in 2. Name and Location after you choose PHP from existing source
In my case my project root directory consists ".project". This contain the XML reference of the project name.
By removing this, i am able to create a project.
Usually this happened when we copy source code of a already created project and copied in different folder and try to create a project from it. as netBeans create its folder nbproject in our project folder this folder also get copied with our source code and it give error "Sources directory is already NetBeans project (maybe only in memory)" remove this folder from you newly copied folder and voila you can create a new project.
If this is your own source code and you already have a Netbeans project folder with your source files you should just start with:
File | Open Project...
not
File | New Project ...
because the project is not new.
If it helps anyone else, I had the same problem and the solution was to reinstall NetBeans.
I had tried all sorts of fixes: Deleting the NetBeansProjects folders, checking/unchecking "Put Netbeans metadata in a separate directory", killing/restarting NetBeans, restarting the system, etc. Nothing cleared the message...except the reinstall.
The advice here about removing the nbproject directory is not quite the whole story.
What Netbeans seems to do (and we are guessing at reverse engineering here) is to look for an xml file which has opening and closing project tags in it. This it concludes is evidence of an already existing project. Now if your files have an nbproject directory there, that will contain a project.xml file which contains the said tags. So removing that will do what you want.
But, my files don't have a nbproject directory but still NetBeans tells me there is an existing project maybe in memory. The reason is: my files include a file called pom.xml and that contains the said project tags in the xml (it was created by an entirely different system). Once that xml file is removed, then NetBeans will create an html project for me importing my code.
In sum: look through any xml files in you existing code, and be wary of project tags.
This happened to me when I tried to import an Eclipse project in a brand new NetBeans 7.2.1 install on Ubuntu 12.04LTS.
I mistakenly selected the import projects from workspace (the first option in the import wizard's opening pane) on the first attempt, and it opened the project in the original Eclipse workspace path (which was on a usb stick).
From this, I then realized that I actually need the second option - import project ignoring project dependencies, which lets you specifically choose source and destination folders. After closing the project, I tried to import again with the proper option, but it didn't work.
From then on nothing I did helped - restart the IDE, move the source folder, nothing. There was no nbproject folder in the project or /var/cache in the user folder to delete (in-fact there was no nbproject folder in the whole file-system).
Since restart didn't work, I'm guessing that there is a garbage project entry somewhere which Nb reads (See Martin Frické answer above).
After googling along the lines of 'netbeans clear memory project cache' with no success, I opted to reinstall NetBeans -
sudo /usr/local/netbeans-7.2.1/uninstall
sudo ./netbeans-7.2.1-ml-javase-linux.sh
which solved it.
If you are on a Mac, press command shift G and in the box type /users and then go, next click on your user name and navigate to netbeansprojects and open it. Then delete the ones in there that are causing problems. You can then create your project.
Note: I had moved my wordpress folder to my desktop trying to figure this out, so I dropped it back into the origional location and it works fine. So if you did this, just replace the wordpress folder after deleting the problem projects from the netbeansprojects folder and its contents back to the original installation folder.
Hope this helps...:)
This is what I did to solve this error:
1) I copied a folder named "folder1" (and I called the new folder "folder2"). "folder1" was a Netbeans project so it had a folder called "nbproject" inside it.
2) When I tried to create a project out of the "folder2", Netbeans threw an error "Sources directory is already netbeans project (maybe only in memory)."
3) Inside Netbeans delete the project of "folder1". Then, delete the two folders named "nbproject" (one is inside "folder1" and the other is inside "folder2").
4) Inside Netbeans, create two new projects: one for "folder1" and another for "folder2". The error should not appear anymore.
copy an existing netbeans project folder in to your new project and manually edit the xml project name.
reinstall netbeans
copy/move all files/folders (except nbproject/ folder) to a new folder for your project, with a new name.
Try to create a new empty project; then you can copy the public_html to the new project folder and it will appear .
I faced the same issue:
Sources directory is already NetBeans project (maybe only in memory).
The solution is:
Netbeans creates a folder in your project named "nbproject". Once you
delete that, restart the IDE and you're good to go.