This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java in General and the fly likes VM can't recognize classpath when used with -Xrun Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "VM can Watch "VM can New topic
Author

VM can't recognize classpath when used with -Xrun

Won Lee
Greenhorn

Joined: Oct 12, 2005
Posts: 2
I have following errors keep preventing the agent file from running.
The path is right and prog.dll is right under the specified path.
Why is VM not recognizing the path??

C:\>java -Xrunprog -classpath C:\prog\bin\windows
Error occurred during initialization of VM
Could not find -Xrun library: prog.dll
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Hi,

Welcome to JavaRanch!

Don't know what "-Xrunprog" does; do you mean "-Xrunprof"?

But in any case, the -classpath never refers to DLL files; it can refer to jar files, or to directories. You need to have a closer look at whatever documentation you got this "-Xrunprog" from, and see if you've read it correctly.


[Jess in Action][AskingGoodQuestions]
Won Lee
Greenhorn

Joined: Oct 12, 2005
Posts: 2
isn't it that the classpath is only referring to the directory? I just want it go into the directory specified by the classpath and then VM finds out the prog.dll file which is in that dir.

If it is so, how do you think I can run prog.dll with -Xrunprog and absolute classpath?
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: VM can't recognize classpath when used with -Xrun