Open GoogleCodeExporter opened 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
[deleted comment]
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:
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:
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
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
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
Same here. Nothing seems to help it.
Original comment by Sensei...@gmail.com
on 11 Jan 2010 at 2:52
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
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:
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
[deleted comment]
[deleted comment]
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:
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
[deleted comment]
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
Comment 14 help me on winXP.
Thanks!!
Original comment by ore....@gmail.com
on 22 Jul 2011 at 7:02
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
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
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
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
Comment #10 worked for me. Thanks
Original comment by moore...@gmail.com
on 15 Apr 2013 at 5:54
comment #22 worked too
Original comment by diego.go...@gmail.com
on 21 May 2013 at 5:51
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
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
Yep, #10... thank you
Original comment by mikeecke...@gmail.com
on 7 Nov 2013 at 2:07
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
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
Copy javaw.exe to c:\windows\system32
Original comment by mvanelze...@gmail.com
on 1 Nov 2014 at 12:41
Original issue reported on code.google.com by
novajee...@gmail.com
on 15 Jul 2009 at 2:44