masijade
one,351
Industrious Poster
Squad Colleague
Featured Poster
masijade
ane,351
Industrious Poster
Team Colleague
Featured Poster
masijade
one,351
Industrious Affiche
Squad Colleague
Featured Poster
masijade
i,351
Industrious Poster
Team Colleague
Featured Poster
masijade
1,351
Industrious Poster
Squad Colleague
Featured Affiche
masijade
ane,351
Industrious Poster
Team Colleague
Featured Poster
No. I meant to give
your
classes a package.
Any
package. The first lawmaking line in your lawmaking should exist “package whatsoever.parcel.name.you lot.want;” If you exercise non have that the classes are in the “default” (i.due east. no packet) bundle and there are problems including classes from that packet (which the smaller class is attempting to do and is probably the reason for the “cannot exist resolved”. Now I really take a beef with schools (if that is where you are “learning”). They always have students first out in the “default” bundle and then, every bit soons as they try annihilation else, this sort of affair starts to happen and they accept no inkling what is happening (non to mention the fact that they have them using IDEs and so the students no nothing nearly the classpath, the second part of this problem), they should learn packages (at least this role of it) every bit one of the first things. Equally far as the classpath goes, besides, no. I assume y’all have both of these classes in the same place? In that case
coffee -cp . callSMSClient
As I said, use “-cp . “.
masijade
one,351
Industrious Affiche
Team Colleague
Featured Poster
Did you lot move the source files into a subdirectory of the current directory chosen sms? if not (and yous do not necessarily, take to) then you practice not need to use sms/SMSClient.java, just rather still, simply, SMSClient.java past compilation a sms subdirectory volition exist created (if it doesn’t eixst, and the classfiles will be found at that place, and the execute command volition then be
java -cp . sms.SMSClient
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
Source: https://www.daniweb.com/programming/software-development/threads/344183/class-name-cannot-be-resolved-to-a-type