Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9209875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:57:00+00:00 2026-06-18T00:57:00+00:00

I have a real head-scratcher here. I tried everything, searched everywhere. It comes from

  • 0

I have a real head-scratcher here. I tried everything, searched everywhere. It comes from an application I inherited that test JARs.

(It consists of a GUI front and a command-line application that does the actual checking. The GUI runs the command-line app by launching a new JVM on itself [java -cp “itself.jar” com.different.mainClass]. It’s a bad design, I know, but may be relevant.)

Anyway, this program contains some reflection calls nested inside two for-loops. The problem is that when the application is JARed up, the first reflection call takes exactly one second every iteration. But when it runs from classes, it takes a few milliseconds.

Practically, this means this command:

java -jar myjar.jar

takes hours.

This command:

java -cp "...[bunch of jars];myjar.jar" com.myclasses.main

takes minutes.

The JAR being tested is always a jar. The difference is only in the test application.

Any ideas or avenues to pursue are greatly appreciated. Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T00:57:01+00:00Added an answer on June 18, 2026 at 12:57 am

    You could consider running your program under a profiler like the Eclipse TPTP or YourKit and more precisely identify where your time is being spent. That will very likely point you to an error in your code, or somewhat less likely to point to a bug in a library. Then, if you cannot figure it out still, post the relevant code here and we can help out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a real head-scratcher here: I have a page with several controls on it,
I'm onto a real head scratcher here ... and it appears to be one
I got a real head scratcher here and I am in need of some
This one is a real head scratcher... I have a number of command links
I have a real world program that is similar to this one, which I'll
Can any one tell me an opensource js library that can have a real-time
I have tried a session.php script which runs at the head of each page
I have a script foo.js that is included in <head> . Inside body I
I´m making a simple real time application. I have a page with a square
I have an integer variable that is declared at the head of my subroutine.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.