Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 187
  • Last Modified:

Automatically loading a java on windows xp

Hi,
I am afraid I dont know anything about the deployment of java.I have written a basic java program and want to try it out on a few other peoples machines. I can install java no problem, but I want the java  program to load automatically on startup. Is there a way to get windows to start up the command window and fill in the name of my java program and load it??
cheers
John
0
jdav3579
Asked:
jdav3579
1 Solution
 
sompol_kiatkamolchaiCommented:
Hi John,

I think you can write some .bat or .cmd file and put in startup folder of windows

Hope this help.
Sompol
0
 
sciuriwareCommented:
You can put a shortcut on the desktop and in the startup folder.
No .cmd of .bat file required, example given:


java -jar MyProgram argument1 argument2

You could also enter something in the Registry (run section) or window.ini
but that's dangerous resp. outdated.

I do it like above.

;JOOP!
0
 
sciuriwareCommented:
Correction:   java -jar MyProgram.jar argument1 argument2

;JOOP!
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
WebstormCommented:
Hi jdav3579,

You can also make a link to java.exe (or javaw.exe if you don't want console),
then modify this link to add the parameters (for example: -cp mydir MyMainClass )
and move it to the startup folder
   <systemdrive>:\Documents and Settings\<user>\Start Menu\Programs\Startup

<user>=All Users    if you want the application be run for any user.
0
 
WebstormCommented:
Sorry sciuriware, i didn't saw your comments.
0
 
hoomanvCommented:
with this tool
http://www.nirsoft.net/utils/strun.html

you can add new startup items in windows registery
just add this command
C:\Program Files\Java\jre1.5.0_01\bin\javaw.exe -jar C:\programs\YourProgram.jar
0
 
sciuriwareCommented:
:)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now