raiden357 / xjperf

Automatically exported from code.google.com/p/xjperf
0 stars 0 forks source link

jperf will not run on windows machines without jperf.bat edit #14

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Download jperf
2. Read README: "run the following script : jperf.bat"

What is the expected output? What do you see instead?
Jperf should execute, however does not.

What version of the product are you using? On what operating system?
Jperf 2.0.2

Please provide any additional information below.
Jperf will run without issue if the jperf.bat file is edited (without
quotes) to look like this:
"start javaw -classpath
jperf.jar;forms-1.1.0.jar;jcommon-1.0.10.jar;jfreechart-1.0.6.jar;swingx-0.9.6.j
ar
net.nlanr.jperf.JPerf
exit"

Original issue reported on code.google.com by novajee...@gmail.com on 15 Jul 2009 at 2:44

GoogleCodeExporter commented 8 years ago
I don't know that this is so much of a defect than it is a configuration issue 
that
should be known for Win users.

Original comment by novajee...@gmail.com on 15 Jul 2009 at 2:45

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Downloaded JPref 2.0.2 for windows and jpref.bat is set as per the 
recommendation w/o
double quotes and in singe line except for 'exit'. Every time it says could not 
find
the main class and the program exits.

uploaded is my jpref.bat

Thanks,
-Venkat

Original comment by csvenk...@gmail.com on 24 Aug 2009 at 5:29

Attachments:

GoogleCodeExporter commented 8 years ago
csvenkata,

From looking at your batch file, there appears to be a couple of issues.

First you reference "jpref" in your batch file instead of "jperf".  You may 
want to 
change that and attempt again.  Also,  you still need to ensure that java is 
correctly set up within System Variables.

I have attached my jperf.bat for your reference as well.  Note that as I dont 
devlare with

Original comment by novajee...@gmail.com on 24 Aug 2009 at 3:15

Attachments:

GoogleCodeExporter commented 8 years ago
Sorry about that...

As I was saying, I don't declare within the batch file directly to C:\ as I 
have 
these set up as system variables.  Also, to note in this configuration, I have 
jperf 
located in c:\jPerf\.

Let me know if you need more assistance with this.

novajeeper@gmail.com

Original comment by novajee...@gmail.com on 24 Aug 2009 at 3:19

GoogleCodeExporter commented 8 years ago
I still receive error "Could not find main class".  I tried all variations as 
stated 
above.  I even use the C:\jperf directory.  

Original comment by Sensei...@gmail.com on 12 Dec 2009 at 2:19

GoogleCodeExporter commented 8 years ago
I also have tried all the recommendations here, but still receiving the same 
error .."Could not find the main class. Program will exit!"

Any ideas?

Original comment by dj.randy...@gmail.com on 11 Jan 2010 at 2:20

GoogleCodeExporter commented 8 years ago
Same here.  Nothing seems to help it.

Original comment by Sensei...@gmail.com on 11 Jan 2010 at 2:52

GoogleCodeExporter commented 8 years ago
Was trying it on my work desktop and wasn't working, so I tried it on a couple
laptops we have lying around and they worked fine.
Thought it might have been my desktops java so I've updated that still to no 
avail.

Original comment by dj.randy...@gmail.com on 11 Jan 2010 at 5:59

GoogleCodeExporter commented 8 years ago
The batch file needs javaw.exe to be in the current Windows path.  Mine wasn't 
(on Win 
7).  So I found the latest javaw.exe on my system and modified the batch file 
as 
attached.  It worked!

Original comment by phot...@gmail.com on 25 Feb 2010 at 12:07

Attachments:

GoogleCodeExporter commented 8 years ago
You may have done what I did - used a windows utility like winzip to unzip the 
archive and did NOT select the "Use folder names" option.

Original comment by irish.in...@gmail.com on 29 Jul 2010 at 5:49

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
To add some adaptability I re-wrote the script like this:

----- jperf.bat -----
@ECHO OFF
SETLOCAL ENABLEDELAYEDEXPANSION
SET Count=0
SET java_classpath=
ECHO java_classpath='%java_classpath%'
FOR /r . %%a IN (*.jar) DO (
  IF !Count! EQU 0 (
    SET java_classpath=%%a
  ) ELSE (
    SET java_classpath=!java_classpath!;%%a
  )
  SET /a Count+=1
)

