Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 532729

Summary: [Win32] Make SWT windows building easier by auto-finding JAVA_HOME
Product: [Eclipse Project] Platform Reporter: Leo Ufimtsev <lufimtse>
Component: SWTAssignee: Leo Ufimtsev <lufimtse>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Lars.Vogel, platform-swt-inbox
Version: 4.8   
Target Milestone: 4.8 M7   
Hardware: PC   
OS: Linux   
See Also: https://git.eclipse.org/r/#/c/119912/
https://bugs.eclipse.org/bugs/show_bug.cgi?id=533193
Whiteboard:

Description Leo Ufimtsev CLA 2018-03-21 16:04:47 EDT
Setting up an SWT/Windows build environment is kinda complicated at the moment.

The build.bat hard-codes the java path to a directory on W:\BUILD ... or expects the user to manually set a 'SWT_JAVA_HOME' (and not informing the user about it either).

This discourages new users from contributing.

I've updated the build.bat to automatically locate the latest JDK (*1) (if installed & not in hard-coded location). I've also added a few extra  checks for tooling to help users setup their Win32 build environment if something's missing (e.g cl C++ compiler etc..).

I also added a Readme for windows setup next to the Cocoa Readme.

As a note, this is the first time I've compiled something on Windows or wrote/modified a batch script (I'm a Linux/Gtk cave dweller), so let me know if I missed something.

~Patch en route.

[1]
Src:  Automatically define JAVA_HOME:
http://blog.centerkey.com/2009/05/javahome-command-script.html
Comment 1 Leo Ufimtsev CLA 2018-03-23 11:20:59 EDT
Awaiting review/merge from Kikita/Niraj
Comment 2 Lars Vogel CLA 2018-03-28 03:24:05 EDT
(In reply to Leo Ufimtsev from comment #1)
> Awaiting review/merge from Kikita/Niraj

Merged