Jump to content

why cant i run .jar files even when i installed java

Go to solution Solved by W1ll1aming,
8 hours ago, snozking said:

holy heck it actually works, thankyou for your smartness!

If you find the solution, click mark as solution do this thread can be usefull to others 😉

Without any further info i'll have to assume you are trying to run the installer?

In that case you'll need to open with javaw instead of java. You can do that by right clicking the file and select "open with" the select java

Link to post
Share on other sites

15 hours ago, Dujith said:

Without any further info i'll have to assume you are trying to run the installer?

In that case you'll need to open with javaw instead of java. You can do that by right clicking the file and select "open with" the select java

it does the exact same thing

Link to post
Share on other sites

Then select the file, shift right click and select "opent with" and use the bottom option for a different app,

from the new window scroll down again and select "more apps" and scroll down to browse for more apps.

Browse to the java folder (prob something like C:\Program Files\Java\jre1.8.0_301\bin) and select javaw.exe

Link to post
Share on other sites

15 hours ago, Dujith said:

Then select the file, shift right click and select "opent with" and use the bottom option for a different app,

from the new window scroll down again and select "more apps" and scroll down to browse for more apps.

Browse to the java folder (prob something like C:\Program Files\Java\jre1.8.0_301\bin) and select javaw.exe

i have, it does the same thing

Link to post
Share on other sites

1 minute ago, snozking said:

i have, it does the same thing

You know. Might have been handy to tell that in the OP. Including what you are trying todo 😄 Still not sure.

Anyway, its still trying to open it with java.exe instead of javaw.exe so best steps now are to remove all java installs and just install the 64bit java windows version.

https://javadl.oracle.com/webapps/download/AutoDL?BundleId=245060_d3c52aa6bfa54d3ca74e617f18309292

from: https://www.java.com/en/download/manual.jsp

Link to post
Share on other sites

1 hour ago, Dujith said:

You know. Might have been handy to tell that in the OP. Including what you are trying todo 😄 Still not sure.

Anyway, its still trying to open it with java.exe instead of javaw.exe so best steps now are to remove all java installs and just install the 64bit java windows version.

https://javadl.oracle.com/webapps/download/AutoDL?BundleId=245060_d3c52aa6bfa54d3ca74e617f18309292

from: https://www.java.com/en/download/manual.jsp

ive done this and it still does the exact same thing. ive also tried opening another jar file not minecraft related and it does the same thing.

Link to post
Share on other sites

2 hours ago, snozking said:

When i try to run the minecraft optifine file this box comes up for a second and if you click it before it dissapears then it shows this (image attactched) why cant i run optifine files? How do i fix it?

image.png.9e7aa3dd8b58619a1dff10cca1bf20f9.png

Somewhat guessing but heres a theory on what is happening:

 

In the screenshot it runs a cmd application, and based on how cmd works "Select" Only shows up when text is selected in the console, And when text is select cmd pauses execution of whatever is running.

 

So if your cmd is somehow broken to the point where it thinks text is selected but it isnt, cmd will halt execution, until text is somehow unselected, and it will continue execution of "java. exe".

Link to post
Share on other sites

1 minute ago, WillLTT said:

Somewhat guessing but heres a theory what is happening:

 

In the screenshot it runs a cmd application, and based on how cmd works "Select" Only shows up when text is selected in the console, And when text is select cmd pauses execution of whatever is running.

 

So if your cmd is somehow broken to the point where it thinks text is selected but it isnt, cmd will halt execution, until text is somehow unselected, and it will continue execution.

so how can i fix this? 

Link to post
Share on other sites

8 minutes ago, snozking said:

so how can i fix this? 

Disable quickedit mode in the console:

https://stackoverflow.com/questions/33883530/why-is-my-command-prompt-freezing-on-windows-10 (warning offsite-forum, not ltt)

 

https://social.msdn.microsoft.com/Forums/vstudio/en-US/bf9f97a1-ebbb-4f35-bbb6-6af740a71c76/how-to-disable-command-window-quick-edit-mode-once-and-for-all?forum=vcgeneral (warning offsite-forum, not ltt)

 

