Goal:
Create Netbean project and put on repository (an开发者_Go百科y). When other developers check out the Netbean project, they can "open project" from Netbean IDE and press execute to open browser and start testing web application.
I wrote REST
web app (Toplink-essential, JAX-RS, SQL Server 2008
) and this is the Netbean project other people want to open in Netbean IDE.
It's working actually except that when someone "open project" in Netbean, she still has to go to Data Source tab (next to Project and File tab), then manually create database connection by filling in the popup form (i.e typing host, db name, pick driver etc).
I found out under nbproject/setup/sun-resource.xml db drivers and name/password are defined but we had to do the first step (which is filling the popup form described earlier)
Is there way to eliminate the step? That means I can somewhere define in xml ???
Please let me know if you need more clarification.
i would comment on your post, but no such option for me atm, so have to post an answer.
What database conenction are you using ?
And try to implement a properties file rather than xml file !! and then its pretty straight forward, something like this:
MySQL
hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect
hibernate.connection.driver_class = com.mysql.jdbc.Driver
hibernate.connection.url = jdbc:mysql://localhost/ - . . . -
hibernate.connection.username = root
hibernate.connection.password =
this might help http://netbeans.org/kb/docs/java/project-setup.html#ide-concepts
精彩评论