How to develop for Bitbucket Server version 8.x on Windows environment

Developing an app for Bitbucket Data Center v8.9 on Windows machine, the command atlas-debug fails with errors:

[INFO] 2024-02-05 12:52:25,104 INFO  [main]  c.a.b.i.b.BitbucketServerApplication Starting BitbucketServerApplication v8.9.8 using Java 1.8.0_321 
[INFO] 2024-02-05 12:52:25,104 INFO  [main]  c.a.b.i.b.BitbucketServerApplication The following 1 profile is active: "windows"
[INFO] 2024-02-05 12:52:26,237 INFO  [main]  c.a.b.i.boot.log.BuildInfoLogger Starting Bitbucket 8.9.8 (1ae6adb built on Mon Dec 11 04:12:09 CET 2023)
[INFO] 2024-02-05 12:52:26,237 INFO  [main]  c.a.b.i.boot.log.BuildInfoLogger JVM: Oracle Corporation Java HotSpot(TM) 64-Bit Server VM 1.8.0_321-b07
[INFO] 2024-02-05 12:52:36,062 WARN  [spring-startup]  o.s.w.c.s.XmlWebApplicationContext Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'environmentValidator' defined in class path resource [critical-context.xml]: Invocation of init method failed; nested exception is com.atlassian.stash.internal.server.UnsupportedOperatingSystemException: Windows is not a supported operating system
[INFO] 2024-02-05 12:52:36,075 ERROR [spring-startup]  c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started
[INFO] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'environmentValidator' defined in class path resource [critical-context.xml]: Invocation of init method failed; nested exception is com.atlassian.stash.internal.server.UnsupportedOperatingSystemException: Windows is not a supported operating system
[INFO]  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1804)
[INFO]  at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:171)
[INFO]  at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:756)
[INFO]  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:572)
[INFO]  at javax.servlet.GenericServlet.init(GenericServlet.java:143)
[INFO]  at java.lang.Thread.run(Thread.java:750)
[INFO]  ... 24 frames trimmed
[INFO] Caused by: com.atlassian.stash.internal.server.UnsupportedOperatingSystemException: Windows is not a supported operating system
[INFO]  at com.atlassian.stash.internal.server.EnvironmentValidator.validate(EnvironmentValidator.java:17)
[INFO]  ... 6 common frames omitted
[INFO] 2024-02-05 12:52:36,196 INFO  [main]  c.a.b.i.b.BitbucketServerApplication Started BitbucketServerApplication in 12.865 seconds (JVM running for 16.313)
[INFO] bitbucket started successfully in 49s at http://localhost:7990/bitbucket
[INFO] Type Ctrl-C to shutdown gracefully

According to End of support for Bitbucket Server hosting on Windows | Bitbucket Data Center and Server 8.17 | Atlassian Documentation, so is it not even possible to develop on a Windows environment anymore?
Thanks in advance.
Cheers.

I have never used Windows when developing, so take this with a grain of salt, but have you tried running Bitbucket with Docker (Bitbucket) or with WSL2?

Tried with WSL2 as per

/mnt/c/Windows/System32/cmd.exe /c “/mnt/c/Applications/Atlassian/atlassian-plugin-sdk-8.2.7/bin/atlas-debug.bat"

but without luck.
I will try to reinstall SDK on Linux environment as per https://developer.atlassian.com/server/framework/atlassian-sdk/install-the-atlassian-sdk-on-a-linux-or-mac-system/.

Thank you.
Cheers.

Uhm are you sure you’re using WSL2? On Linux/macOs you wouldn’t run atlas-debug.bat, since batch files are for Windows’s prompt.
Anyway, yeah, if you follow the instructions that you linked it’s probably going to be fine, otherwise you can check what Remie from Collabsoft has done for Jira development in Docker and try something similar on Windows using something like Rancher or Docker Desktop

Yes, I’m sure. I was following Launching Windows application on Windows subsystem for Linux (WSL) | by Heinrich Chan | Medium, since I installed SDK on a Windows system.

Thanks, I will try that, too.
Cheers.

Yep, you launched the Windows application from WSL, which is just as launching it from Windows itself. You need to install the Linux SDK in WSL and launch the Linux executable :smile:

I tried that “trick” to fool Bitbucket the environment was Linux and not Windows (but without luck).