@ECHO ON
START javaw -classpath "%java_classpath%" net.nlanr.jperf.JPerf

@ECHO OFF
SET Count=
SET java_classpath=
----- end jperf.bat -----

This assumes that javaw is in the Windows %PATH% environment variable.

Original comment by aen...@gmail.com on 2 Dec 2010 at 10:37

Attachments:

GoogleCodeExporter commented 8 years ago
I am running windows 7, I followed comment 10 and got it working, thank you for 
the tip.

Original comment by mal...@gmail.com on 14 Mar 2011 at 8:12

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Using comment #10 fixed my issue just as it did for #15 :) Windows 7 user as 
well

Original comment by chemach...@gmail.com on 24 May 2011 at 10:27

GoogleCodeExporter commented 8 years ago
Comment 14 help me on winXP.
Thanks!!

Original comment by ore....@gmail.com on 22 Jul 2011 at 7:02

GoogleCodeExporter commented 8 years ago
tried on my win 7 system .. worked fine after using Comment 10 bat file..... 

Original comment by contacts...@gmail.com on 12 Mar 2012 at 4:48

GoogleCodeExporter commented 8 years ago
worked with win 7 as well - after much looking on the internet comment 10 bat 
file fixed java issue....

thanks..

Original comment by spada...@gmail.com on 2 Apr 2012 at 7:35

GoogleCodeExporter commented 8 years ago
Comment #10's bat file, just find your javaw on your system and edit his bat 
file. Replace the current path with yours. (Mine was C:\Program Files 
(x86)\Java\jre7\bin)

Original comment by joshfli...@gmail.com on 24 Sep 2012 at 6:31

GoogleCodeExporter commented 8 years ago
Or just copy javaw.exe to the directory you run jperf from

Original comment by runar.bj...@gmail.com on 1 Nov 2012 at 9:57

GoogleCodeExporter commented 8 years ago
Comment #10 worked for me.  Thanks

Original comment by moore...@gmail.com on 15 Apr 2013 at 5:54

GoogleCodeExporter commented 8 years ago
comment #22 worked too

Original comment by diego.go...@gmail.com on 21 May 2013 at 5:51

GoogleCodeExporter commented 8 years ago
I copied the installation files to the JAVA directory and ran the batch file 
from there!

My Win7 JAVA directory -->  C:\Program Files (x86)\Java\jre1.6.0_05\bin

Original comment by jeremy.h...@gmail.com on 28 May 2013 at 2:50

GoogleCodeExporter commented 8 years ago
i copied javaw.exe to the directory and that got it working. tried everything 
else and it just wouldn't work.

Original comment by csyl...@gmail.com on 30 Sep 2013 at 4:06

GoogleCodeExporter commented 8 years ago
Yep, #10... thank you

Original comment by mikeecke...@gmail.com on 7 Nov 2013 at 2:07

GoogleCodeExporter commented 8 years ago
On Windows 8 solution 10 worked. Just change the path "Path=C:\Program Files 
(x86)\Java\jre7\bin;%Path%" to jre7 to accommodate the latest version of Java.

Original comment by jeff6str...@gmail.com on 15 May 2014 at 7:24

GoogleCodeExporter commented 8 years ago
Updated JPERF.bat for Windows 8 and JRE7

@echo off
PathTemp=%Path%
Path=C:\Program Files (x86)\Java\jre7\bin;%Path%
SETLOCAL ENABLEDELAYEDEXPANSION
SET Count=0
SET java_classpath=
ECHO java_classpath='%java_classpath%'
FOR /r . %%a IN (*.jar) DO (
  IF !Count! EQU 0 (
    SET java_classpath=%%a
  ) ELSE (
    SET java_classpath=!java_classpath!;%%a
  )
  SET /a Count+=1
)

START javaw -classpath "%java_classpath%" net.nlanr.jperf.JPerf

Original comment by sc...@georgetown.edu on 25 May 2014 at 3:42

GoogleCodeExporter commented 8 years ago
Copy javaw.exe to c:\windows\system32

Original comment by mvanelze...@gmail.com on 1 Nov 2014 at 12:41