Usually Microsoft Visual Studio c compiler (as installed by Visual Studio
installer) already has short names set. It seems the short name has to be 8
characters in length and you can't set it when some process is running in
that directory. You can check the short path in Windows cmd's "dir /x"
command. And try configure without --with-toolchain-version and
--with-tools-dir and only set these flags if it fails without those flags:
you declare version is 22 but you point to MSVC 2019's directory, and you
should point to the bin directory within the VC directory.

On Sun, Jun 30, 2024 at 12:57 PM Anil <1dropafl...@gmail.com> wrote:

> Update:
> I was able to get past the error
> I installed Visual Studio 2022, rebooted, but it still cannot detect it.
>
> PS C:\> fsutil file setshortname "Program Files (x86)" PROGRA~1
> Error:  Access is denied.
>
> PS C:\Program Files (x86)> fsutil file setshortname  "Microsoft Visual
> Studio"  Microsoft_Visual_Studio_2019
> Error:  The parameter is incorrect.
>
> $ bash configure --with-boot-jdk=/c/Users/Anil/OpenJDK/jdk-22.0.1
> --with-toolchain-version=2022 --enable-debug --with-tools-dir="C:\Program
> Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC"
>
> configure: Using default toolchain microsoft (Microsoft Visual Studio)
> configure: The path given by --with-tools-dir does not contain a valid
> configure: Visual Studio installation. Please point to the VC/bin or
> VC/bin/amd64
> configure: directory within the Visual Studio installation
> configure: error: Cannot locate a valid Visual Studio installation
> configure exiting with result code 1
>
>
>
> On Fri, Jun 28, 2024 at 8:50 PM Anil <1dropafl...@gmail.com> wrote:
>
>> (changed Subject line. was: Is anyone able to build the JDK on Windows
>> using VirtualBox to host Ubuntu?)
>>
>> I downloaded and unzipped openjdk.
>> $ ls
>> jdk  jdk-22.0.1  openjdk-22.0.1_windows-x64_bin.zip
>>
>> but still I get the same error message
>>
>> configure: Could not find a valid Boot JDK. OpenJDK distributions are
>>> available at http://jdk.java.net/.
>>> configure: This might be fixed by explicitly setting --with-boot-jdk
>>> configure: error: Cannot continue
>>> configure exiting with result code 1
>>
>>
>> I am wondering if I should *not *install the Open JDK in the directory
>> created by Cygwin (/c/Users/Anil/OpenJDK) but install it in the /cygdrive
>> Windows folders?
>> (I observe that the folder created in Cygwin is not visible outside, in
>> Windows even after rebooting the laptop).
>> Can someone please confirm?
>> thanks,
>> Anil
>>
>>
>> On Fri, Jun 28, 2024 at 6:48 PM Anil <1dropafl...@gmail.com> wrote:
>>
>>> Thank you. I installed Cygwin on my Windows 11 laptop, and after
>>> overcoming some minor blocks, ran 'bash configure'.
>>> Am I correct in assuming that I also need to have Open JDK installed,
>>> not the Oracle JDK?
>>> I have Java 17 from Oracle installed.
>>>
>>> configure: Found potential Boot JDK using JAVA_HOME
>>> configure: Potential Boot JDK found at
>>> /cygdrive/c/progra~1/java/jdk-17.0.4.1 is); ignoringot(TM) 64-Bit Server VM
>>> (build 17.0.4.1+1-LTS-2, mixed mode, sharing)
>>> configure: (Your Boot JDK version must be one of: 22 23 24)
>>> checking for javac...
>>> /cygdrive/c/progra~1/common~1/oracle/java/javapath/javac.exe
>>> checking for java...
>>> /cygdrive/c/progra~1/common~1/oracle/java/javapath/java.exe
>>> configure: Found potential Boot JDK using well-known locations (in
>>> /cygdrive/c/progra~1/java/jdk-17.0.4.1)
>>> configure: Potential Boot JDK found at
>>> /cygdrive/c/progra~1/java/jdk-17.0.4.1 is); ignoringot(TM) 64-Bit Server VM
>>> (build 17.0.4.1+1-LTS-2, mixed mode, sharing)
>>> configure: (Your Boot JDK version must be one of: 22 23 24)
>>> configure: Found potential Boot JDK using well-known locations (in
>>> /cygdrive/c/progra~1/java/jdk-11.0.10)
>>> configure: Potential Boot JDK found at
>>> /cygdrive/c/progra~1/java/jdk-11.0.10 is ); ignoringot(TM) 64-Bit Server VM
>>> 18.9 (build 11.0.10+8-LTS-162, mixed mode)
>>> configure: (Your Boot JDK version must be one of: 22 23 24)
>>> configure: Found potential Boot JDK using well-known locations (in
>>> /cygdrive/c/progra~1/java/javafx-sdk-11.0.2)
>>> configure: Potential Boot JDK found at
>>> /cygdrive/c/progra~1/java/javafx-sdk-11.0.2 did not contain bin/java;
>>> ignoring
>>> configure: Found potential Boot JDK using well-known locations (in
>>> /cygdrive/c/progra~1/java/jdk-17.0.4.1)
>>> configure: Potential Boot JDK found at
>>> /cygdrive/c/progra~1/java/jdk-17.0.4.1 is); ignoringot(TM) 64-Bit Server VM
>>> (build 17.0.4.1+1-LTS-2, mixed mode, sharing)
>>> configure: (Your Boot JDK version must be one of: 22 23 24)
>>> configure: Found potential Boot JDK using well-known locations (in
>>> /cygdrive/c/progra~1/java/jdk-11.0.10)
>>> configure: Potential Boot JDK found at
>>> /cygdrive/c/progra~1/java/jdk-11.0.10 is ); ignoringot(TM) 64-Bit Server VM
>>> 18.9 (build 11.0.10+8-LTS-162, mixed mode)
>>> configure: (Your Boot JDK version must be one of: 22 23 24)
>>> configure: Found potential Boot JDK using well-known locations (in
>>> /cygdrive/c/progra~1/java/javafx-sdk-11.0.2)
>>> configure: Potential Boot JDK found at
>>> /cygdrive/c/progra~1/java/javafx-sdk-11.0.2 did not contain bin/java;
>>> ignoring
>>> configure: Found potential Boot JDK using well-known locations (in
>>> /cygdrive/c/Program Files/Java/jdk-17.0.4.1)
>>> configure: Potential Boot JDK found at /cygdrive/c/Program
>>> Files/Java/jdk-17.0.4); ignoringot(TM) 64-Bit Server VM (build
>>> 17.0.4.1+1-LTS-2, mixed mode, sharing)
>>> configure: (Your Boot JDK version must be one of: 22 23 24)
>>> configure: Found potential Boot JDK using well-known locations (in
>>> /cygdrive/c/Program Files/Java/jdk-11.0.10)
>>> configure: Potential Boot JDK found at /cygdrive/c/Program
>>> Files/Java/jdk-11.0.1); ignoringot(TM) 64-Bit Server VM 18.9 (build
>>> 11.0.10+8-LTS-162, mixed mode)
>>> configure: (Your Boot JDK version must be one of: 22 23 24)
>>> configure: Found potential Boot JDK using well-known locations (in
>>> /cygdrive/c/Program Files/Java/javafx-sdk-11.0.2)
>>> configure: Potential Boot JDK found at /cygdrive/c/Program
>>> Files/Java/javafx-sdk-11.0.2 did not contain bin/java; ignoring
>>> configure: Could not find a valid Boot JDK. OpenJDK distributions are
>>> available at http://jdk.java.net/.
>>> configure: This might be fixed by explicitly setting --with-boot-jdk
>>> configure: error: Cannot continue
>>> configure exiting with result code 1
>>>
>>>
>>> On Thu, Jun 27, 2024 at 9:06 AM <erik.joels...@oracle.com> wrote:
>>>
>>>> Hello Anil,
>>>>
>>>> Building in a VM on a laptop should be doable, but given how resource
>>>> intensive the JDK build is, you could run into problems like you describe.
>>>> You are most likely to get the best build performance running natively on
>>>> the machine and OS you have, so my recommendation is to build for Windows
>>>> in your case. If you still prefer to build for Linux, I think the best
>>>> option is to use WSL. See doc/building.md for instructions on how to build
>>>> for Linux in WSL. To build for Windows, I recommend installing Cygwin as
>>>> the most straightforward and well tested option for a POSIX support layer
>>>> on Windows. Once installed, you won't need to run any Windows commands as
>>>> Cygwin emulates a Linux/Unix environment. Again see doc/building.md for
>>>> instructions on how to install a build environment on Windows.
>>>>
>>>> /Erik
>>>> On 6/27/24 04:51, Anil wrote:
>>>>
>>>> I want to try out a small contribution to the JDK and want to build the
>>>> JDK first.
>>>> I have a Windows 11 laptop.
>>>>
>>>> I am not comfortable with the Windows commands and someone mentioned in
>>>> this forum that most of the building is done on Linux.
>>>> So I installed VirtualBox 7.0.18 and Ubuntu 24.04. however I was
>>>> getting black screens and freezing. I downgraded the Ubuntu to 222.04 and
>>>> still got black screens. I don't know why this is happening.
>>>> Any advice appreciated.
>>>> Anil
>>>>
>>>> On Tue, Jun 18, 2024, 7:25 PM Anil <1dropafl...@gmail.com> wrote:
>>>>
>>>>> Hello,
>>>>> I want to try out a small contribution to the JDK and wanted to
>>>>> build the JDK first,
>>>>> before I change the code.
>>>>> I forked and cloned the jdk following the instructions at The OpenJDK
>>>>> Developers' Guide – OpenJDK Developers’ Guide
>>>>> <https://openjdk.org/guide/#cloning-the-jdk>
>>>>>
>>>>> I am on Windows 11.
>>>>> These instructions are given on the page but I am unsure which of
>>>>> these to execute since I have already forked and cloned the git repo
>>>>>
>>>>> $ wget 
>>>>> https://download.java.net/java/GA/jdk16/7863447f0ab643c585b9bdebf67c69db/36/GPL/openjdk-16_linux-x64_bin.tar.gz
>>>>> $ tar xzf openjdk-16_linux-x64_bin.tar.gz
>>>>> $ sudo apt-get install autoconf zip make gcc g++ libx11-dev libxext-dev 
>>>>> libxrender-dev libxrandr-dev libxtst-dev libxt-dev libcups2-dev 
>>>>> libfontconfig1-dev libasound2-dev
>>>>> $ cd jdk
>>>>> $ sh ./configure --with-boot-jdk=$HOME/jdk-16/
>>>>> $ make images
>>>>>
>>>>>
>>>>> Do I still need to do the wget?
>>>>> Also, I wondered if I should use book jdk-17 instead of jdk-16 as in
>>>>> the instructions above.
>>>>> thanks,
>>>>> Anil
>>>>>
>>>>>

Reply via email to