@set ver=90aen
@set archive=applet
@set tmp=dist

copy lib\knuddelsk%ver%.jar, %archive%.jar

md %tmp%
javac -classpath lib\javassist.jar -d %tmp% src\manipulate\*.java
cd %tmp%
java -classpath .;..\lib\javassist.jar;..\%archive%.jar Manipulator
del Manipulator.class
jar uf ..\%archive%.jar *.class
del /s /q *

javac -cp ..\%archive%.jar -d . ..\src\*.java
jar uf ..\%archive%.jar *.class
cd ..
rd /s /q %tmp%

pause
