Trying to add png files to Midlet project in netbeans - netbeans

I'm creating a app for nokia using Netbeans v7. I cannot figure out how to add files to the project, such as graphic images. Also I do not see a res folder like eclipse has.
I'm assuming there must be a way to do this
-Ted

Create res folder in the project folder and put the files in that folder, It's action will be same as eclipse.

Related

How do I export whole Unity project with all scenes?

I want to export my Unity project as a ZIP folder, but I can't. When I click on Asset > Export Packages, only one scene gets exported. I want to export the project so that I can send it.
You can zip the Assets folder and ProjectSettings folder and ignore all other files and directories.
You don't need Library and Obj folder. They get created automatically.
The project files (.csproj) and similar files also get created automatically.
Alternatively you can export the whole project as a package:
Use Export Package to create your own Custom Package.
Open the project you want to export assets from.
Choose Assets > Export Package… from the menu to bring up the Exporting Package dialog box.
In the dialog box, select the assets you want to include in the package by clicking on the boxes so they are checked.
Leave the include dependencies box checked to auto-select any assets used by the ones you have selected.
Click on Export to bring up File Explorer (Windows) or Finder (Mac) and choose where you want to store your package file. Name and save the package anywhere you like.
Just save your scene and project and close unity and simply copy the project folder or make an archive of that main project folder and copy it. (Closing Unity is an important step because all temporary files are deleted which were opened)
And about the file size, yes generally they are bigger if you have used high quality models or textures. You can try building it for a platform like Android or Windows etc. and send that executable build to somebody else (usually smaller file size).
P.S: Have tested it before and works like a charm.
For Unity 2017.2+ with package manager
Save all your files
Close Unity
Make an archive that contains Assets, Packages and ProjectSettings folders
That's it, Have a nice day!

Linked Files and Folder in IntelliJ

As previous Eclipse user switched to IntelliJ I would like to be able to access folder external to my project from inside the IDE, while developing.
In Eclipse I was using the feature Creating linked resources.
I wonder if there is any feature in IntelliJ that helps me to access external files and folder in a similar way (for instance, if I want to edit the configuration of my application server which is located outside my project).
Yes you can do it by adding an new content root in your module.
You do that from
Project Structure (alt+ctrl+shift+s) - Modules - "My-Module" - + Add Content root
Now you have the contents of the added folder available in your project.
I was searching for a way to get the asset folder link working in IntelliJ as it was working in Eclipse and I found following link in the wikis of libgdx itself.
Linking the asset directories
It describes basically three approaches:
Just copy the asset folder into the desktop folder. (BAD)
Use the asset folder in the android project as working directory for the desktop project through 'Run-Configurations'. (GOOD)
Create a symbolic-link (GOOD)
I tested the 2nd option and it's working fine for me.

Best way to open phonegap project created with CLI in eclipse

When I create a phonegap folder structure via the CLI (3.0), how do I open this in Eclipse?
When I choose project [New] - [Android project from existing code], the assets are taken from the platforms/android folder. But I need to change the html and js of the top folder (www). These are the files that are being used when I build the project to other platforms (via CLI or build.phonegap).
Now I change the assets in the editor of the eclipse environment and then manually copy paste the content to the files under www.
Actually PhoneGap project structure and Eclipse project structure are somewhat different. But they work in a similar way. If you want to create phonegap project in eclipse then you have to create html,js,css within asset/www folder. The java source files will be within src folder(as usual).
If you want to create project without eclipse like with command phonegap/cordova create MyApp, then you will get all java source file within project/platform/android folder and html,js,css in www folder which is auto-created. On the other hand in eclipse you have to create this www folder manually.
But project is compiled in a same way whether it is created in eclipse(IDE) or in other text editor.
I have experience in both Eclipse and Text Editor(SublimeText,Vim). I prefer Text Editor because Eclipse sometime creates problem and it needs some extra things like creating www folder and place all scripts,templates,css etc manually.
If anyone whan to go with CLI, then I think SublimeText,Vim,gEdit etc are the best choice for coding.

How to Compile Eclipse Project without 'res' directory

I have one Android Eclipse project without 'res' directory in it.
It have only one file which is an common service, and i don't need the resource for this project.
So how can I tell eclipse that i don't need resources for this project.
Right click your project -> Properties. Then Java Build Path -> Source, select the res entry and click Remove.
You can just delete the folder assuming you are not using anything in the resources folder such as values, layouts, or images - this includes your application icons.
To delete the folder just right click it and delete it and make sure it is not in your Build Path.
You will not be able to get rid of the gen folder however, as Android build this dynamically since it is accessed through the SDK.

"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.