0

I try to import stdlib.jar in my project by terminal. The procedure is like this:

  1. Move stdlib.jar to the folder "bin";
  2. Add import bin.stdlib.* in the main class which residences in folder "src" and saved;
  3. In terminal try src> javac -cp '../bin/:stdlib.jar' MyClass.java but failed to compile with the reason "package bin.stdlib does not exist". There are indeed many answers related to this issue online but I still cannot figure it out. Any advice is welcomed.
skaffman
  • 398,947
  • 96
  • 818
  • 769
Peterxwl
  • 1,023
  • 3
  • 16
  • 24
  • You don't important the "jar" file, you import it's contents...but of course, `StdLib` stores everything in the default package, brillant – MadProgrammer Feb 06 '15 at 04:06
  • You may also want to check out [this question](http://stackoverflow.com/questions/283816/how-to-access-java-classes-in-the-default-package) for the problems you are likely to have... – MadProgrammer Feb 06 '15 at 04:11

0 Answers0