Question about class addition.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about class addition.

Zachary1234-2
-If, for example, I have a compiled main method java program, and I set it to running, and during that execution, I paste a .class file next to my main class, and then beyond that point my main method issues class.forname calls to that class and its methods, will those calls proceed?




Reply | Threaded
Open this post in threaded view
|

Re: Question about class addition.

Greenberg, Gary (ARC-TI)[UNIVERSITIES SPACE RESEARCH ASSN]
If your class is in the classpath, then it surely will find it.
Are you running it via Netbeans?
If your class (other than main) is in the same Netbeans project, IDE will put it in the classpath.
Otherwise, specify class location with -cp flag for java command.

-----Original Message-----
From: Zachary1234 [mailto:[hidden email]]
Sent: Sunday, September 24, 2017 6:39 PM
To: [hidden email]
Subject: [nbusers] Question about class addition.

-If, for example, I have a compiled main method java program, and I set it to running, and during that execution, I paste a .class file next to my main class, and then beyond that point my main method issues class.forname calls to that class and its methods, will those calls proceed?