Even tho my project is pretty elaborate, I took JCreator till nowNow I wanna switch to NetBeans.Only problem is with the packages

I have 3 packages, folder with class files which should be imported

all my project java and class files are in the same directory, and in that same directory there are of course directories containing game content and the packages I need. Those are in a directory called "com" as it is done often.

So I have this com directory in which everything is included and fine, and it works in JCreator of course, but in NetBeans I cannot make him understand that he should use them / I dont know where to put them.

He goes on like package xy doesnt exists

one example of course is in my OggClip class "import com.jcraft.jogg.Packet;"something like that

NetBeans will automatically copy all files from src to the build folder except those on the ignore list (default on the list is .java and .form).

To successfully build your project in NetBeans with similar results like before you should try the following steps:1. copy your sources (java, images etc) to the src folder2. remove all .class files in the src folder (this one is important)3. right click on the project -> Build -> Packaging -> remove **/*.java, in the "Exclude from jar file text field"4. build your project

step 3 is only needed if you really want to ship your java source files side by side with your class files.

if you have your data in a separate folder just add this folder as additional source folder to the project (again via project properties window). From now on the content in the data folder should be automatically copied to the build dir on build and therefore also bundled in the jar.

Zip the .class files (so that the "com" directory is in the root) and rename the .zip into .jar. That's how libraries are usually used. (Maybe NetBeans supports also unpacked libraries, at least IDEA does, but if it doesn't seem to work, don't waste too much time in getting it to work.)

If you want to use .class they need to be in the build folder. So if you put all your stock in the build folder than press compile it will probably work. Unfortunately, in the build folder they are not permanent because all the build folder get clear when you click "Clean and build main project", that mean you need to manually reput your stock in it...

But really, the "Add jar/folder..." command when you right click on the Libraries folder in the project work great. Use it.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org