Back

Appwrite CLI not showing Java runtime instance

  • 0
  • Tools
Binyamin
3 Oct, 2023, 17:38

As I don't see bun in your activated functions

TL;DR
The user is having trouble with the Appwrite CLI not showing the Java runtime instance. They fixed the issue by selecting the function using the spacebar and hitting enter. They were able to deploy the function successfully after editing the Main.java file. To test and run the file locally, they recommend checking the provided link. The user needed to deploy the function in order to run the Java file. They were able to resolve the issue with the help provided. For those using a self-hosted instance, they need to edit the ~/.appwrite/prefs.json file and relogin using the Appwrite CLI to create a Java function. The user mentions
Danish
3 Oct, 2023, 17:38

cloud

Binyamin
3 Oct, 2023, 17:38

Ooh I thought it's self-hosted

Danish
3 Oct, 2023, 17:38

cli takes proejcts from cloud console

Binyamin
3 Oct, 2023, 17:39

The cloud support a limited list of runtimes till the production release.

Binyamin
3 Oct, 2023, 17:39

If you want to have runtimes like Java then you'll need to create your Appwrite instance and self-host it.

Danish
3 Oct, 2023, 17:40

I have self-hosted it but cli is going to the cloud console one

Binyamin
3 Oct, 2023, 17:40

Gotcha

Binyamin
3 Oct, 2023, 17:40

What OS you're using?

Danish
3 Oct, 2023, 17:40

Ubuntu on WSL2

Binyamin
3 Oct, 2023, 17:40

Good

Binyamin
3 Oct, 2023, 17:41

Edit the ~/.appwrite/prefs.json file Remove all the content or backup by renaming it. Then relogin using the Appwrite CLI to your self-hosted instance, then you'll have the option to create a Java function.

Danish
3 Oct, 2023, 17:42

cool. I'll try

Danish
3 Oct, 2023, 17:47

yup it worked. Thanks for the help

Binyamin
3 Oct, 2023, 17:48

<:appwriteupvote:899677724615016528>

Danish
3 Oct, 2023, 17:51

in order to run the java file, i need to deploy the function right

Danish
3 Oct, 2023, 17:51

?

Binyamin
3 Oct, 2023, 17:52

What you mean? You've created the function using appwrite init function?

Danish
3 Oct, 2023, 17:52

yea

Danish
3 Oct, 2023, 17:52

i need to run the Main.java file

Binyamin
3 Oct, 2023, 17:54

Then edit the Main.java file and use the appwrite deploy function to upload it when you done If you want to test it and run it locally I would recommend look here on Appwrite is running that file.

Danish
3 Oct, 2023, 17:55

cool

Danish
3 Oct, 2023, 18:02

I edited Main.java file and on running appwrite deploy function, it shows Success deployed 0 functions

Binyamin
3 Oct, 2023, 18:03

You need to select the function using the spacebar then hit enter

Danish
3 Oct, 2023, 18:04

ugh my bad

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more