i’m trying a code found with google which allows to retrieve emails from gmail and store to mysql.
When i launch the code, it’s working but at the end i have an error message:
Cannot connet to database.
It’s normal because i didn’t knwow how to create the default.properties file:
i know the content but in which format must be the file and where must i put this file, in Netbeans??
Do i have to create a folder?
which file format txt, java??
the name of the file will be default.properties
The code will be found here: sakthimaharai.hubpages.com
I need a hlep
please.
Thank you
In Netbeans you can create a properties file using the contextual menu to create new elements, as per this answer. Be careful of entering
defaultas the name since NB will add the.propertiesto whatever you write and you might end withdefault.properties.properties.The most common thing is to read properties files from the classpath or from the working directory, in the first case you should create the file in the root of the Source folder. In the second case you can create the file directly in the Project node but in this case the file won’t be added to the final jar/war if you want to distribute your program.
Examples of the format (and even some code to handle properties files).