This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Java in General and the fly likes How to refer the jar for -javaagent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to refer the jar for -javaagent" Watch "How to refer the jar for -javaagent" New topic

How to refer the jar for -javaagent

Bala Gangadhar
Ranch Hand

Joined: Oct 07, 2008
Posts: 98
To run my testcase i have to provide two jars as -javaagent as VM arguments.
I am running the test case in eclipse.
If i have copied the jars to current project directory and MyProject/lib/my.jar and refer them as -javaagent lib/my.jar its working fine.
But i have the jars in another project in same eclipse workspace. but when i try refer them as -javaagent otherproject/lib/my.jar its giving an error "The jar file is not found: javaagent: otherproject/lib/my.jar" even i tried to give the exact path like..
-javaagent c:/somepath/workspace/otherproject/lib/my.jar still its not working.. is there any workaround for this. Due to some constraint i can not copy my.jar into current project...

Hope I am clear in explaining the problem...

Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

I believe, you can set a project being dependent on another project in Eclipse. Please see the Project settings.

Not many get the right opportunity !
Have you checked out Aspose?
subject: How to refer the jar for -javaagent
It's not a secret anymore!