java - Import doesn't work in command line -
i have slow netbook installed lubuntu geany on make little useful. c++ seems work flawless java couldn't work. searching online didn't return anything.
here code:
import java.io.*; class asdf{ public static void main(string args[]) throws java.io.ioexception { system.out.println("nothing"); } }
here error:
root@*****:/home/***/documents# javac asdf.java asdf.java:4: error: cannot find symbol throws java.io.ioexception { symbol: class io location: class java ./java.java:5: error: cannot find symbol throws java.io.ioexception { symbol: class io location: class java 2 errors
now, know guys don't clueless newcomers got error while trying learn java book, namely "java : beginner's guide".
i have no idea since i'm beginner still have feeling has path , building. since ides handled me never bothered such stuff. or may have damaged packages somehow considering "import java.io.*;" returns no error.
javac -version javac 1.8.0_131
the way installed oracle java here.
any appreciated, in advance.
i'm silly, folder tried compile command "import java.io.*", included file named java.java compiler tried import file. tried help. uninstalled android studio , oracle java no reason (facepalm here).
Comments
Post a Comment