Thread: Getting Your Compiler To Work!

Results 1 to 3 of 3
  1. #1 Getting Your Compiler To Work! 
    Registered Member Mysticpkz's Avatar
    Join Date
    Jun 2007
    Age
    34
    Posts
    24
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    This is my first tut so dont be to hard on it.

    Purpose: Making a Good Compiler

    Difficulty: 0,0001/10

    Assumed Knowledge:

    Server Base: all server bases

    Classes Modified: None

    Step1 : Open a file and call it Compiler.bat, put that one in your server file.

    Step2 : Put all of this in it,

    @echo off
    COLOR 06
    cls
    :menu
    title Compiler and runserver!
    echo Made by Mysticpkz
    echo Select one of option Below
    echo Have fun!
    echo.
    echo c - Compile Your server.
    echo r - Run Your server.
    echo e - Exit out of here!.
    echo.
    echo.
    set /p compile=Option:
    if %compile%==c goto compile
    if %compile%==C goto compile
    if %compile%==r goto run
    if %compile%==R goto run
    if %compile%==e goto end
    if %compile%==E goto end
    if %compile#==* goto error
    goto error
    :compile
    cls
    title Compiler
    if defined javac (goto compile2) else (goto checkjavac)
    :compile2
    if exist *.java (goto compile3) else (goto compileerror)
    :compile3
    %javac% -cp . *.java
    pause
    cls
    goto menu
    :compileerror
    cls
    echo You need to have Java files for this compiler to compile.
    pause
    cls
    goto menu
    :run
    cls
    title Runserver
    if exist .\server.class (goto run2) else (goto servererror)
    :run2
    set java=java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.17-ga-bin.jar
    cls
    goto run3
    :run3
    %java% server
    pause
    cls
    goto menu
    :servererror
    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 running it.
    pause
    cls
    goto menu
    :error
    cls
    title Error
    echo Invalid command. Please make sure the commands you type
    echo in are correct.
    pause
    cls
    goto menu
    :end
    cls
    exit
    :checkjavac
    if exist "%programfiles%\Java\jdk1.6.0_06\bin\javac.exe " (goto setjavac) else (goto checkjavac2)
    :checkjavac2
    if exist "%programfiles%\Java\jdk1.6.0_07\bin\javac.exe " (goto setjavac2) else (goto checkjavac3)
    :checkjavac3
    if exist "%programfiles%\Java\jdk1.6.0_08\bin\javac.exe " (goto setjavac3) else (goto checkjavac4)
    :checkjavac4
    if exist "%programfiles%\Java\jdk1.6.0_09\bin\javac.exe " (goto setjavac4) else (goto checkjavac5)
    :checkjavac5
    if exist "%programfiles%\Java\jdk1.6.0_10\bin\javac.exe " (goto setjavac5) else (goto checkjavac6)
    :checkjavac6
    if exist "%programfiles%\Java\jdk1.6.0\bin\javac.exe" (goto setjavac6) else (goto checkjavac7)
    :checkjavac7
    if exist "%programfiles%\Java\jdk1.6.0\bin\javac.exe" (goto setjavac7) else (goto checkjavac8)
    :checkjavac8
    if exist "%programfiles%\Java\jdk1.6.0_01\bin\javac.exe " (goto setjavac8) else (goto checkjavac9)
    :checkjavac9
    if exist "%programfiles%\Java\jdk1.6.0_02\bin\javac.exe " (goto setjavac9) else (goto checkjavac10)
    :checkjavac10
    if exist "%programfiles%\Java\jdk1.6.0_03\bin\javac.exe " (goto setjavac10) else (goto checkjavac11)
    :checkjavac11
    if exist "%programfiles%\Java\jdk1.6.0_04\bin\javac.exe " (goto setjavac11) else (goto checkjavac12)
    :checkjavac12
    if exist "%programfiles%\Java\jdk1.6.0_05\bin\javac.exe " (goto setjavac12) else (goto javacerror)
    :setjavac
    set javac="%programfiles%\Java\jdk1.6.0_06\bin\javac.e xe"
    goto compile2
    :setjavac2
    set javac="%programfiles%\Java\jdk1.6.0_07\bin\javac.e xe"
    goto compile2
    :setjavac3
    set javac="%programfiles%\Java\jdk1.6.0_08\bin\javac.e xe"
    goto compile2
    :setjavac4
    set javac="%programfiles%\Java\jdk1.6.0_09\bin\javac.e xe"
    goto compile2
    :setjavac5
    set javac="%programfiles%\Java\jdk1.6.0_10\bin\javac.e xe"
    goto compile2
    :setjavac6
    set javac="%programfiles%\Java\jdk1.6.0\bin\javac.exe"
    goto compile2
    :setjavac7
    set javac="%programfiles%\Java\jdk1.6.0\bin\javac.exe"
    goto compile2
    :setjavac8
    set javac="%programfiles%\Java\jdk1.6.0_01\bin\javac.e xe"
    goto compile2
    :setjavac9
    set javac="%programfiles%\Java\jdk1.6.0_02\bin\javac.e xe"
    goto compile2
    :setjavac10
    set javac="%programfiles%\Java\jdk1.6.0_03\bin\javac.e xe"
    goto compile2
    :setjavac11
    set javac="%programfiles%\Java\jdk1.6.0_04\bin\javac.e xe"
    goto compile2
    :setjavac12
    set javac="%programfiles%\Java\jdk1.6.0_05\bin\javac.e xe"
    goto compile2
    :javacerror
    cls
    title Error
    echo You do not have JDK 5.0 or JDK 6.0. Download it
    echo at www.Java.com
    echo and select the newest version!
    pause
    cls
    goto menu
    Step3 :dubble click on it and choose ,

    R - to run the server
    C - to compile your server
    E - to exit that program.

    Have fun guys!
     

  2. #2  
    Simon
    Guest
    Theres 100 compilers i think one line would make your compiler more exciting and appealing as..

    Code:
    Javac *Java
    Pause
     

  3. #3  
    Registered Member Mysticpkz's Avatar
    Join Date
    Jun 2007
    Age
    34
    Posts
    24
    Thanks given
    0
    Thanks received
    0
    Rep Power
    1
    Quote Originally Posted by Simon^ View Post
    Theres 100 compilers i think one line would make your compiler more exciting and appealing as..

    Code:
    Javac *Java
    Pause
    ok ty! ill try that
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •