Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Environmental Varialbles

 
Niall Moynihan
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, im am making a website with a MySQL database connected to it. I am getting an error and i think it could be that i dont have any environmental veriables set up for MySQL. The conection code is in java and i think its correct.
Dose anybody know do i need to set up Environmental Varialbles to get my database going and if so how to do it. Any feedback would be much apprecited.
Thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Niall,
Welcome to JavaRanch!

At what point are you getting the error? Can you start the database? Can you access it from the command line? All these things will help in narrowing down the problem to a point where we can help.

For more tips, see
How to ask questions the smart way
 
Niall Moynihan
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heya, Yea I can start the database in the command line and view the tables. The problem im having is when I run the page with the java connection code in it from internet explorer. When it starts up I get an error. I don’t think it’s the connection code is the problem. It says the problem is this line of code
Import java.sql.*;
But this is the first line of code so I think it is not recognising any of it and it is giving an error with the first bit of java it comes across. I think it might be something to do with the environmental variables. I have only set up JAVA_HOME. Do I need any for MySQL?
Thanks for your time
 
Mousa A. Rafi
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If that's what you've actually typed, then there is a bit problem. The import statement is all lower case, but you used an upper case 'I'. It'd be:

import java.sql.*;
 
Niall Moynihan
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no its all lower case in the code. I just typed it in on my post. I have tried setting up my variables but i dont think im doing it right
 
Craig Jackson
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It might be helpful, if you post a good portion of the stack trace and a portion of the page that shows the code you mentioned above.


Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic