Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JMeter on Mac OS X (jmeter directory not found) #1849

Closed
asfimport opened this issue Jan 19, 2007 · 2 comments
Closed

JMeter on Mac OS X (jmeter directory not found) #1849

asfimport opened this issue Jan 19, 2007 · 2 comments

Comments

@asfimport
Copy link
Collaborator

Holger Isenberg (Bug 41414):
Jmeter on Mac OS X does not find its directory as Java on Mac adds an
additional entry to the classpath while Jmeter expects only 1 JAR as
classpath entry.

Error message:

test$ bin/jmeter
Jmeter-Dir: /Users/test/workspace
java.lang.Throwable: Could not access /Users/test/workspace/lib
at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:80)
java.lang.Throwable: Could not access /Users/test/workspace/lib/ext
at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:80)
java.lang.Throwable: Could not access /Users/test/workspace/lib/junit
at org.apache.jmeter.NewDriver.<clinit>(NewDriver.java:80)
java.lang.ClassNotFoundException: org.apache.jmeter.JMeter
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.apache.jmeter.NewDriver.main(NewDriver.java:175)

Severity: normal
OS: Mac OS X 10.4

Blocks:

@asfimport
Copy link
Collaborator Author

Holger Isenberg (migrated from Bugzilla):
Created attachment macosx-classpath.patch: fix to start on Mac OS X

macosx-classpath.patch
Index: src/core/org/apache/jmeter/NewDriver.java
===================================================================
--- src/core/org/apache/jmeter/NewDriver.java	(revision 497856)
+++ src/core/org/apache/jmeter/NewDriver.java	(working copy)
@@ -47,7 +47,7 @@
 
 		// Find JMeter home dir
 		StringTokenizer tok = new StringTokenizer(cp, File.pathSeparator);
-		if (tok.countTokens() == 1) {
+		if (tok.countTokens() == 1 || System.getProperty("os.name").toLowerCase().startsWith("mac os x") && tok.countTokens()  == 2) {
 			File jar = new File(tok.nextToken());
 			try {
 				jmDir = jar.getCanonicalFile().getParentFile().getParent();

@asfimport
Copy link
Collaborator Author

Sebb (migrated from Bugzilla):
Thanks, now fixed in SVN, so will appear in the next nightly build in:

http://people.apache.org/builds/jakarta-jmeter/nightly/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant