• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Garbage collector help

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
inorder to use the Garbage collector tool from IBM i did the following

# Extract the content of GCCollector.zip in a directory of your chioce.
# Download jfreeChart-1.0.0-rc1.jar and jcommon-1.0.0-rc1.jar and place them in the lib directory that was created when you unzipped GCCollector.zip


when i tried to run GC by

1) double clicking the GCCollector.jar
2) or running the following commad from the java bin directory

javaw -Xmx300m -classpath lib/jfreechart-1.0.0-rc1.jar;lib/jcommon-1.0.0-rc1.jar -jar lib/GCCollector.jar


I get the following error


"Couldnot find the main class .Program will exit"



thanks

Peter
 
George Peter
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
help really appreciated
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is this GCCollector.jar supposed to be an executable jar? Did you have some instructions that told you to type that command?
 
George Peter
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes it is an executable jar file

i tried to run this using the following


javaw -Xmx300m -classpath lib/jfreechart-1.0.0-rc1.jar;lib/jcommon-1.0.0-rc1.jar -jar lib/GCCollector.jar



i got the above error
then i tried running GCCollector.bat got the same error

thanks
Peter
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm very surprised the instructions told you to type that. Because when you use the -jar option, everything in the -classpath option is completely ignored. Usually IBM documentation doesn't make elementary blunders like that.
 
George Peter
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Paul,
I dont understand clearly what you mean.
Anyway here is the instruction mentioned in document comes with ibm GC

"n order to be able to run Diagnostic Tool for Java� Garbage Collector, you must perform the folowing steps:

* Ensure that you have a Java Runtime Environment (1.3 or above) that lets you to execute java programs
* Extract the content of GCCollector.zip in a directory of your chioce.
* Download jfreeChart-1.0.0-rc1.jar and jcommon-1.0.0-rc1.jar and place them in the lib directory that was created when you unzipped GCCollector.zip

Now, you are ready to run Diagnostic Tool for Java� Garbage Collector. The sample batch file GCCollector.bat is located in the directory where you unzipped GCCollector.zip; you can run it, or you can adapt it for your environment. The batch file has only a line with the following command:

javaw -Xmx300m -classpath lib/jfreechart-1.0.0-rc1.jar;lib/jcommon-1.0.0-rc1.jar -jar lib/GCCollector.jar

As you can see, you execute the jar file GCCollector.jar including in the classpath the jar files jfreechart-1.0.0-rc1.jar and jcommon-1.0.0-rc1.jar. "
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's what I meant when I said the -classpath option was completely ignored: that command you posted there is exactly the same as this command:

javaw -Xmx300m -jar lib/GCCollector.jar

And if the people who produced the product didn't know that, then shame on them for releasing that to the general public. You need to contact them and ask them what you should be doing instead.
 
You can't have everything. Where would you put it?
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic