Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[TuT] How to fix your Compilers

Newbie Spellweaver
Joined
May 19, 2008
Messages
20
Reaction score
0
Hey, some of you people are getting errors on your compilers, here you can learn how to fix them automatically.

Difficulty: 2/10
Credits: Me (I DID NOT LEECH, Getting annoyed from people flaming...)

//---MOD THARAKS COMPILER---\\

Mod tharaks compiler is the most recent used compiler, (I use my own).
When you open the 'Edit' file, you get a notepad (or your default Word program)

The code:
@echo off
if exist "C:\Program Files (x86)\" set programfiles=C:\Program Files (x86)
set pro=%programfiles%\Java\jdk1.5.0
set pro2=%programfiles%\Java\jdk1.6.0_05
set jac=\bin\javac.exe
set jav=\bin\java.exe
:co1
set b=0
set t=7
goto co2
:co2
color %b%%t%
:menu
cls
title The Perfect Compiler version 1.7
echo Please choose an option below to do that function.
echo Keep posted on the Moparscape Tutorials section for
echo any updates that I post.
echo.
echo c - Compile your server.
echo r - To Run your server.
echo e - To exit out of the program.
echo color - Change the Text and Backround colors of this compiler.
echo reset - Resets your Compiler Logs.
echo.
echo.
set /p c=Option:
if %c%==c goto c
if %c%==C goto c
if %c%==r goto r
if %c%==R goto r
if %c%==color goto color
if %c%==Color goto color
if %c%==COLOR goto color
if %c%==reset goto reset
if %c%==Reset goto reset
if %c%==RESET goto reset
if %c%==e goto e
if %c%==E goto e
if %c%==* goto er
goto er
:color
cls
echo Would you like to change the backround color, change
echo the text color, or reset it to default?
echo.
echo back - Change the backround color.
echo text - Change the text color.
echo def - Change all colors back to default.
echo.
echo.
set /p color=Option:
if %color%==back goto back
if %color%==BACK goto back
if %color%==text goto text
if %color%==TEXT goto text
if %color%==def goto co1
if %color%==DEF goto co1
if %color%==* goto er
goto er
:back
cls
echo Please select a color to change the backround to:
echo.
echo black
echo white
echo red
echo yellow
echo green
echo blue
echo purple
echo.
echo.
set /p back=Color:
if %back%== black (set b=0)
if %back%== white (set b=7)
if %back%== red (set b=4)
if %back%== yellow (set b=6)
if %back%== green (set b=2)
if %back%== blue (set b=1)
if %back%== purple (set b=5)
goto co2
:text
cls
echo Please select a color to change the text to:
echo.
echo black
echo white
echo red
echo yellow
echo green
echo blue
echo purple
echo.
echo.
set /p back=Color:
if %back%== black (set t=0)
if %back%== white (set t=7)
if %back%== red (set t=4)
if %back%== yellow (set t=6)
if %back%== green (set t=2)
if %back%== blue (set t=1)
if %back%== purple (set t=5)
goto co2
:c
cls
title Compiler
goto cjc
:c2
if exist src (goto cl) else (goto c3)
:c3
if exist *.java (goto cl2) else (goto ce)
:c4
%javac% -cp . *.java
echo Files Compiled Successfully!
pause
cls
goto menu
:c5
%javac% -cp . .\src\*.java
echo Files Compiled Successfully!
pause
move .\src\*.class .\classes\
cls
goto menu
:ce
cls
echo You need to have Java files for this Compiler to Compile.
pause
cls
goto menu
:r
cls
title Runserver
goto cj
:r2
set rjava=%java% -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.17-ga-bin.jar server
cls
goto r3
:r3
if exist .\classes\server.class (goto sl2) else (goto r4)
:r4
if exist .\server.class (goto sl) else (goto se)
:r5
%rjava%
pause
cls
goto menu
:r6
set rjava=
set rjava=%java% -cp .;./classes; Server
%rjava%
pause
cls
goto menu
:se
cls
title Error
echo You do not have a Server.class. Make sure that you have used the
echo compiler with your server BEFORE you try runing it.
pause
cls
goto menu
:er
cls
title Error
echo Invalid command. Please make sure the commands you type
echo in are correct.
pause
cls
goto menu
:e
cls
exit
:cjc
if exist "%pro%_06%jac%" (goto sjc) else (goto cjc2)
:cjc2
if exist "%pro%_07%jac%" (goto sjc2) else (goto cjc3)
:cjc3
if exist "%pro%_08%jac%" (goto sjc3) else (goto cjc4)
:cjc4
if exist "%pro%_09%jac%" (goto sjc4) else (goto cjc5)
:cjc5
if exist "%pro%_10%jac%" (goto sjc5) else (goto cjc6)
:cjc6
if exist "%pro2%%jac%" (goto sjc6) else (goto cjc7)
:cjc7
if exist "%pro%%jac%" (goto sjc7) else (goto cjc8)
:cjc8
if exist "%pro%_01%jac%" (goto sjc8) else (goto cjc9)
:cjc9
if exist "%pro%_02%jac%" (goto sjc9) else (goto cjc10)
:cjc10
if exist "%pro%_03%jac%" (goto sjc10) else (goto cjc11)
:cjc11
if exist "%pro%_04%jac%" (goto sjc11) else (goto cjc12)
:cjc12
if exist "%pro%_05%jac%" (goto sjc12) else (goto je)
:sjc
set javac="%pro%_06%jac%"
goto c2
:sjc2
set javac="%pro%_07%jac%"
goto c2
:sjc3
set javac="%pro%_08%jac%"
goto c2
:sjc4
set javac="%pro%_09%jac%"
goto c2
:sjc5
set javac="%pro%_10%jac%"
goto c2
:sjc6
set javac="%pro2%%jac%"
goto c2
:sjc7
set javac="%pro%%jac%"
goto c2
:sjc8
set javac="%pro%_01%jac%"
goto c2
:sjc9
set javac="%pro%_02%jac%"
goto c2
:sjc10
set javac="%pro%_03%jac%"
goto c2
:sjc11
set javac="%pro%_04%jac%"
goto c2
:sjc12
set javac="%pro%_05%jac%"
goto c2
:cj
if exist "%pro%_06%jav%" (goto sj) else (goto cj2)
:cj2
if exist "%pro%_07%jav%" (goto sj2) else (goto cj3)
:cj3
if exist "%pro%_08%jav%" (goto sj3) else (goto cj4)
:cj4
if exist "%pro%_09%jav%" (goto sj4) else (goto cj5)
:cj5
if exist "%pro%_10%jav%" (goto sj5) else (goto cj6)
:cj6
if exist "%pro2%%jav%" (goto sj6) else (goto cj7)
:cj7
if exist "%pro%%jav%" (goto sj7) else (goto cj8)
:cj8
if exist "%pro%_01%jav%" (goto sj8) else (goto cj9)
:cj9
if exist "%pro%_02%jav%" (goto sj9) else (goto cj10)
:cj10
if exist "%pro%_03%jav%" (goto sj10) else (goto cj11)
:cj11
if exist "%pro%_04%jav%" (goto sj11) else (goto cj12)
:cj12
if exist "%pro%_05%jav%" (goto sj12) else (goto je)
:sj
set java="%pro%_06%jav%"
goto r2
:sj2
set java="%pro%_07%jav%"
goto r2
:sj3
set java="%pro%_08%jav%"
goto r2
:sj4
set java="%pro%_09%jav%"
goto r2
:sj5
set java="%pro%_10%jav%"
goto r2
:sj6
set java="%pro2%%jav%"
goto r2
:sj7
set java="%pro%%jav%"
goto r2
:sj8
set java="%pro%_01%jav%"
goto r2
:sj9
set java="%pro%_02%jav%"
goto r2
:sj10
set java="%pro%_03%jav%"
goto r2
:sj11
set java="%pro%_04%jav%"
goto r2
:sj12
set java="%pro%_05%jav%"
goto r2
:je
cls
title Error
echo You do not have JDK 5.0 or JDK 6.0. Go to Mod Taharok's tutorial
echo on the Moparscape Tuturoials section for step-by-step instructions
echo link to download the newest JDK Update.
pause
cls
goto menu
:sl
cls
echo Ran Server at %time% and on %date%. >> "Compile Logs.txt"
echo Server was run using %java%. >> "Compile Logs.txt"
echo Thank-you for using Mod Taharok's 'Perfect' Compiler! :) >> "Compile Logs.txt"
echo. >> "Compile Logs.txt"
goto r5
:sl2
cls
echo Ran Server at %time% and on %date%. >> "Compile Logs.txt"
echo Server was run using %java%. >> "Compile Logs.txt"
echo Thank-you for using Mod Taharok's 'Perfect' Compiler! :) >> "Compile Logs.txt"
echo. >> "Compile Logs.txt"
goto r6
:cl
cls
echo Compiled Java files at %time% and on %date%. >> "Compile Logs.txt"
echo Java files were compiled using %javac%. >> "Compile Logs.txt"
echo Thank-you for using Mod Taharok's 'Perfect' Compiler! :) >> "Compile Logs.txt"
echo. >> "Compile Logs.txt"
goto c5
:cl2
cls
echo Compiled Java files at %time% and on %date%. >> "Compile Logs.txt"
echo Java files were compiled using %javac%. >> "Compile Logs.txt"
echo Thank-you for using Mod Taharok's 'Perfect' Compiler! :) >> "Compile Logs.txt"
echo. >> "Compile Logs.txt"
goto c4
:reset
cls
echo Resetting the Compiler's Logs...
pause
del "Compile Logs.txt"
echo ----------Compiler Logs---------- >> "Compile Logs.txt"
echo. >> "Compile Logs.txt"
goto menu

