Skip to content

bash: javac: command not found #1809

@AdonisN

Description

@AdonisN

I have this Java program:

public class third{
public static void main(String[] args) {
int a = 0;
String b = "There " + (a > 1 ? " are " + x + " cookies" : "is one cookie") + " in the jar.";
System.out.println(b);
}
}

But I get this error instead:
"bash: javac: command not found"
Why?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions