No. I want to create e GUI, which has a 'START SEVER' & 'STOP SERVER'. when i click my 'SART SERVER BUTTON', it must start a normal Java server & connect to a database i created with SQL2000. Any IDEAS PLEASE?
I recommend you to do it step by step (in OO way).
Create a class with methods which starts and stops the server and test it as plain Java Application with main().
Once you got that work, you just have to let the button use this class and invoke the method accordingly.
Satya Maheshwari wrote:Runtime.exec is a good idea but may compromise the portability of the application. Is there a java way to start the server i.e. can the server be started by running a class in JVM.
Needing to run SQL Server as part of the application has already compromised the portability of the application; its Windows only. Which makes me wonder why you would use Java to control SQL Server at all? SQL Server runs as a service which will run at startup by default. Why not just trust the database will be running? Or even better, why not host the database on a server and manage it yourself using the out the box tools?
Wow. Thanks being greenhorn suck. Well this server i am talking about is just a different server in netbeans jst so it may accept multiple clients. The only thing i am doing with sql is just my java application(my own server) must b able to connect to an sql database
Gee i suck at English too. Okay let me try being clearer. Okay in Netbeans you can create a Client/Server application right? Now in my 3Days Project. I must create a client server application, obviously for my client to retrieve eg...A list of music artists from SQL It must ask my server side. So now that same Java/Server App i created must connect to a an SQL database in order to serve a Client. Now i am ok with The Basic JDBC. May be i should give you a bit of My Summarized Project Specifications which is wantd in 3Days from tomorrow...How about that? Highly appreciated only if you have time to just reply and help me here and there, i am willing and ready to hear out a more experienced Java Programmer.