There are many ways to achieve this, but I don't think you will be able to import the project inside the jar just out of the box ( in this case, out-of-the-jar ) like that.
We can use the most basic technique ( a bit dirty I admit ) but it works.
- Extract the contents of the jar in a directory and decompile it like you done it before
- Next, make an empty project inside netbeans ( with no src directory or anything )
- Copy the contents of your decompiled project into this netbeans folder. You should now see a skeleton structure of some files. Note The poject is inisde netbeans but it is not a java project yet.
- Edit the classpath of the netbeans project and add java library to make it into a Java netbeans project.
The other technique that I use sometimes is that I make all the project files required by the IDE (Eclipse in my case) manually and then tell eclipse to import the project. When eclipse finds all the required files ( .project, .classpath and all ), it imports into the IDE just fine