azure-functions-core-tools icon indicating copy to clipboard operation
azure-functions-core-tools copied to clipboard

`Func new` not working for java runtime

Open aishwaryabh opened this issue 5 months ago • 4 comments

Version

4.1.0 (and all other recent ones; this hasn't been working for a bit)

Description

Running func new --template "Http Trigger" --name MyHttpTrigger does not work on core tools after running func init Image

Steps to reproduce

  1. func init TestJavaProject --worker-runtime java
  2. func new --template "Http Trigger" --name MyHttpTrigger

aishwaryabh avatar Jul 17 '25 23:07 aishwaryabh

@aishwaryabh are you able to identify the last CLI version where this worked?

liliankasem avatar Jul 17 '25 23:07 liliankasem

Official docs recommend that users use Maven for java apps (https://learn.microsoft.com/en-us/azure/azure-functions/functions-develop-local?pivots=programming-language-java). From past GH issues and this one, it seems that func new and func init in the command line aren't intende to be used with Java (not in selection menu, throws errors): https://github.com/Azure/azure-functions-core-tools/issues/2562, https://github.com/Azure/azure-functions-core-tools/issues/2542.

Removing Java support is not really an option either (see Maven plugin).

Instead, this issue will be used to update messaging and documentation related to this limitation/restriction.

satvu avatar Aug 01 '25 00:08 satvu

Marking this as design, as we need to better define this experience.

fabiocav avatar Dec 10 '25 21:12 fabiocav

From @liliankasem : The request for this issue is simply to have a clear error message to improve the experience.

The linked Java epic (#4579) has additional tasks tracking the work required to bring Java templates into Core Tools.

fabiocav avatar Dec 10 '25 21:12 fabiocav