
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
- Cannot find module failure
Sorry, Newbe question here. I just installed Appwrite and am trying to install my first Function an am having absolutely no luck what-so-ever getting this done...
- Can't push functions when self-hosting o...
Hello, I'm a bit new to appwrite functions and recently hosted a fresh 1.7.4 on my portainer setup. Tried to create a new function and when trying to push it I ...
- Internal curl errors has occurred within...
