why java application not working after applying "web look and feel" theme?
- by Vasu
I have developed "Employee Management System" java project .For improving the ui appearance i have integrated "web look and feel" into my application.Theme is applied correctly.
But here the problem arises:
At first i have runned the java application without connecting to oracle data base,application have runned and worked perfectly.
But when i connected the application to oracle database and runned again the application is taking more time to open and getting strucked.
Code:
For applying theme
try {
WebLookAndFeel.install();
}catch(Exception ex){
ex.printStackTrace();
}
Code for Connecting DataBase:
if (con == null) {
File sd = new File("");
File in = new File(sd.getAbsolutePath() + File.separator + "conf.properties");
File dir = new File(sd.getAbsolutePath() + File.separator + "conf.properties");
if (!dir.exists()) {
// dir.mkdir();
dir.createNewFile();
Properties pro = new Properties();
pro.load(new FileInputStream(in));
pro.setProperty("driverclass", "oracle.jdbc.driver.OracleDriver");
pro.setProperty("url", "jdbc:oracle:thin:@192.168.1.1:1521:main");
pro.setProperty("username", "gb16");
pro.setProperty("passwd", "gb16");
try
{
FileOutputStream out = new FileOutputStream(in);
pro.store(out, "Human Management System initialization properties");
out.flush();
out.close();}
catch(Exception e)
{
e.printStackTrace();
}
}
else
{
// System.out.println("Already exists ");
}
Properties pro = new Properties();
pro.load(new FileInputStream(in));
Class.forName(pro.getProperty("driverclass"));
con = DriverManager.getConnection(pro.getProperty("url"), pro.getProperty("username"), pro.getProperty("passwd"));
st = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
st = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
} else {
return con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
}
without the theme the application with connected to database working correctly.
Please help me in solving this issue.
Thanks in advance..