Quantcast
Channel: Programmers Heaven Forums RSS Feed
Viewing all articles
Browse latest Browse all 2703

using jar file on classpath

$
0
0
Guys

I am trying to compile a simple Java program, but I get the following compilation error. Could someone please advise, what I am missing?

E:\jarLearning>javac -classpath E:\jarLearning\printHelper.jar myapp\MyApp.java
myapp\MyApp.java:7: error: cannot find symbol
                Hello h = new Hello();
                ^
  symbol:   class Hello
  location: class MyApp
myapp\MyApp.java:7: error: cannot find symbol
                Hello h = new Hello();
                              ^
  symbol:   class Hello
  location: class MyApp
myapp\MyApp.java:10: error: cannot find symbol
                Goodbye gb = new Goodbye();
                ^
  symbol:   class Goodbye
  location: class MyApp
myapp\MyApp.java:10: error: cannot find symbol
                Goodbye gb = new Goodbye();
                                 ^
  symbol:   class Goodbye
  location: class MyApp
4 errors


The printHelper.jar file contains the Hello and Goodbye classes which are public.


Viewing all articles
Browse latest Browse all 2703

Trending Articles