
Hi folks I am getting the below build error when I try to deploy a java function
Task :compileJava FAILED /usr/local/server/src/main/java/io/openruntimes/java/email-contact-form-demo/src/Main.java:5: error: package io.appwrite does not exist import io.appwrite.Client; ^ /usr/local/server/src/main/java/io/openruntimes/java/email-contact-form-demo/src/Utils.java:9: error: package jakarta.mail does not exist import jakarta.mail.MessagingException; ^ /usr/local/server/src/main/java/io/openruntimes/java/email-contact-form-demo/src/Utils.java:10: error: package jakarta.mail does not exist import jakarta.mail.Session; ^ /usr/local/server/src/main/java/io/openruntimes/java/email-contact-form-demo/src/Utils.java:11: error: package jakarta.mail does not exist import jakarta.mail.Transport; ^ /usr/local/server/src/main/java/io/openruntimes/java/email-contact-form-demo/src/Utils.java:12: error: package jakarta.mail.internet does not exist import jakarta.mail.internet.InternetAddress; ^ /usr/local/server/src/main/java/io/openruntimes/java/email-contact-form-demo/src/Utils.java:13: error: package jakarta.mail.internet does not exist import jakarta.mail.internet.MimeMessage;
My deps.gradle file
dependencies { implementation 'io.appwrite:sdk-for-kotlin:2.0.0' implementation 'com.sun.mail:jakarta.mail:2.0.0' }
I am using self hosted appwrite instance v1.4.3
java runtime 17

Hi @Steven can you please help

Hi @Danish can you help here please

Hello @palani please, avoid pinging people if it's not really needed 😅

Seems like it was not possible to get the packages located at such directories

How are you deploying the functions?

Sorry

Via Console

Given the entry point as main

[Solved] Build Error on Java Functions

Sooo... What's the solution?

Deploying throght any alternative method?

Yeah deployed it via cli

I see, glad to hear you managed to solve it 😄 . Sorry for not replying before, I lost the post between many others😓

No problem.i get it..
Recommended threads
- How to detect user disconnection?
I'm creating a 1v1 challenge using realtime and i want to trigger a function when the user disconnect... how to make this using Appwrite Realtime? i searched i...
- How can I use appwrite function for stre...
I am building a course website where I want users can view the videos stored in appwrite storage in diff quality and also will do some processing before streami...
- Every time I deploy a function via CLI, ...
deploying appwrite function via cli breaks Git connection in function settings tab but when I push to git triggered deployment fail. usually multiple deployment...