And then when you try to compile you get the message:
You do not have JDK 5.0 or JDK 6.0. Go to Mod Taharok's tutorial
on the Moparscape Tuturoials section for step-by-step instructions
link to download the newest JDK Update.
Press any key to continue . . .

NOT ANYMORE

1ST,
To stop this message appearing you may have the starting code on your compiler:
@echo off
if exist "C:\Program Files (x86)\" set programfiles=C:\Program Files (x86)
set pro=%programfiles%\Java\jdk1.5.0
set pro2=%programfiles%\Java\jdk1.6.0
set jac=\bin\javac.exe
set jav=\bin\java.exe
:co1
set b=0
set t=7
goto co2
:co2
color %b%%t%

If not scroll down some more in a minute

Now, there is several JDK version and mine is _05
So if I wanted to fix my compiler it would be changed to this:

@echo off
if exist "C:\Program Files (x86)\" set programfiles=C:\Program Files (x86)
set pro=%programfiles%\Java\jdk1.5.0_05
set pro2=%programfiles%\Java\jdk1.6.0_05
set jac=\bin\javac.exe
set jav=\bin\java.exe
:co1
set b=0
set t=7
goto co2
:co2
color %b%%t%

Where the bold parts are, are the parts I changed _05 is what I added. Then compile again, and your compiler is fixed (don't do _05 if you version is different)
• _04
• _03
• _06
• _05
Are the only version's I know of!

//-------- Now to the different compilers --------\\

If your compiler is way different to the one above it may look like this:

@echo off
if exist "%programfiles%\Java" (call :compile "%programfiles%\Java\") else (goto error)
:compile
for /D %%x in ("%~1jdk*") do (set p="%%~x\bin\javac.exe")
if defined p (%p% -cp . *.java)
if defined p (goto end)
:error
echo You do not have Java installed. Please download it at the site that is about to load.
"%programfiles%\Internet Explorer\iexplore.exe"
:end
echo Finished!
pause
exit

This compiler should just compile straight away.


//------------A different compiler (sort of the same as top one)---------\\

This is a compiler I don't use and never have but I have fixed before (I don't have any quotes to put on this part. Well, I tell a lie. I have a phew Quotes to put on =P

Open up your compiler in your default Word document:
Hit Ctrl + F
and search for:
jdk1.6.0
OR
jdk1.5.0

Then this is the easy part:
Just add your version at the end of the .0's, mine will look like this:
jdk1.5.0_05
jdk1.6.0_05

Finished.



Hope this TuTorial helped you people =)
First person to reply gets a medal LOL.
Joking.

Credits:
Me 95% (for writing this tutorial in 23 minutes! :eek:)
RaGEZONE 5% (for letting me post XD)

Enjoy,
- DJ WhizzKid.


Edit ;
Didn't think it was this long :eek:
 
Last edited:
Newbie Spellweaver
Joined
Mar 30, 2007
Messages
32
Reaction score
1
Not bad, i got that error aswell when i tryed running the server via Compiler...
 
Initiate Mage
Joined
Dec 23, 2008
Messages
1
Reaction score
0
hi .. im having trouble with my compiler i've done everything you've done but im stuck. uno where u type ur JDK version? well my version is 6 with 11 updates i write in 1.6.0_06 for the second one but what do i type for the first one 1.5.0_05? please get back to me ASAP if u can please. and i've went over it hundreds of times and i can't seem to find the problem so.. please help me?:mad: because it's really startin to annoy me.
 
Initiate Mage
Joined
Jan 30, 2009
Messages
2
Reaction score
0
My error:
client.java:75: ';' expected
String Owner : "Gaga";
^
1 error
Files Compiled Successfully!
Press any key to continue . . .

Exact text. Gaga is the name I put as the owner. Any idea on how to fix?
NOTE: It does NOT compile.
 
Junior Spellweaver
Joined
Jan 6, 2009
Messages
136
Reaction score
0
u must have changed something else besides just the name while makin urself owner...
 
Last edited:
Junior Spellweaver
Joined
Jan 6, 2009
Messages
136
Reaction score
0
btw... thats tharoks perfect compiler 1.7..... 2.0 is out :p
heres mine:

Code:
@echo off

:def
color 04

:main
cls
title 0wnag3 c0mp1l3r, by 3at 0r d13
echo ------------------------------------------------------------------------------
echo - Welcome to the 0wnag3 COmp1l3R! by 3at 0r d13 - AKA - stability666
echo ------------------------------------------------------------------------------
echo - Need a batch file created? 
echo - http://stability666.u.yuku.com/ - My Official Webpage. :)
echo ------------------------------------------------------------------------------
echo - Choose one of the options below by entering the corrensponding letter and
echo - the corrensponding letter and pressing enter.
echo ------------------------------------------------------------------------------
echo - Main options:
echo - com = Compile your server.
echo - run = Run your server.
echo - aur = Runs your server with autorestart.
echo - bac = Backup your server files.
echo ------------------------------------------------------------------------------
echo - Other options;
echo - set = Change settings.
echo - loc = Location list (co-ordinates)
echo - upd = Updates
echo - cmd = Command generator
echo - cre = Credits
echo ------------------------------------------------------------------------------
echo -
echo -
set /p mainc=- Choice:

if %mainc%==com goto com
if %mainc%==run goto run
if %mainc%==aur goto aur
if %mainc%==bac goto bac

if %mainc%==set goto set
if %mainc%==loc goto loc
if %mainc%==upd goto upd
if %mainc%==cmd goto cmd
if %mainc%==cre goto cre

if %mainc%==COM goto com
if %mainc%==RUN goto run
if %mainc%==AUR goto aur
if %mainc%==BAC goto bac

if %mainc%==SET goto set
if %mainc%==LOC goto loc
if %mainc%==UPD goto upd
if %mainc%==CMD goto cmd
if %mainc%==CRE goto cre

goto main

:com
cls
title Compiling...
echo - Preparing for compile...
echo - Auto-setting envriomental variables...
echo -
goto com2

:com2
title Compiling...
echo - Checking For JDK 6U0 - 6U11
IF EXIST "%programfiles%\JAVA\JDK1.6.0_11\BIN" (GOTO COM11)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_10\BIN" (GOTO COM10)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_09\BIN" (GOTO COM09)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_08\BIN" (GOTO COM08)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_07\BIN" (GOTO COM07)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_06\BIN" (GOTO COM06)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_05\BIN" (GOTO COM05)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_04\BIN" (GOTO COM04)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_03\BIN" (GOTO COM03)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_02\BIN" (GOTO COM02)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_01\BIN" (GOTO COM01)
goto comerrorxxx

:COM11
echo - Found JDK 1.6.0_11
SET CLASSPATH=Files\Java\jdk1.6.0_011\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_11\bin
echo - Results:
javac *.java
echo - Done!
pause
goto main

:COM10
echo - Found JDK 1.6.0_10
SET CLASSPATH=Files\Java\jdk1.6.0_10\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_10\bin
echo - Results:
javac *.java
echo - Done!
pause
goto main

:COM09
echo - Found JDK 1.6.0_09
SET CLASSPATH=Files\Java\jdk1.6.0_09\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_09\bin
echo - Results:
javac *.java
echo - Done!
pause
goto main

:COM08
echo - Found JDK 1.6.0_08
SET CLASSPATH=Files\Java\jdk1.6.0_08\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_08\bin
echo - Results:
javac *.java
echo - Done!
pause
goto main

:COM07
echo - Found JDK 1.6.0_07
SET CLASSPATH=Files\Java\jdk1.6.0_07\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_07\bin
echo - Results:
javac *.java
echo - Done!
pause
goto main

:COM06
echo - Found JDK 1.6.0_06
SET CLASSPATH=Files\Java\jdk1.6.0_06\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_06\bin
echo - Results:
javac *.java
echo - Done!
pause
goto main

:COM05
echo - Found JDK 1.6.0_11
SET CLASSPATH=Files\Java\jdk1.6.0_011\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_11\bin
echo - Results:
javac *.java
echo - Done!
pause
goto main

:COM04
echo - Found JDK 1.6.0_11
SET CLASSPATH=Files\Java\jdk1.6.0_11\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_11\bin
echo - Results:
javac *.java
echo - Done!
pause
goto main

:COM03
echo - Found JDK 1.6.0_03
SET CLASSPATH=Files\Java\jdk1.6.0_03\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_03\bin
echo - Results:
javac *.java
echo - Done!
pause
goto main

:COM2
echo - Found JDK 1.6.0_02
SET CLASSPATH=Files\Java\jdk1.6.0_02\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_02\bin
echo - Results:
javac *.java
echo - Done!
pause
goto main

:COM01
echo - Found JDK 1.6.0_01
SET CLASSPATH=Files\Java\jdk1.6.0_01\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_01\bin
echo - Results:
javac *.java
echo - Done!
pause
goto main

:COMERRORXXX
echo - No version of JDK 1.6 was detected.
pause
goto main

:run
cls
title Running Server...
echo - Port:
echo - 43594
IF EXIST "%programfiles%\JAVA\JDK1.6.0_11\BIN" (GOTO RUN11)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_10\BIN" (GOTO RUN10)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_09\BIN" (GOTO RUN09)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_08\BIN" (GOTO RUN08)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_07\BIN" (GOTO RUN07)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_06\BIN" (GOTO RUN06)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_05\BIN" (GOTO RUN05)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_04\BIN" (GOTO RUN04)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_03\BIN" (GOTO RUN03)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_02\BIN" (GOTO RUN02)
IF EXIST "%programfiles%\JAVA\JDK1.6.0_01\BIN" (GOTO RUN01)

:RUN11
echo - Running using JDK 1.6.0_11...
SET CLASSPATH=Files\Java\jdk1.6.0_11\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_11\bin
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-6.0.10-ga-bin.jar server
echo - Failed!
pause
goto main
:RUN10
echo - Running using JDK 1.6.0_10...
SET CLASSPATH=Files\Java\jdk1.6.0_10\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_10\bin
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-6.0.10-ga-bin.jar server
echo - Failed!
pause
goto main
:RUN09
echo - Running using JDK 1.6.0_04...
SET CLASSPATH=Files\Java\jdk1.6.0_04\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_04\bin
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-6.0.09-ga-bin.jar server
echo - Failed!
pause
goto main
:RUN08
echo - Running using JDK 1.6.0_03...
SET CLASSPATH=Files\Java\jdk1.6.0_03\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_03\bin
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-6.0.08-ga-bin.jar server
echo - Failed!
pause
goto main
:RUN07
echo - Running using JDK 1.6.0_02...
SET CLASSPATH=Files\Java\jdk1.6.0_03\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_03\bin
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-6.0.07-ga-bin.jar server
echo - Failed!
pause
goto main
:RUN06
echo - Running using JDK 1.6.0_01...
SET CLASSPATH=Files\Java\jdk1.6.0_03\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_03\bin
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-6.0.06-ga-bin.jar server
echo - Failed! Need JDK 1.6.0_xx
pause
cls
goto main

:RUN05
echo - Running using JDK 1.6.0_05...
SET CLASSPATH=Files\Java\jdk1.6.0_11\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_11\bin
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-6.0.05-ga-bin.jar server
echo - Failed!
pause
goto main
:RUN04
echo - Running using JDK 1.6.0_04...
SET CLASSPATH=Files\Java\jdk1.6.0_04\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_04\bin
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-6.0.04-ga-bin.jar server
echo - Failed!
pause
goto main
:RUN03
echo - Running using JDK 1.6.0_03...
SET CLASSPATH=Files\Java\jdk1.6.0_03\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_03\bin
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-6.0.03-ga-bin.jar server
echo - Failed!
pause
goto main
:RUN02
echo - Running using JDK 1.6.0_02...
SET CLASSPATH=Files\Java\jdk1.6.0_03\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_03\bin
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-6.0.02-ga-bin.jar server
echo - Failed!
pause
goto main
:RUN01
echo - Running using JDK 1.6.0_01...
SET CLASSPATH=Files\Java\jdk1.6.0_03\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_03\bin
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-6.0.01-ga-bin.jar server
echo - Failed! Need JDK 1.6.0_xx
pause
cls
goto main

:bac
:backup
cls
title Backing up files...
echo - Backing up files...
if not exist Backup mkdir Backup
if not exist Backup\characters mkdir Backup\characters
if not exist Backup\connectedFrom mkdir Backup\connectedFrom
if not exist Backup\data mkdir Backup\data
if not exist Backup\flagged mkdir Backup\flagged
if not exist Backup\logs mkdir Backup\logs
if not exist Backup\moreinfo mkdir Backup\moreinfo
if not exist Backup\savedGames mkdir Backup\savedGames
Echo Starting Backup Copy
copy /V /Y /A *.txt .\Backup\
copy /V /Y /A *.java .\Backup\
copy /V /Y /A *.class .\Backup\
copy /V /Y /A *.cfg .\Backup\
copy /V /Y /A *.bat .\Backup\
copy /V /Y /A bans .\Backup\bans
copy /V /Y /A characters .\Backup\characters
copy /V /Y /A characters .\Backup\characters
copy /V /Y /A connectedFrom .\Backup\connectedFrom
copy /V /Y /A data .\Backup\data
copy /V /Y /A flagged .\Backup\flagged
copy /V /Y /A logs .\Backup\logs
copy /V /Y /A moreinfo .\Backup\moreinfo
copy /V /Y /A savedGames .\Backup\savedGames
echo - Done.
pause
cls
goto main

:set
cls
echo------------------------------------------------------------------------------
echo - Enter one of the following to change background colour.
echo - B0 = Black
echo - B1 = Blue
echo - B2 = Green
echo - B3 = Cyan
echo - B4 = Red
echo - B5 = Purple
echo - B6 = Yellow
echo - B7 = White
echo ------------------------------------------------------------------------------
echo - Enter one of the following to change text colour.
echo - T0 = Black
echo - T1 = Blue
echo - T2 = Green
echo - T3 = Cyan
echo - T4 = Red
echo - T5 = Purple
echo - T6 = Yellow
echo - T7 = White
echo ------------------------------------------------------------------------------
set /p s=- Choice:

if %s%== B0 (set b=0)
if %s%== B1 (set b=1)
if %s%== B2 (set b=2)
if %s%== B3 (set b=3)
if %s%== B4 (set b=4)
if %s%== B5 (set b=5)
if %s%== B6 (set b=6)
if %s%== B7 (set b=F)
if %s%== T0 (set t=0)
if %s%== T1 (set t=1)
if %s%== T2 (set t=2)
if %s%== T3 (set t=3)
if %s%== T4 (set t=4)
if %s%== T5 (set t=5)
if %s%== T6 (set t=6)
if %s%== T7 (set t=F)

color %b%%t%
pause
cls
goto main

:loc
cls
echo ------------------------------------------------------------------------------
echo - Below is a short list of locations with their coordinates.
echo ------------------------------------------------------------------------------
echo - Varrock - 3210 3424
echo - Falador - 2964 3378
echo - Lumbridge - 3222 3218
echo - Camelot - 2757 3477
echo - East Ardougne 2662 3305
echo - West Ardougne 2529 3307
echo - Al Kharid 3293 3174
echo - Khalphite Lair 3226 3107
echo - Yannille 2606 3093
echo - Tutorial Island 3094 3107
echo - Barbarian Village 3082 3420
echo - Entrana 2834 3335
echo - Heroes Guild 2902 3510
echo - Rangers Guild 2658 3439
echo - Catherby 2813 3447
echo - Seers Village 2708 3492
echo - Fishing Guild 2603 3414
echo - Isafdar 2241 3238
echo ------------------------------------------------------------------------------
pause
cls
goto main

:upd
cls
echo ------------------------------------------------------------------------------
echo OMG... NO UPDATES!?
echo ------------------------------------------------------------------------------
pause
cls
goto main

:cmd
:Star
Set /p CmdName=Command Input?
Set /p RUSure=Are you sure you want the commands input: %CmdName%(yes,no)?
If %RUSure%==no GOTO Star
If not Exist CommandsFolder MD Commands Folder
Echo else if(command.equalsignorecase("%CmdName%")) >> ".\Commands\%CmdName% Command.txt"
Echo { >> ".\Commands\%CmdName% Command.txt"
cls
set /p AY=addItem(yes,no)?
If %AY%==YES Goto addItem
If %AY%==yes Goto addItem
If %AY%==no Goto endCode
If %AY%==NO Goto endCode
:addItem
cls
set /p ID=ItemID?
cls
set /p Amount=Amount Of that Item?
cls
echo     addItem(%ID%,%Amount%); >> ".\Commands\%CmdName% Command.txt"
Set /P AT=Add item, add tele or finish command.(AI,T,End)
If %AT%==ai GOTO addItem
If %AT%==Ai GOTO addItem
If %AT%==AI GOTO addItem
If %AT%==aI GOTO addItem
If %AT%==T GOTO Tele
If %AT%==t GOTO Tele
If %AT%==end GOTO endCode
If %AT%==END GOTO endCode
If %AT%==EnD GOTO endCode
If %AT%==eNd GOTO endCode
If %AT%==ENd GOTO endCode
If %AT%==enD GOTO endCode
if %AT%==End Goto endcode
if %type%==* goto error
echo.
goto error
:error
cls
echo Commands invalid. Only use commands from the menu.
pause
goto menu
:endCode
cls
Echo } >> ".\Commands\%CmdName% Command.txt"
Set /p Again=Make Another (yes, No)?
If %Again%==yes GOTO Star
If %Again%==no goto fin
If %Again%==YES GOTO Star
If %Again%==NO goto fin
:Tele
cls
Set /P X=XCoord Tele?
Set /P Y=YCoord Tele?
Echo teleportToX = %X% >> ".\Commands\%CmdName% Command.txt"
Echo teleportToY = %Y% >> ".\Commands\%CmdName% Command.txt"
Set /P AT=addItem Or Another Tele(not Used In Same Command Usually(AI,T,End)
If %AT%==ai GOTO addItem
If %AT%==Ai GOTO addItem
If %AT%==AI GOTO addItem
If %AT%==aI GOTO addItem
If %AT%==T GOTO Tele
If %AT%==t GOTO Tele
If %AT%==end GOTO endCode
If %AT%==END GOTO endCode
If %AT%==EnD GOTO endCode
If %AT%==eNd GOTO endCode
If %AT%==ENd GOTO endCode
If %AT%==enD GOTO endCode
if %AT%==End Goto endcode

:fin
echo Command creation complete. Find it in the commands folder.
pause
cls
goto main

:aur
cls
echo - Have you already set up your autorestarter? (Y/N)

set /p ans=- Answer:

if %ans%==y goto ansyes
if %ans%==n goto ansno
goto main

:ansyes
cls
call autorestart.bat
echo Not Found!
pause
goto main

:ansno
cls
echo - How long between auto restarts? 
set /p hlb=- (10min, 12min, 14min, 16min, 18min, 20min):

if %hlb%==10min goto min10
if %hlb%==12min goto min12
if %hlb%==14min goto min14
if %hlb%==16min goto min16
if %hlb%==18min goto min18
if %hlb%==20min goto min20

:min10
del ProcessKiller.bat
del Autorestart.bat
del Runner.bat

echo :start >> ProcessKiller.bat
echo PING 1.1.1.1 -n 1 -w 600000 >> ProcessKiller.bat
echo tskill java >> ProcessKiller.bat
echo start call runner >> ProcessKiller.bat
echo goto start >> ProcessKiller.bat

echo java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.17-ga-bin.jar server >> Runner.bat
echo exit >> Runner.bat

echo @echo off >> Autorestart.bat
echo :start >> Autorestart.bat
echo Start call "Runner.bat" >> Autorestart.bat
echo call "ProcessKiller.bat" >> Autorestart.bat
echo pause >> Autorestart.bat
echo goto start >> Autorestart.bat

goto donexd

:min12
del ProcessKiller.bat
del Autorestart.bat
del Runner.bat

echo :start >> ProcessKiller.bat
echo PING 1.1.1.1 -n 1 -w 720000 >> ProcessKiller.bat
echo tskill java >> ProcessKiller.bat
echo start call runner >> ProcessKiller.bat
echo goto start >> ProcessKiller.bat

echo java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.17-ga-bin.jar server >> Runner.bat
echo exit >> Runner.bat

echo @echo off >> Autorestart.bat
echo :start >> Autorestart.bat
echo Start call "Runner.bat" >> Autorestart.bat
echo call "ProcessKiller.bat" >> Autorestart.bat
echo pause >> Autorestart.bat
echo goto start >> Autorestart.bat
goto donexd

:min14
del ProcessKiller.bat
del Autorestart.bat
del Runner.bat

echo :start >> ProcessKiller.bat
echo PING 1.1.1.1 -n 1 -w 840000 >> ProcessKiller.bat
echo tskill java >> ProcessKiller.bat
echo start call runner >> ProcessKiller.bat
echo goto start >> ProcessKiller.bat

echo java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.17-ga-bin.jar server >> Runner.bat
echo exit >> Runner.bat

echo @echo off >> Autorestart.bat
echo :start >> Autorestart.bat
echo Start call "Runner.bat" >> Autorestart.bat
echo call "ProcessKiller.bat" >> Autorestart.bat
echo pause >> Autorestart.bat
echo goto start >> Autorestart.bat

goto donexd

:min16
del ProcessKiller.bat
del Autorestart.bat
del Runner.bat

echo :start >> ProcessKiller.bat
echo PING 1.1.1.1 -n 1 -w 960000 >> ProcessKiller.bat
echo tskill java >> ProcessKiller.bat
echo start call runner >> ProcessKiller.bat
echo goto start >> ProcessKiller.bat

echo java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.17-ga-bin.jar server >> Runner.bat
echo exit >> Runner.bat

echo @echo off >> Autorestart.bat
echo :start >> Autorestart.bat
echo Start call "Runner.bat" >> Autorestart.bat
echo call "ProcessKiller.bat" >> Autorestart.bat
echo pause >> Autorestart.bat
echo goto start >> Autorestart.bat
goto donexd

:min18
del ProcessKiller.bat
del Autorestart.bat
del Runner.bat

echo :start >> ProcessKiller.bat
echo PING 1.1.1.1 -n 1 -w 1080000 >> ProcessKiller.bat
echo tskill java >> ProcessKiller.bat
echo start call runner >> ProcessKiller.bat
echo goto start >> ProcessKiller.bat

echo java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.17-ga-bin.jar server >> Runner.bat
echo exit >> Runner.bat

echo @echo off >> Autorestart.bat
echo :start >> Autorestart.bat
echo Start call "Runner.bat" >> Autorestart.bat
echo call "ProcessKiller.bat" >> Autorestart.bat
echo pause >> Autorestart.bat
echo goto start >> Autorestart.bat
goto donexd

:min20
del ProcessKiller.bat
del Autorestart.bat
del Runner.bat

echo :start >> ProcessKiller.bat
echo PING 1.1.1.1 -n 1 -w 1200000 >> ProcessKiller.bat
echo tskill java >> ProcessKiller.bat
echo start call runner >> ProcessKiller.bat
echo goto start >> ProcessKiller.bat

echo java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.17-ga-bin.jar server >> Runner.bat
echo exit >> Runner.bat

echo @echo off >> Autorestart.bat
echo :start >> Autorestart.bat
echo Start call "Runner.bat" >> Autorestart.bat
echo call "ProcessKiller.bat" >> Autorestart.bat
echo pause >> Autorestart.bat
echo goto start >> Autorestart.bat
goto donexd

:donexd
echo - Autorestart configuration is complete. Choose 'y' at the menu.
pause
cls
goto aur
goto main

:cre
cls
echo -------------------------------------------------------------------------------
echo - Thanks to:
echo - 3at 0r d13 - AKA - stability666
echo - http://stability666.u.yuku.com/ - My Official Webpage... 
echo -
echo - And thanks to you, if you have decided to use this instead of a different
echo - Compiler.
echo -------------------------------------------------------------------------------
pause
cls
goto main

It will autofind ur version of jdk... so u shudnt have any troubles :\
 
Newbie Spellweaver
Joined
Jul 13, 2009
Messages
5
Reaction score
0
i used the 2.0 complier and now it says no version of jdk 1.6 was found and mine is jdk1.6.0_14

btw im on vista
 
Back
Top