Running JAVA programs

Hello I've made myself a little mp3 player using java but the problem is what do i put into the run.bat file so that all a person needs to do to run my program is exec the run.bat, ie setting classpaths thanks! or is there a better way?
[244 byte] By [yebtehaj] at [2007-9-30 18:57:02]
# 1
java -classpath myclasspath MP3Player
Bread_Stick at 2007-7-6 21:15:54 > top of Java-index,Administration Tools,Sun Connection...
# 2
(Where MP3Player is the name of the class you want to run)
Bread_Stick at 2007-7-6 21:15:54 > top of Java-index,Administration Tools,Sun Connection...
# 3

Wouldnt a JAR file be better?

1. Make a manifest.txt file containing the following line.

Main-Class: YourClassNameHere

2. Try running the jar command with the following code, inserting your files.

jar cvmf manifest.txt TheNameForJar.jar YourClassFile.class PICSorStuff.*

Try that. You should just have to double click on the JAR file to run it.

CaffeinatedCoder at 2007-7-6 21:15:54 > top of Java-index,Administration Tools,Sun Connection...
# 4
>Try that. You should just have to double click on the JAR file to run it. Doesn't that rely on users hava java associated with all .jar files?
bjon045 at 2007-7-6 21:15:54 > top of Java-index,Administration Tools,Sun Connection...
# 5
When you install the JRE it should do that in windows. Not sure about Linux. I've never had to manually associate it.
CaffeinatedCoder at 2007-7-6 21:15:54 > top of Java-index,Administration Tools,Sun Connection...