How can I run java on Windows?

Felipe Bonadykov :

I have a problem when running asadmin. When I double click on asadmin.bat file, the command prompt starts, than it opens a java black window (also a prompt), but both windows close instantly. If I run "asadmin" command from PowerShell (I use Windows 10), it opens a prompt and closes it instantly. PS just goes to the next line. Windows cmd behaves in the same way (just skips to the next command without writing anything). I have tried to define path system variable. Before I did this the cmd just didn't recognize asadmin command. Yesterday I defined path for java home to be bale to run jar files (if this is relevant). If I run any of my jar files, they work fine, but there is black cmd running as well (perhaps it's because i defined system variable to java.exe and not javaw.exe (the later option just didn't work)). Though, if I double click on java.exe the window pops and disappears What can I do? Any piece of advice will be appreciated.

P.S. GlassFish 5, jdk 10.0.2 It seems to be version incompatibility

Georgi Dzhondzhov :

Think "asadmin" is litteray saying "as administartor". Maybe you are trying to start a domain ?

  1. Open the windows search menu by pressnig the windows button.
  2. Type CMD in the search field. Results appear.
  3. Right lick the CMD and select run as administrator.
  4. Navigate to your run file location using the CD command."asadmin" file in your case.
  5. Try running asadmin command from that window.The window shouldn't dissapear.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=301400&siteId=1