I am trying to import a projetc (in ZIP file) in my netbeans. It is downloaded from GitHub (link: https://github.com/varavell/OnlineBookStore). While importing the project from Zip it shows the error and no project becomes imported. At the same time, at the bottom right corner it keeps unpacking of the project (never finish it though). Why this happening and how can I run a complete project into netbeans?
The worning is:
This warning (No NetBeans projects added) can happen if the zip file was created manually. To avoid this create the ZIP file in NetBeans using File > Export Project > To Zip...
Unzip your project and then open Netbeans. Go to File > open > your project file
You need to have one of the projects that Netbeans recognizes in the zip file.
This particular project has no pom.xml, build.xml or nbproject directory.
You will need to create a new project of the appropriate type and extact/copy your sources from the zip into it.
It's not possible to know what the problem is from the information you're providing.
It might be that the zip is corrupted, that the zip is not correct, that the zip contains a project in an unrecognized format, or that it's a bug with netbeans, for example.
You need to provide the NetBeans' log at least. I'm currently on cellphone, so i can't tell you where to fimd it, but you can find it yourself after a simple google search.
As for an immediate solution, since the project is on GitHub, you can simply clone the project using Git (inside NB). Or create a new project and manually replicate the files from the source-codes and file-structure visible on GitHub.
If you try to import a web project. first of all plugin web tools JSF, RichFaces etc. and then you will import your NetBeans web files.
and then Export Project > To Zip.
You should extract your project from the zip first. Then add it from file system.
Related
So I have an Eclipse project I have been working on for quite sometime now and my program that backs up the project hasnt been doing it for months, and I never bothered to check the back ups (stupid me). Well the project got corrupt and I lost all the files and dont have a back up that is even close to up to date. However I do have the jar file that is fairly recent (it only contains .class files) and I was curious if anyone knew how to convert a jar file with .class files into an eclipse project. Thanks for the help!
You can follow the steps given below:
Make sure you have a working decompiler in eclipse. If not, please install https://marketplace.eclipse.org/content/enhanced-class-decompiler into your eclipse.
Create a new Java project in eclipse > Right-click the src folder > Click import > Select Archive from the list to import your JAR
Expand the JAR in eclipse and double click a class file to decompile it.
I am trying to upgrade some online synth applications made with the old JSyn plugin .
Initially the former programmer sent me the .jar file of the synth application which was more or less not useful .
I asked for the project files so that I can perform the upgrade.
I received a folder with an .src ending which when I open has multiple subfolders that end up in .java files that I can edit .
Now the files are at least editable but both Netbeans and Eclipse can't see any of the folders as a project file so reprogramming and understanding the structure of the program is kind of a nuisance .
It would be helpful if anybody explained to me what is happening and/or how to solve that problem .
You can build a new JSyn JAR file using the source code on GitHub at:
https://github.com/philburk/jsyn
The GitHub repo has a .project file for Eclipse so you can open it directly in Eclipse. Then add the JSyn project to your own project.
Right click on your project name in Eclipse.
Select "Build Path > Configure Build Path..."
Click on "Projects" Tab
Add the JSyn Project
Recently I worked on a project on a mac, using eclipse. When I was done with the project I copied certain .java files and their corresponding .class files onto a USB drive and brought it to my personal computer. When I try to use the import feature on eclipse and import everything, my main method is not recognized by eclipse. It will work if I create a new eclipse "class" by the name I have in the program and copy paste the code. I have many classes so I can not do this for each one. Is there any way for me to change all .java/.class files into files that will be read by the system?
Thanks
An eclipse project contains a lot of meta information. Just open the project directory in a file browser, and have a closer look. There are files like .classpath for example.
When you just copy your source code, you leave all the meta information behind!
You should either copy the complete project directory, or simply use the export task to create a ZIP file of your project. (to later import that in other systems).
There is one other way you can do this. Just create a new project with the SAME EXACT PROJECT NAME that you did at school or wherever. After you create your project, go to your file explorer and navigate to the following place:
<"Directory to work-space">/<"Project Name">/src/
For ex: in Windows, it is Generally:
C:/Users/your_name/workspace/projectName/src
In here, copy all your ".java" files.
Now go to eclipse, right click on your project and hit refresh. You will find all your .java files there. Right-click on your project and hit "Run"->"Run as a Java Project". It should run! hope this helps.
PS: You do not need your class if you are executing it in Eclipse. Eclipse will create its own class files.
Hi guys I just clean and build my project in Netbeans, copy the folder of my project, put it in a ZIP archive and send it to myself. Now I don't know how to deploy the project, I tried just to copy the classes and run it, but it give me so many error, even if I try to recreate the structure of the packages with the same name it doesn't work. I tried to find information on the internet but is not very clear.
When I click on Clean and Build.
NeatBeans create a folder with the name of the project and inside> build,dist,nbproject,src,web,build
When you clean and build under Netbeans, you should find all you need under the dist folder:
if you a creating a web application you should find a .war file - that is the file to deploy: just copy it to the webapps folder for Tomcat
if you are creating a standalone application or a library, you should find the .jar
Above assume you do not use maven for the project. If you did you would not have a dist folder, but the standard maven target one.
I don't really know what are the errors you get. However check these few things out and see if it works for you:
check if you are importing from an external Library, if so, make sure that you have those libraries within your project.
If you are creating a new project and just copy pasting the classes, then make sure packages are correct and not from the other project you had.
it is pretty simple to open a project in net beans:
after creating your project and building it, zip the whole project folder.
once you unzipped it, use "CTRL+Shift+O" or the third option in netbeans>file to open a project.
a filechooser should open and you can select the project you want to open.
this is pretty much the whole thing you need to do.
you can also find the .war in webapps folder, .jar in dist folder too.
your question is really unclear. We dont know what is your project exactly nor your errors.
Please let me know the exact errors. so that I can help you with better.
I don't understand exactly what is the error your facing but I think that if you use the export and import project features of NetBeans maybe you wouldn't have that error in the first place:
To export project:
go to File -> Export Project -> To ZIP... -> Specify the zip destination directory.
To import project:
go to File -> Import Project -> From ZIP... -> And browse your file system to find the zip you previously created.
I think Eclipse is trying to make me miserable. A couple of hours ago, my project was working and compiling well. Suddenly that all changed. Eclipse somehow wipes out all changes I have made to my files(activity, manifest etc.) I make sure to save often but when I go to run the project, I get the error that I have a build error. I checked and there was none, so I go to close Eclipse, so I can reopen and see if the errors will go away. Instead what happens is Eclipse wipes clean all my files and I end up with a project on disk with lots of blank code files. I try to run anyway, and I get the error message below.
Failed to read the project description file (.project) for 'com.example.android.nfc.simulator.FakeTagsActivity.FakeTagsActivity'. The file has been changed on disk, and it now contains invalid information. The project will not function properly until the description file is restored to a valid state.
Anyone have an idea what in the world this is about and how I can rectify this?
I would recommend to wipe out all the eclipse related configuration files(make sure you take the backup if you have manually made some changes in those) and import the project again, by following
File -> Import... -> Existing Project into Workspace
Make sure you take the backup of whole project before doing this.
When Eclipse gets stuck in some obscure status, I usually find useful to recreate the .metadata folder in workspace directory. It is a drastic solution, but it usually works for me. After that you can reimport all your projects.
This happened to me because I had a conflict in my .project file. I opened it up in a text editor and fixed the conflict (in my case, removed from ====... to >>>branch..., as well as <<<HEAD) and then I was able to open the project in eclipse.
I was just encountering this same issue (using Zend Studio 12, which is built on Eclipse). My problem was that I was creating a project from a Remote Server, and I was just downloading everything, which also included the .project file from the old project. It wasn't showing this error until I'd closed the program and tried to open it again (which usually wasn't until the next day).
I seem to have resolved it by making sure not to download the .project when initializing the project.
If the .project file is a text file, so if you have it in version control you might want to copy it over from there.
Before you trying the following make a backup of your current project state.
Assuming you don't have an old copy, you can open it in a text editor and try to see if there is something obvious wrong.
If this fails, copy the source files of your project to a fresh location (without the eclipse configuration files) and import it as a new project into eclipse.
if you still have all of your other source (.java files, AndroidManifest.xml, resources), you might be able to get your project back by simply going to the folder containing the project, removing the .project file that you say is now empty, and then using the new project wizard to recreate the project (and .project file) for you from your existing tree of source.
from the menus, select File -> New... -> Project , and then, in the first dialog, choose Android Project from Existing Code .
if you had done anything special to the .project (reliance on specific .jar files or changes to classpath), you may have to re-do these steps after you re-create your project; but at least it should pick up the code you already have.
If all the files are empty, and you have no working Backup, I can't help. I would recommend to use proper version control in the future.
Use git or mercurial, they have nice UI integrations (see tortoisegit/tortoisehg).
To decouple the build process and library management from eclipse, take a look at maven or gradle, this might help you in future projects.
If you use git, complete the merge e.g. del the head in your androidmanifest.
I also got the Same Issue in Eclipse but the real problem is i removed the actual Source project folder from source location (from which eclipse is trying to take the project) to some other place hence my eclipse is unable to get web.xml file since it is not available. Now i changed my source project folder location to the path where eclipse is trying to search for. Issue Resolved for me.
Just delete the 'servers' folder in your workspace and try again.