richardsimnett
asked on
how do I make a java app load at windows startup?
Hello,
How do I get a java program to run at windows startup. I dont mean login, I mean when the os boots. I have an app that needs to come up and down with the box its run on.
Thanks,
Rick
How do I get a java program to run at windows startup. I dont mean login, I mean when the os boots. I have an app that needs to come up and down with the box its run on.
Thanks,
Rick
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Put your .jar file into the Autoexec.bat file in the C:\
ASKER
zzynx,
I have tried the devx referral you gave, the other 2 seemed too complicated for me. Anyways, I have this exe that j2winservice generated. I have installed the service and tried to run it, and all my odbc connections fail. Meanwhile, I can run the jarfile with no problem at all. Can you lend any suggestion on how to fix this? or possibly how to find out how to fix it?
The errors I get are these:
mpPmtaFeeder Started.
Config Loaded.
jdbc:odbc:mailprosatdata1- m6d2y77
Database Connection Error:java.sql.SQLExceptio n: [Microsoft][ODBC Driver Manager
] Data source name not found and no default driver specified
DB ExecuteQuery
Database Read Error: java.lang.NullPointerExcep tion
Database Close Error: java.lang.NullPointerExcep tion
DB CLose()
Database Connection Error:java.sql.SQLExceptio n: [Microsoft][ODBC Driver Manager
] Data source name not found and no default driver specified
java.lang.NullPointerExcep tion
at MPFeeder.run(MPFeeder.java :45)
Strange as it is, this runs perfectly as a standalone jar. Are services somehow limited from interacting with ODBC?
Thanks,
Rick
I have tried the devx referral you gave, the other 2 seemed too complicated for me. Anyways, I have this exe that j2winservice generated. I have installed the service and tried to run it, and all my odbc connections fail. Meanwhile, I can run the jarfile with no problem at all. Can you lend any suggestion on how to fix this? or possibly how to find out how to fix it?
The errors I get are these:
mpPmtaFeeder Started.
Config Loaded.
jdbc:odbc:mailprosatdata1-
Database Connection Error:java.sql.SQLExceptio
] Data source name not found and no default driver specified
DB ExecuteQuery
Database Read Error: java.lang.NullPointerExcep
Database Close Error: java.lang.NullPointerExcep
DB CLose()
Database Connection Error:java.sql.SQLExceptio
] Data source name not found and no default driver specified
java.lang.NullPointerExcep
at MPFeeder.run(MPFeeder.java
Strange as it is, this runs perfectly as a standalone jar. Are services somehow limited from interacting with ODBC?
Thanks,
Rick
>> Are services somehow limited from interacting with ODBC?
No real experience with that.
But I think a service does run under a "special account".
Maybe that's the problem.
No real experience with that.
But I think a service does run under a "special account".
Maybe that's the problem.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Triguna,
The datasource is setup properly in ODBC. As I stated the program works perfectly from the command prompt... but when I try to load it as a service it craps out on me.
Thanks,
Rick
The datasource is setup properly in ODBC. As I stated the program works perfectly from the command prompt... but when I try to load it as a service it craps out on me.
Thanks,
Rick
Thanks for accepting
Thank you for Assisting.