julianghionoiu / tdl-lord-of-runners

One repo to rule them all, One repo to configure them, One repo to bring them all and in the darkness bind them
GNU General Public License v3.0
0 stars 0 forks source link

Fix windows batch script to pre java 9 and java 9 #3

Closed neomatrix369 closed 6 years ago

neomatrix369 commented 6 years ago

On the back of the conversation about Windows batch script failing for the recording program.

Added echoes displaying system info and important environment variables and removed reserved characters like > and < from echoes. <=== these were causing the error '..specified file cannot be found'

Also fixed two usages of the set variable statements for JAVA_HOME and JAVA_FULL_VERSION <=== this is what the user had as an issue and the other implementation of set it set "VARIABLE=VALUE" surrounded by quotes.

Here's a snapshot of the run logs:


Displaying operating system specific systeminfo...
OS Name:                   Microsoft Windows 10 Enterprise Evaluation
OS Version:                10.0.15063 N/A Build 15063
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Workstation
OS Build Type:             Multiprocessor Free
BIOS Version:              innotek GmbH VirtualBox, 12/1/2006

JAVA_FULL_VERSION=9.0.1

JAVA_VERSION=9
"--- Java 9 or higher detected (Java version 9) ---"
"Adding JVM args to the DEFAULT_JVM_OPTS variable, new value set to ''"
--------------------------------------------------------------------------------------------------------------

C:\Users\IEUser\Downloads\tdl-lord-of-runners\template-for-recording>"java.exe" --illegal-access=warn --add-modules=java.xml.bind,java.activation    -jar "C:\Users\IEUser\Downloads\tdl-lord-of-runners\template-for-recording\\record\record-and-upload-capsule.jar" --config C:\Users\IEUser\Downloads\tdl-lord-of-runners\template-for-recording\\config\credentials.config --store C:\Users\IEUser\Downloads\tdl-lord-of-runners\template-for-recording\\record\localstore --sourcecode C:\Users\IEUser\Downloads\tdl-lord-of-runners\template-for-recording\
WARNING: Illegal reflective access by Capsule (file:/C:/Users/IEUser/Downloads/tdl-lord-of-runners/template-for-recording/record/record-and-upload-capsule.jar) to field com.sun.jmx.mbeanserver.JmxMBeanServer.mbsInterceptor
INFO  [main]       - Starting recording app
INFO  [main]       - Checking permissions
ERROR [main]       - User does not have enough permissions to upload. Reason: The provided token has expired. (Service: Amazon S3; Status Code: 400; Error Code: ExpiredToken; Request ID: 012B90623F1A3A91)
neomatrix369 commented 6 years ago

I agree some of the echos added are already taken care of by the DEBUG switch but I suggest its best to display these echos at all times, given the issues we have had.

neomatrix369 commented 6 years ago

@julianghionoiu could you also please run this script on Windows 10 before we merge the PR

julianghionoiu commented 6 years ago

@neomatrix369 which test cases have you covered?

neomatrix369 commented 6 years ago

@neomatrix369 both Java 9 and pre-Java 9 tests, also did a test where JAVA_HOME exists and this path which might not have been traversed previously might be an issue to investigate, although a separate thread of investigation.

neomatrix369 commented 6 years ago

Now also do specific edge case tests with JAVA_FULL_VERSION and wasn't able to reproduce the reported issue. The error "The syntax of the command is incorrect." could occur if a command is not supplied with the right parameters and e.g. just calling mv or rm or copy.