Re: Simple Syntax Error(s)
Quote:
java.lang.NoClassDefFoundError: Project
where is the class named: Project? The java program can not find it.
The code you posted is for the class named: Program
The error is from the java program at runtime, not a compiler error which is where you would see syntax errors.
If you are using an IDE, you need to ask someone that uses one like yours how to configure it. There is a section of this forum for IDEs.
Re: Simple Syntax Error(s)
Quote:
Originally Posted by
Norm
where is the class named: Project? The java program can not find it.
The code you posted is for the class named: Program
The error is from the java program at runtime, not a compiler error which is where you would see syntax errors.
If you are using an IDE, you need to ask someone that uses one like yours how to configure it. There is a section of this forum for IDEs.
Thank you for the help! This lead me to trying Eclipse, in which I was able to repair the code easier and it isn't restricted like the online IDE I was trying.
Here's the fixed code, incase if it's use for anyone else:
Program.java(Class)
Code:
/**
*
*/
/**
* @author Computer Owner
*
*/
public class Program {
/**
* @param args
*/
public static void main(String[] args) {
String[] getShells = {"http://127.0.0.1/shell.php", "http://127.0.0.1/shell.php", "http://127.0.0.1/shell.php"};
String shellWord = "shells";
String areIs = "are";
int shellCount = (int) getShells.length;
if (shellCount == 1) {
shellWord = "shell";
areIs = "is";
}
System.out.println("There " + areIs + " " + shellCount + " " + shellWord);
}
}