File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Batch file

 
Manuel Paco
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I start my java program from "Start.bat"
and I would like to start it
automatically from autoexec.bat.
Would you give me an example for Windows XP please?
 
arun mahajan
Ranch Hand
Posts: 305
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Manuel if you look at the start.bat you most like to find that:
1. It has set the classpath
2. Or perhaps Path too.
Setting path means you can get your all java executable files from any directory(or path). Again classpath will let the java compile to look into the classes which it needed from the API at the time of compilation/running.
To make life easier perhaps the better way is to set these two things into the Enviorment variables of your computer and it will be available for every path..
I am sorry I don't have XP with me..you have to look into it for exact steps.
Hope it will help..
regards,
Arun
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Manuel,
I'm not sure that I understand what you are trying to do. Could you expand your explanation?
 
Younes Essouabni
Ranch Hand
Posts: 479
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that he wants his start.bat to be started everytimes he turns on his pc. Am I right Manuel?
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Just make a shortcut of the bat-script (or the NT way your .cmd script) and put it into the 'startup' folder: Start->Programs->Startup
/Rene
 
Manuel Paco
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I would like my "start.bat" to be started everytimes I turn on my pc.
 
arun mahajan
Ranch Hand
Posts: 305
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if i am understanding your requirement properly and you're not satisfied with my earlier answer,perhaps writing a new line with text"c:\temp\start.bat" will work here c:\temp is the path where start.bat is laying.
Arun
 
Manuel Paco
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Arun but I think you don't understand what I need. My batch file works just fine.
I just need it to be running when I turn on my PC.
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do what Rene suggested.
 
Manuel Paco
Ranch Hand
Posts: 58
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much everybody.
 
Younes Essouabni
Ranch Hand
Posts: 479
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you may also put it in your registry (key run)
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic