This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Garbage collector help

 
George Peter
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
help really appreciated
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
  • 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
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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
  • 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
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic