Jump to content

Can't get Java File(s) to execute

Go to solution Solved by PorkishPig,
9 minutes ago, Zeredos said:

Same result, just an open blank cmd window.

Try using Jarfix from https://johann.loefflmann.net/en/software/jarfix/index.html.

On 5/28/2021 at 12:18 PM, Zeredos said:

If i remove "@ECHO OFF" it will loop like it did originally except show "-verbose" in the command line, but no additional information is given. Otherwise yep, just opens it essentially as if waiting for you to type.

As a sanity check, have you tried running batch script as an administrator? You'll need to define the full path to the .jar file when running as an administrator:

@echo off
java -verbose -jar "C:\Users\Destr\Desktop\forge-1.12.2-14-23-5-2855-installer.jar"
pause

 

Make sure to quote me or use @PorkishPig to notify me that you replied!

 

 

Desktop

CPU - Ryzen 9 3900X | Cooler - Noctua NH-D15 | Motherboard - ASUS TUF X570-PLUS RAM - Corsair Vengeance LPX DDR4-3200 32GB Case - Meshify C

GPU - RTX 3080 FE PSU - Straight Power 11 850W Platinum Storage - 980 PRO 1TB, 960 EVO 500GB, S31 1TB, MX500 500GB | OS - Windows 11 Pro

 

Homelab

CPU - Core i5-11400 | Cooler - Noctua NH-U12S | Motherboard - ASRock Z590M-ITX RAM - G.Skill Ripjaws V DDR4-3600 32GB (2x16)  | Case - Node 304

PSU - EVGA B3 650W | Storage - 860 EVO 256GB, Sabrent Rocket 4.0 1TB, WD Red 4TB (x6 in RAIDZ1 w/ LSI 9207-8i) | OS - TrueNAS Scale (Debian)

Link to post
Share on other sites

4 hours ago, PorkishPig said:

As a sanity check, have you tried running batch script as an administrator? You'll need to define the full path to the .jar file when running as an administrator:



@echo off
java -verbose -jar "C:\Users\Destr\Desktop\forge-1.12.2-14-23-5-2855-installer.jar"
pause

 

Well this is what i got from it, apparently it can't access it? i made sure it was ran as admin (i was not before)

image.png

Link to post
Share on other sites

19 hours ago, Zeredos said:

Well this is what i got from it, apparently it can't access it? i made sure it was ran as admin (i was not before)

Create a .bat file containing the code I provided in my last comment in the location of the jar, then run the script as an administrator.

 

The command you attempted to run is trying to write to C:\Windows\system32, which you do not have permission to modify.

Make sure to quote me or use @PorkishPig to notify me that you replied!

 

 

Desktop

CPU - Ryzen 9 3900X | Cooler - Noctua NH-D15 | Motherboard - ASUS TUF X570-PLUS RAM - Corsair Vengeance LPX DDR4-3200 32GB Case - Meshify C

GPU - RTX 3080 FE PSU - Straight Power 11 850W Platinum Storage - 980 PRO 1TB, 960 EVO 500GB, S31 1TB, MX500 500GB | OS - Windows 11 Pro

 

Homelab

CPU - Core i5-11400 | Cooler - Noctua NH-U12S | Motherboard - ASRock Z590M-ITX RAM - G.Skill Ripjaws V DDR4-3600 32GB (2x16)  | Case - Node 304

PSU - EVGA B3 650W | Storage - 860 EVO 256GB, Sabrent Rocket 4.0 1TB, WD Red 4TB (x6 in RAIDZ1 w/ LSI 9207-8i) | OS - TrueNAS Scale (Debian)

Link to post
Share on other sites

14 minutes ago, PorkishPig said:

Create a .bat file containing the code I provided in my last comment in the location of the jar, then run the script as an administrator.

 

The command you attempted to run is trying to write to C:\Windows\system32, which you do not have permission to modify.

I made a mistake and forgot an f on "echo off" i re did it again with the same thing, only this time (not the first out of all these suggestions) my cmd window just popped up blank.
image.png.3c3ab455221d29ce447d4b410dbd4b57.png

Link to post
Share on other sites

7 minutes ago, Zeredos said:

I made a mistake and forgot an f on "echo off" i re did it again with the same thing, only this time (not the first out of all these suggestions) my cmd window just popped up blank

Try uninstalling Java and grabbing the latest version of OpenJDK 16 from https://adoptopenjdk.net/?variant=openjdk16&jvmVariant=hotspot. Afterwards, try running the script as normal.

Make sure to quote me or use @PorkishPig to notify me that you replied!

 

 

Desktop

CPU - Ryzen 9 3900X | Cooler - Noctua NH-D15 | Motherboard - ASUS TUF X570-PLUS RAM - Corsair Vengeance LPX DDR4-3200 32GB Case - Meshify C

GPU - RTX 3080 FE PSU - Straight Power 11 850W Platinum Storage - 980 PRO 1TB, 960 EVO 500GB, S31 1TB, MX500 500GB | OS - Windows 11 Pro

 

Homelab

CPU - Core i5-11400 | Cooler - Noctua NH-U12S | Motherboard - ASRock Z590M-ITX RAM - G.Skill Ripjaws V DDR4-3600 32GB (2x16)  | Case - Node 304

PSU - EVGA B3 650W | Storage - 860 EVO 256GB, Sabrent Rocket 4.0 1TB, WD Red 4TB (x6 in RAIDZ1 w/ LSI 9207-8i) | OS - TrueNAS Scale (Debian)

Link to post
Share on other sites

7 minutes ago, PorkishPig said:

Try uninstalling Java and grabbing the latest version of OpenJDK 16 from https://adoptopenjdk.net/?variant=openjdk16&jvmVariant=hotspot. Afterwards, try running the script as normal.

Same result, just an open blank cmd window.

Link to post
Share on other sites

9 minutes ago, Zeredos said:

Same result, just an open blank cmd window.

Try using Jarfix from https://johann.loefflmann.net/en/software/jarfix/index.html.

Make sure to quote me or use @PorkishPig to notify me that you replied!

 

 

Desktop

CPU - Ryzen 9 3900X | Cooler - Noctua NH-D15 | Motherboard - ASUS TUF X570-PLUS RAM - Corsair Vengeance LPX DDR4-3200 32GB Case - Meshify C

GPU - RTX 3080 FE PSU - Straight Power 11 850W Platinum Storage - 980 PRO 1TB, 960 EVO 500GB, S31 1TB, MX500 500GB | OS - Windows 11 Pro

 

Homelab

CPU - Core i5-11400 | Cooler - Noctua NH-U12S | Motherboard - ASRock Z590M-ITX RAM - G.Skill Ripjaws V DDR4-3600 32GB (2x16)  | Case - Node 304

PSU - EVGA B3 650W | Storage - 860 EVO 256GB, Sabrent Rocket 4.0 1TB, WD Red 4TB (x6 in RAIDZ1 w/ LSI 9207-8i) | OS - TrueNAS Scale (Debian)

Link to post
Share on other sites

17 minutes ago, PorkishPig said:

Alrighty! success, thank you so very much i never imagined this could of been such a pain. I also wanted to thank everyone for their suggestions and time, i love this community truly,

Zeredos signing off.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×