I recently wrote a java jar file that takes the current date and time and puts it into a text file. What i want to do is put this into a users startup folder so i know when they got on to the computer. However, if the jar is in the folder nothing happens. If i put a .bat file in the folder with the code

javaw -jar LoginLogger.jar

it gives me an error saying that LoginLogger.jar could not be accessed. But if I double click the bat it works fine. Just not at startup. Does anyone know whats wrong with this setup?

5 Years
Discussion Span
Last Post by Bubbleboy

Add a MORE statement at the end of the bat file to hold the console open to see if there are any more error message. Also try it with the java command vs javaw


First off, I tried all the things you suggesting including a full path. I have been using javaw (as its supposed to be a secret program) but i tried with java and the same thing happens. I added more to the bat and nothing changed. I wonder if its starting before the jvm?


I use shortcuts to start many of my jar apps. Some I created by RC on the jar file and select "Create shortcut". Others that need custom commandlines, I copied from somewhere long ago and modify the Target: and Start in: entries.

I copied one into the Startup folder and the app was started at system boot time.


Thank you so much! I created a shortcut to the jar and it worked fine! I now know the time and dates that my brother logs into the computer. Mwahahahaha!!! Nonetheless, thank you for your quick replies and assistance.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.