Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#9 Improved bootclasspath error reporting, portability (Linux)

open
nobody
None
5
2005-08-07
2005-08-07
Jan Ploski
No

As of today, if the profiled JVM is started without a (correct)
bootclasspath parameter, an uninformative NoClassDefFoundError
message concerning 'ru/nlink/eclipse/plugins/profiler/trace/Trace' is
printed and the JVM exits.

This patch addresses the problem by more verbose error reporting
which better explains its cause and points the user to a solution (see
also bug #1078331 for related discussion). I also moved the
initCallbacks invocation to the JVM_OnLoad function in order to fail
fast if the bootclasspath is wrong and added an invocation of
NewGlobalRef to initCallbacks to avoid premature garbage collection
(as explained in patch #978501).

The patch lets the current HEAD version of ProfilerDLL.cpp compile
under Linux by providing replacements for Windows-specific UINT64
and Sleep symbols.

Apart from the above fixes, I removed some commented out code. It is
generally considered a bad practice to leave such snippets lying
around (that's what version control is for).

Discussion

  • Jan Ploski
    Jan Ploski
    2005-08-07

    Updated version of ProfilerDLL.cpp

     
    Attachments