I'm in a tough spot trying to learn how to run java in ubuntu while knowing nothing about linux. I'm wrangling with two languages at once.
So when I'm trying to compile my .java file into class, this shows up. (What does this mean?)
Code:
~/myProject$ javac Hello.java
Hello.java:5: error: cannot find symbol
System.out.printIn("Hello World, from Ubuntu");
^
symbol: method printIn(String)
location: variable out of type PrintStream
1 error
...here's another try...
Code:
~/myProject$ javac Hello
error: Class names, 'Hello', are only accepted if annotation processing is explicitly requested
1 error
Here's my java file: Hello.java
Code:
public class Hello
{
public static void main(String args[])
{
System.out.printIn("Hello World, from Ubuntu");
}
}
and finally, when I try to run it...
Code:
~/myProject$ java Hello
Error: Could not find or load main class Hello
Caused by: java.lang.ClassNotFoundException: Hello
I'm fried.
Bookmarks