A new run counter (complete with a timer)

Status
Not open for further replies.

Skinny

Banned
A new run counter (complete with a timer)

Hey SPFers,
as a project for my Java class, I made a Diablo II run counter. You can get it here. It counts runs, computes the average time and keeps the total time, which should be handy in things like the MF Pentathalon. I'm open for suggestions about changes/adding stuff and fixing bugs (I tested it, but as always in programming some errors are bound to come up :)). Try it out and if you have any feedback (both positive and negative :)), post it here. Cheers,

Skinny
 

moo-cow

Diabloii.Net Member
Re: A new run counter (complete with a timer)

does this one not have the "feature" that the first run isn't counted?
 

Skinhead On The MBTA

Diabloii.Net Member
Re: A new run counter (complete with a timer)

It doesn't work for me :sad: It tells me that:
My mac's error message said:
Jar Launcher

The jar file "RunCounter.jar" couldn't be launched.
Check the Console for possible error messages
And this is what the Console says:
Code:
2008-05-22 16:33:43.882 Opera[391] CFLog (21): dyld returns 2 when trying to load /Library/Internet Plug-Ins/Java Applet.plugin/Contents/MacOS/Java Applet
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
 

muzzz

Diabloii.Net Member
Re: A new run counter (complete with a timer)

Works for me. I've never encountered that particular error myself. But if I had to guess, I'd say your java version is older than the one Skinny compiled against. Try upgrading to the latest version of java.
 

Uzziah

Diabloii.Net Member
Re: A new run counter (complete with a timer)

Originally Posted by My mac's error message
This is likely an issue, D2Lod is programmed slightly differently for mac than PC, if you are using a mac version of D2 then the program might have issues obtaining the data.

But most likely your java versions are different.
 

zerth

Diabloii.Net Member
Re: A new run counter (complete with a timer)

Yeap, Bad version number in .class file occurs when your jre version is older than the jdk version used by the developer. I typically have this problem with a colleague using 1.6 jdk, while I (for some odd reason) stick to 1.5
 

Skinny

Banned
Re: A new run counter (complete with a timer)

does this one not have the "feature" that the first run isn't counted?
Nope, it counts every run.

It doesn't work for me :sad: It tells me that:


And this is what the Console says:
Code:
2008-05-22 16:33:43.882 Opera[391] CFLog (21): dyld returns 2 when trying to load /Library/Internet Plug-Ins/Java Applet.plugin/Contents/MacOS/Java Applet
Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Yeah, like the others said it's probably due to java version inconsistency.

This is likely an issue, D2Lod is programmed slightly differently for mac than PC, if you are using a mac version of D2 then the program might have issues obtaining the data.

But most likely your java versions are different.
The thing is that the counter doesn't use d2 in any way. It only operates on the file system, and such java programs should be cross-platform. It could be used, with minor changes, for any game.



 

Skinny

Banned
Re: A new run counter (complete with a timer)

I've already noticed an error- the current run time & total run time had a tendency to drift apart after a little while. That's already fixed, the version in the link is updated.
 

Helx

Diabloii.Net Member
Re: A new run counter (complete with a timer)

Same as Skinhead on The MTBA here with my Mac. Silo's works for me, but must've been done with an older version.
 

dizelsky

Diabloii.Net Member
Re: A new run counter (complete with a timer)

Could anybody share the link to this counter? it seems to be out of date. or any other run counter working at vista, except silospen's, because at long runs it shows too many of them. I need to count baal runs. thx in advance

There's another two linked to in the ATMA help thread. Thyiad
 
Last edited by a moderator:
Status
Not open for further replies.
Top