hi.. I am Developing a java Desktop Application so i want to set automatically "path" , "clas path" and "System DSN for my database" instead of doing manully....please any one help me out... and sorry if i posting this common question at wrong place(java in General)... thank you..
Your PATH should be set as an environment variable. If you install a JRE on some computers (eg Windows) I think (but I am not at all sure) that is added to the PATH, or a program associated with the .jar files. You can set the requisite CLASSPATH in a manifest file; it is somewhere in the Java Tutorials. Don't know about DNS, I am afraid.
1. The PATH to the Java Runtime (JRE) bin catalogue should be set when installing it. At least it declares the system environment variable JAVA_HOME that can be used in your start script.
2. You should set the classpath for the application when you start the application and NOT in the system classpath. Use a launcher or a bat-file for this.
3. You should not use a system DNS (JDBC DBC type 1 DB driver) in your programs. Instead, you should take a look at DataSource and have a configuration file that holds the data on how to connect to the database and then have a declared DataSource that any part of your application that needs to access the database needs to access.
Joined: Nov 15, 2008
thanks for reply
Mr Prime, can you tell me how can i find this key in the system Please...
and one more thing as mr. ramya narayanan suggested can be done like that...