Quote

1) Close ALL console windows. So this is best to do when you are not busy.

 

2) Right click on the top left of the console window and select Defaults. It must be Defaults and not Properties.

 

3) In the Window which appears:

Deselect Quick Edit.

 

4) Click OK and then close the console window

5) Try launch java again

Quote

ignore this box cannot delete it (im on mobile)

-Will

Link to post
Share on other sites

Just now, GeoStellar said:

Stupid question, but do you have a jre or a jdk installed?  my memory may be faulty, but i could have sworn that optifine required a jdk.

if i have to manually install those, then probably not

Link to post
Share on other sites

11 hours ago, GeoStellar said:

Stupid question, but do you have a jre or a jdk installed?  my memory may be faulty, but i could have sworn that optifine required a jdk.

My memory might also be faulty but optifine requires java (jar) to extract itself to minecraft game dir

 

I would launch with java platform se binary i think?

 

-Will

Link to post
Share on other sites

Just now, WillLTT said:

My memory might also be faulty but optifine requires java (jar) to extract itself to minecraft game dir

jar is just the format.  all it is is an archive that contains .java files and other things that make it work.  I honestly would try doing a reinstall of java from java.com and getting a jdk from Java SE Development Kit 8 - Downloads (oracle.com)  See if either of those makes any difference.  after that, review the optifine install instructions

Link to post
Share on other sites

7 minutes ago, WillLTT said:

still no difference 😕

Link to post
Share on other sites

11 hours ago, GeoStellar said:

jar is just the format.  all it is is an archive that contains .java files and other things that make it work.  I honestly would try doing a reinstall of java from java.com and getting a jdk from Java SE Development Kit 8 - Downloads (oracle.com)  See if either of those makes any difference.  after that, review the optifine install instructions

nvm i missread your post. 

 

 

11 hours ago, GeoStellar said:

try doing a reinstall of java from java.com

I missed this part.

it makes sense now.

 

11 hours ago, snozking said:

still no difference 😕

Then i have no more ideas.

Good luck trubleshooting, I hope you manage to fix it 😃

 

-Will

Link to post
Share on other sites

19 minutes ago, GeoStellar said:

jar is just the format.  all it is is an archive that contains .java files and other things that make it work.  I honestly would try doing a reinstall of java from java.com and getting a jdk from Java SE Development Kit 8 - Downloads (oracle.com)  See if either of those makes any difference.  after that, review the optifine install instructions

i have done this and it still does the same thing with all jar files 😞

Link to post
Share on other sites

so i just installed optifine on my laptop.  im not quite sure what the issue is.  you should be able to download the jar, run it, it will then install optifine in the appdata folder, from there, it should be a matter of opening the default minecraft launcher, then selecting optifine.

 

 

Link to post
Share on other sites

9 minutes ago, GeoStellar said:

so i just installed optifine on my laptop.  im not quite sure what the issue is.  you should be able to download the jar, run it, it will then install optifine in the appdata folder, from there, it should be a matter of opening the default minecraft launcher, then selecting optifine.

 

 

yes, but nothing to do with java works. i think i need to change something on my computer but i dont know what.

Link to post
Share on other sites

10 hours ago, snozking said:

yes, but nothing to do with java works. i think i need to change something on my computer but i dont know what.

One last idea could you try to open cmd and drag the file into it and click enter?

 

To see what happends?

 

-Will

Link to post
Share on other sites

1 hour ago, snozking said:

here is what it says

I think you need to do "java -jar" you are running without telling java its a jar

Thats what that message is there i think:

 

Quote

java -jar "path_to_the_jar"

 

-Will

Link to post
Share on other sites

4 hours ago, WillLTT said:

I think you need to do "java -jar" you are running without telling java its a jar

Thats what that message is there i think:

 

 

-Will

holy heck it actually works, thankyou for your smartness!

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

×