How do I get Java Files to Open on my Computer
Run Java application at Windows startup - Stack Overflow
How to make borderless fullscreen in java?
how do i get java to open .jar files in windows 10? i googled and nothing seems to be working for me.
Videos
For a while I have been wanting to download mods fer some games but they come in java files. I have tried to open them but every time, a window opens then closes instantly. I have tried to download several different Java file openers but none of them do the trick. I was wondering if there is a software that would do this properly or there is something wrong with my software.
Create a .bat file and put this inside:
javaw -Xmx200m -jar C:\Path\to\jarfile\TheJar.jar
Then put the .bat file into the windows startup folder.
One more thing: There's a difference between using java and javaw. While java is better when you are debugging an application, the application prints text or something like that, javaw is better when you don't need that. Why? Because java runs java program using a console that shows all that application prints (println's, exception stacktraces and so on) while javaw doesn't run on console.
it's simple as you have to put shortcut in
Windows 7
C:\users\All Users\Start Menu\Programs\Startup(Admin) or User home directory(%userProfile%)
Windows 10 :
In Run shell:startup
in it's property -> shortcut -> target - > java.exe -jar D:\..\runJar.jar
NOTE: This will run only after you login
With Admin Right
sc create serviceName binpath= "java.exe -jar D:\..\runJar.jar" Will create windows service
if you get timeout use cmd /c D:\JAVA7~1\jdk1.7.0_51\bin\java.exe -jar d:\jenkins\jenkins.war but even with this you'll get timeout but in background java.exe will be started. Check in task manager
In some restricted environment as I was in corporate environment
ERROR:
The service did not respond to the start or control request in a timely fashion
In this case
cmd /c D:\JAVA7~1\jdk1.7.0_51\bin\java.exe -jar d:\jenkins\jenkins.war
This will give you an error if you run manually but will run in background.
NOTE: This will run at windows logon start-up(before sign-in, Based on service 'Startup Type')
Detailed explanation of creating windows service
Regedit
Note: Edit Advanced User only
To Run for Current User Only
HKEY_CURRENT_USER/SOFTWARE/MICROSOFT/WINDOWS/CURRENT_VERSION/RUN
To Run for All Users
hkey_local_machine/SOFTWARE/MICROSOFT/WINDOWS/CURRENT_VERSION/RUN
Create a String with Name and Path using above command