When I started studying programming with database access, I had to install software like MySQL and Wamp.
What you're saying does not make much sense. WAMP is Windows Apache MySQL and PHP, so it already has MySQL, you do not have to install it separately.
I know what Wamp is all about, I know it's a package of tools needed at the time of programming, but I never understood the importance of it to MySQL.
Not what you need to program, but help. It has zero importance. You just have to install everything separately. and do not need it. This package is usually used by those who do not know how to work with what is proposed. It can even be useful for the first contact, but after a while if the person continues to use it is because it is still doing what it does not know and has limitations in what it produces.
After initial learning, stop using it.
I saw that when I disable it I can not use the database in my Java-based application in NetBeans.
Just because you're still depending on it. If you configure everything manually you do not need it. If you are using Java as a language it makes a lot less sense to use WAMP. It makes sense to have a web server and database, but why install PHP in this case?
I think you are adopting the wrong tool, mainly because you said that you have already installed MySQL. So do not install WAMP, install Apache. Or IIS (in most applications it will not make much of a difference what the webserver is using (it will only create a little difficulty when publishing).
The most important thing is to understand everything how it works. You can not answer everything here, you need a lot of knowledge, you need to read several books, you need to accumulate knowledge.
Anyway, my question is this: What is there in this Wamp package that is essential for my application to work?
Nothing. Of course if you are using it it is necessary to run your application.
Apache is the HTTP server that will receive client requests, process them and delegate to an executor, in the case of PHP, the language interpreter that will execute its code. It is common, but not guaranteed, that your application needs a database, and it is common for PHP applications to use MySQL.
None of this is necessary to program. You can learn the job of developing the right way and understand the role of each thing, make your own decisions, choose the best technology that meets your need, and not go on the market. You can become a professional with a capital P and make a difference in the area.
If you start with the basics, understanding how things work might choose other technologies to do your work.
You may see that SQLite is a better choice for web application cases, perhaps PostgreSQL or SQL Server, even on Linux to address your most complex needs.
You may be able to use everything in Windows and adopt IIS, or need more performance and other features and use Nginx.
And perhaps you understand that PHP is a facility, but not the best language to make an application. You might want to use Hack which looks like PHP, but it scales better. It might go to Python, still a * scripting language that is growing in the market, or Moon that is simpler and caters well in most cases, even Ruby could be an option. Or choose something that gives you more performance and better tools, as well as scaling your development better like Java, C #, Rust, C ++, Go, etc.
You may want to develop direct on Linux if that is your hosting target. Anyway, you can adopt the best and not what they told you what to do. Have a market differential and understand what you are doing. This question was the first step.
You can choose to be a chef or chef. The market lacks chefs. Do not follow cake recipes.