• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

JRE 1.3 hangs but 1.5 no

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an app that I am running in JRE 1.3 and 1.5. It started out as just a simple UI with cammandline arguements and had no problems. When I made a GUI Version of it it hangs in JRE 1.3, but not JRE 1.5.

When I look at the task manager in Windows it's getting 0 CPU usage.
Normally it gets 98 or 99 CPU usage. I can't figure out what the difference is.

any suggestions
 
Ranch Hand
Posts: 618
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might want to give a few details about what your app does...
 
John Martinson
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry to leave out the details.

What it does is it opens a text file and and two excel files. It then sorts out unneeded items from the text file based on the contents of the two excel files. It uses the POI API to read the Excel files, and write the output in an excel file. it deals with perhaps 100s of 1000s of String comaparisons as each run involves files with houndreds of row of data.

I originally designed to run from commandline arguments that user would give indicating where all the files are located. When I run it that way it runs fine. Then I set it up to recieve a "-g" parameter to use a GUI to get that same information.

I have a main class that recieves the parameters. When it recieves the file names as parameters they are passed to the object that does all of the work and everything works just fine.

When the main class recieves a "-g" parameter it runs the following code and this is the only thing that is different



I run the file using the following command line
java -cp .\lib\JMOD.jar;.\lib\POI.jar; jmod.JMOD -g

Thanks
 
Rancher
Posts: 5114
38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might try debugging it by putting in println()s to see where it is hanging.
Do you get any error messages on the Command Prompt console? Be sure to run it using java.exe not javaw.exe.
 
John Martinson
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did put in dubugging statements. I usually don't ask someone for help until I've done all that I know to do. (Which I know other people who don't).

I did not however put a debug statement at the last line of the thread. And when I did that it worked. Turns out it was doing everything but automatically Exiting the System. So I just put System.exit(0); Where it should have naturely died on it's own.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic