Java classpath problem when class is in jar file

View: New views
1 Messages — Rating Filter:   Alert me  

Java classpath problem when class is in jar file

by gnixinfosoft :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Getting error when setting classpath if java file is in jar.

Unable to compile, it says could not find class definition

I tried executing java -classpath <<cpath>> <<file_name_containing_main_method>>

Unable to find helper classes that are used inside <<file_name_containing_main_method>>

If i set the project in eclipse it works fine, but if i am running at command prompt, it returns error

I need to execute this using command prompt, as i have some use case where this has to be invoked using command line