Java compiler issue

writing basic program using java language
it was expected to add and remove element from linkedlist simple
but there is issue with your enbuilt java compiler code didnt run.
So try to fix yur java compiler

Expected behavior:

Actual behavior:

Steps to reproduce:

https://replit.com/@diAryan/dsa-in-java#Linkedlist.java

chrome windows

Hi @diAryan thanks for your message.

I think you have misunderstood how to use the Java template in Replit.

The .replit file looks for and runs Main. You had left an old compiled Main.class file which was repeatedly running.

I forked your code and edited the .replit file to show the following:

compile = "javac -classpath .:target/dependency/* -d . $(find . -type f -name '*.java')"
run = "java -classpath .:target/dependency/* Linkedlist"
entrypoint = "Linkedlist.java"
hidden = ["**/*.class"]

Notice that I’ve changed Main at the end of the run= line to Linkedlist and the same for the following line entrypoint =

When I run the code now I see:

image

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.