quality@glassfish.java.net

Re: File locking tool project (was Re: Project query)

From: KANIKA GUPTA <kaniks4u_at_yahoo.com>
Date: Wed, 28 May 2008 20:33:17 -0700 (PDT)

Hi

we tried the command-line but get the following errors:

Try 1:
C:\Program Files>java -classpath c:\program files\;%JAVA_HOME%/lib/tools.jar util.ZipFileMonitor -host localhost -port 9009 -filter Enterprise

Exception in thread "main" java.lang.NoClassDefFoundError: files\;C:\Program
Caused by: java.lang.ClassNotFoundException: files\;C:\Program
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Try 2:
C:\Program Files>java -classpath .;%JAVA_HOME%/lib/tools.jar util.ZipFileMonitor -host localhost -port 9009 -filter Enterprise

Exception in thread "main" java.lang.NoClassDefFoundError: Files\Java\jdk1/6/0_0
6\bin/lib/tools/jar
Caused by: java.lang.ClassNotFoundException: Files\Java\jdk1.6.0_06\bin.lib.tool
s.jar
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)

Try 3:
C:\Program Files>java -classpath .\ZipFileMonitor.jar;%JAVA_HOME%/lib/tools.jar
util.ZipFileMonitor -host localhost -port 9009 -filter Enterprise
Exception in thread "main" java.lang.NoClassDefFoundError: Files\Java\jdk1/6/0_0
6\bin/lib/tools/jar
Caused by: java.lang.ClassNotFoundException: Files\Java\jdk1.6.0_06\bin.lib.tool
s.jar
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)

The File Locking Diagnostic Tool is saved in c:\program files and i have installed jdk1.6...
and the JAVA_HOME is set as C:\Program Files\Java\jdk1.6.0_06\bin

Please help, where we might be going wrong...

Tim Quinn <Timothy.Quinn_at_Sun.COM> wrote:
 
 KANIKA GUPTA wrote:
 
 Hi
   
 We are working on the project: "File Locking Diagnostic Tool"
   
 I was following the blog:
   http://blogs.sun.com/quinn/entry/tool_for_diagnosing_failed_glassfish
   
 To run the tool we need to follow the following commands:
   java -classpath <path-to-the-utility-jar>;%JAVA_HOME%/lib/tools.jar util.ZipFileMonitor -host yourhost -port 9009 -filter xyz
   
 We can't exactly figure out what it means to actually run the same...
 Have been able to set up the debugging options in the glassfish admin, but can't figure out the above to continue... I mean is it one single command or a group...
   
 Please help...
   
   
 Kanika Hi, Kanika.
 
 Did you try that as a single command and have problems?
 
 That's a standard (single) java command line. Make sure you have defined the environment variable JAVA_HOME to point to the directory that contains the Java JDK you want to use. Any version from 1.5 onward should be fine.
 
 The class path is <path-to-the-utility-jar>;%JAVA_HOME%/lib/tools.jar
 
 The main class to execute is util.ZipFileMonitor
 
 The rest of the command line contains arguments to the file monitor utility: what host you have GlassFish running on, what port you configured for the debugger in GlassFish, and the file filter you want the file monitor utility to use. These arguments are explained in the blog.
 
 Let us know if you have further questions.
 
 - Tim
 
 


Kanika