java engines

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
SzG
Posts: 2447
Joined: Fri Mar 10, 2006 6:20 am
Location: Szentendre, Hungary

java engines

Post by SzG » Wed Oct 28, 2015 4:16 pm

I use very few java engines. Reason: whenever there is a java update, the java.exe path changes by following the version number and the engines do not see java.exe any more. To correct the path in each batch file is tiresome and I even might forget all occurrences.

There might be a solution for the engines to follow the path changes but I don't know it. Maybe some environment variable can be used? Can someone enlighten me?
Gabor Szots

CCRL testing group

CRoberson
Posts: 1958
Joined: Mon Mar 13, 2006 1:31 am
Location: North Carolina, USA
Contact:

Re: java engines

Post by CRoberson » Wed Oct 28, 2015 5:14 pm

There is a PATH environment variable. Create a symbolic link to that spot at C: and call it CURRENTJAVA, then put CURRENTJAVA in the PATH. When Java versions change, change the CURRENTJAVA link to the new spot.

To all the programs and the PATH variable it seems like the Java location never changes.

User avatar
Matthias Gemuh
Posts: 3234
Joined: Thu Mar 09, 2006 8:10 am
Contact:

Re: java engines

Post by Matthias Gemuh » Wed Oct 28, 2015 5:17 pm

SzG wrote:I use very few java engines. Reason: whenever there is a java update, the java.exe path changes by following the version number and the engines do not see java.exe any more. To correct the path in each batch file is tiresome and I even might forget all occurrences.

There might be a solution for the engines to follow the path changes but I don't know it. Maybe some environment variable can be used? Can someone enlighten me?
ChessGUI uses javaw.exe without a path.
My engine was quite strong till I added knowledge to it.
http://www.chess.hylogic.de

SzG
Posts: 2447
Joined: Fri Mar 10, 2006 6:20 am
Location: Szentendre, Hungary

Re: java engines

Post by SzG » Wed Oct 28, 2015 6:12 pm

CRoberson wrote:There is a PATH environment variable. Create a symbolic link to that spot at C: and call it CURRENTJAVA, then put CURRENTJAVA in the PATH. When Java versions change, change the CURRENTJAVA link to the new spot.

To all the programs and the PATH variable it seems like the Java location never changes.
Hi Charles,

Thank you for the hint. This is what I have done:

1. I have created a Current_java_location variable which has the value c:\Program Files\Java\jre1.8.0_65\bin.

2. I appended Current_java_location to the Path variable. (BTW, can it not be done in one step, without the above variable?)

Now when I invoke the 'whatever' engine with java.exe -jar whatever etc., it runs but I don't know which java it uses because the Path variable also contains a C:\ProgramData\Oracle\Java\javapath element and at that location I find 3 files, one of them is java.exe (the other 2 are javaw.exe and javaws.exe) but it is 0 bytes long (??). And while java is running, Task Manager points to that location.
I am not sure if the 32-bit or the 64-bit java is running (I have both installed).

Sorry for the confusion.
Gabor Szots

CCRL testing group

Post Reply