using jar file on classpath

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?

[code]E:jarLearning>javac -classpath E:jarLearningprintHelper.jar myappMyApp.java
myappMyApp.java:7: error: cannot find symbol
Hello h = new Hello();
^
symbol: class Hello
location: class MyApp
myappMyApp.java:7: error: cannot find symbol
Hello h = new Hello();
^
symbol: class Hello
location: class MyApp
myappMyApp.java:10: error: cannot find symbol
Goodbye gb = new Goodbye();
^
symbol: class Goodbye
location: class MyApp
myappMyApp.java:10: error: cannot find symbol
Goodbye gb = new Goodbye();
^
symbol: class Goodbye
location: class MyApp
4 errors[/code]

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

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories