Click here to Skip to main content
15,887,214 members
Home / Discussions / Java
   

Java

 
AnswerRe: How to package Jar by copying ONLY USED classes from onother jar ?! Pin
jschell23-Oct-22 11:30
jschell23-Oct-22 11:30 
There is execution flow. And code references.

Neither guarantees finding all code usage.

Code is loaded dynamically in java. A class is not loaded until it is referenced. The byte codes contain that information though so it can be dynamically determined. But that doesn't mean it actually runs.

Then a developer can write code that dynamically loads classes. Or they can use libraries that do that.

So normally execution flow needs to be done to determine what runs.

But, for example, what happen if there is a report that only runs on the first of the month and you use execution profiling on the 15th to find all the classes that are used. You will not find the classes used in that report.

So it is manual process...

You use profiling and attempt to execute your application. The profiled classes are the ones that are executed. Anything else isn't. Then build your jar(s) using only those and then completely test the application. If your tests are complete then it should work.
QuestionJava program project using netbeans Pin
Member 1576471312-Sep-22 0:20
Member 1576471312-Sep-22 0:20 
AnswerRe: Java program project using netbeans Pin
Dave Kreskowiak12-Sep-22 1:21
mveDave Kreskowiak12-Sep-22 1:21 
GeneralRe: Java program project using netbeans Pin
Gerry Schmitz12-Sep-22 6:27
mveGerry Schmitz12-Sep-22 6:27 
QuestionSocket connection offline vs busy Pin
JohnCodding9-Aug-22 20:26
JohnCodding9-Aug-22 20:26 
AnswerRe: Socket connection offline vs busy Pin
Richard MacCutchan9-Aug-22 21:03
mveRichard MacCutchan9-Aug-22 21:03 
GeneralRe: Socket connection offline vs busy Pin
JohnCodding9-Aug-22 21:10
JohnCodding9-Aug-22 21:10 
GeneralRe: Socket connection offline vs busy Pin
Richard MacCutchan9-Aug-22 21:12
mveRichard MacCutchan9-Aug-22 21:12 
GeneralRe: Socket connection offline vs busy Pin
Richard MacCutchan9-Aug-22 21:17
mveRichard MacCutchan9-Aug-22 21:17 
GeneralRe: Socket connection offline vs busy Pin
JohnCodding9-Aug-22 21:36
JohnCodding9-Aug-22 21:36 
GeneralRe: Socket connection offline vs busy Pin
Richard MacCutchan9-Aug-22 21:45
mveRichard MacCutchan9-Aug-22 21:45 
AnswerRe: Socket connection offline vs busy Pin
Gerry Schmitz10-Aug-22 4:13
mveGerry Schmitz10-Aug-22 4:13 
AnswerRe: Socket connection offline vs busy Pin
englebart12-Oct-22 15:20
professionalenglebart12-Oct-22 15:20 
QuestionUser Path not working until computer restart Pin
Valentinor13-Jul-22 9:27
Valentinor13-Jul-22 9:27 
AnswerRe: User Path not working until computer restart Pin
Valentinor13-Jul-22 23:28
Valentinor13-Jul-22 23:28 
AnswerRe: User Path not working until computer restart Pin
englebart12-Oct-22 15:26
professionalenglebart12-Oct-22 15:26 
QuestionDistribute software that uses Java Pin
Valentinor7-Jul-22 9:28
Valentinor7-Jul-22 9:28 
AnswerRe: Distribute software that uses Java Pin
Gerry Schmitz7-Jul-22 19:46
mveGerry Schmitz7-Jul-22 19:46 
AnswerRe: Distribute software that uses Java Pin
Dave Kreskowiak8-Jul-22 11:30
mveDave Kreskowiak8-Jul-22 11:30 
GeneralRe: Distribute software that uses Java Pin
Valentinor8-Jul-22 19:32
Valentinor8-Jul-22 19:32 
GeneralRe: Distribute software that uses Java Pin
Dave Kreskowiak8-Jul-22 19:40
mveDave Kreskowiak8-Jul-22 19:40 
GeneralRe: Distribute software that uses Java Pin
Valentinor8-Jul-22 21:51
Valentinor8-Jul-22 21:51 
GeneralRe: Distribute software that uses Java Pin
Dave Kreskowiak9-Jul-22 5:43
mveDave Kreskowiak9-Jul-22 5:43 
Questionsolve the error Pin
Member 156672428-Jun-22 21:02
Member 156672428-Jun-22 21:02 
RantRe: solve the error Pin
Richard Deeming8-Jun-22 21:19
mveRichard Deeming8-Jun-22 21:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.