0

So...

When i want to open java executable file by double clicking it, system wants me to select program to open. Before It wasn't like this. it just opened...

when that window pops up, first thing is:

"C:\Program Files\Java\jre1.8.0_92/bin/javaw.exe" -jar "%1" %*

Selecting it nothing changes. I was trying to open it with .bat file and cmd, but it showed me error:

The System cannot find the file C:\ProgramData\Oracle\Java\javapath\java.exe

i tried MANY different ways to do it, but nothing works :(

Also, I can write programs in Eclipse without any problems. I am sure, that java files are "Executable jar files".

  • This forum is for programming questions, Read the [faq] , Search on google or go to http://superuser.com/ – tgkprog Jun 01 '16 at 20:38
  • You need to associate the JRE with double clicking on files of type JAR. It's a Windows thing. Your "success" with Eclipse is immaterial. – duffymo Jun 01 '16 at 20:40
  • Does your program use console I/O e.g. `System.out System.err System.in`? (In Eclipse, does it put output to or take input from the Console pane?) If so it needs to run under `java.exe` not `javaw.exe` which is for programs that use GUI (e.g. swing) only. – dave_thompson_085 Jun 01 '16 at 22:49
  • dave_thompson_085 - i tried opening program with those "System.out" and without. Nothing works even changing to java.exe. Also when i open it with java.exe, it says "...couldn't find..." and closes itself in a milisecond. – StanawalkaWorld Jun 02 '16 at 13:09

0 Answers0