Kan nogen hjælpe mig?
Jeg har lige fået Ubuntu i går og ved ikke så meget om det...
Jeg har et spil i java
Men jeg ved ikke hvordan jeg kører det
Hvordan laver jeg en fil der gør sådan her (det er sådan filen jeg bruger i windows ser ud)?
@echo off
:def
color 0F
:main
cls
title Fastlay Client-Server Compiler
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo :: Welcome to FC-SC
echo ::
echo :: Choose one of the options below by entering
echo :: the corrensponding letter and pressing enter.
echo ::
echo :: Visit and register @ Fastlay forum
echo :: http://www.fastlay.tk or http://www.z10.invisionfree.com/Fastlay
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 ::
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 :: Scanning for latest JDK version...
echo ::
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
: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_05
SET CLASSPATH=Files\Java\jdk1.6.0_05\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_05\bin
echo :: Results:
javac *.java
echo :: Done!
pause
goto main
:COM04
echo :: Found 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
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.wtf impossible
pause
goto main
:run
cls
title Running Server...
echo :: Port:
echo :: 43594
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)
: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-3.0.17-ga-bin.jar server
echo :: Failed!
pause
goto main
:RUN09
echo :: Running using 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
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.17-ga-bin.jar server
echo :: Failed!
pause
goto main
:RUN08
echo :: Running using 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
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.17-ga-bin.jar server
echo :: Failed!
pause
goto main
:RUN07
echo :: Running using 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
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.17-ga-bin.jar server
echo :: Failed!
pause
goto main
:RUN06
echo :: Running using 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
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.17-ga-bin.jar server
echo :: Failed!
pause
goto main
:RUN05
echo :: Running using JDK 1.6.0_05...
SET CLASSPATH=Files\Java\jdk1.6.0_05\bin;%CLASSPATH%;
SET PATH=C:\Program Files\Java\jdk1.6.0_05\bin
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.17-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-3.0.17-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-3.0.17-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-3.0.17-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-3.0.17-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 :: 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
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 :: Below is a 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
pause
cls
goto main
:upd
cls
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
echo :: Latest updates:
echo ::
echo :: 1) Added Location list.
echo :: 2) Fixed backup commands.
echo :: 3) Added settings option.
echo :: 4) Fixed backup to cover more file types.
echo :: 5) Added autorestarter. This was incredibly difficult for me to do.
echo :: 6) Added command generator.
echo :: 7) Auto-sets enviromental variables when compiling.
echo :: 8) Released On Mopar Forums
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 for using FC-SC.
echo ::
echo :: With this compiler, you can compile
echo :: Fastlay Client and Server.
echo ::
echo :: And you, if you have decided to use this
echo :: instead of a different serverbatch (compiler).
echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
pause
cls
goto main
- Log in to post comments
Kommentarer10
Re: Kan nogen hjælpe mig?
Hvilket format er filen i ?
Re: Kan nogen hjælpe mig?
det er sgu da en abomination det der.. wtf har du gang i? du har slet ikke brug for alt det der lort, bare start java halløjet direkte.
Re: Kan nogen hjælpe mig?
rederman, jeg har faktisk oplevet at for at kører nogle java filer skulle jeg have en eller anden random fil liggende
Re: Kan nogen hjælpe mig?
du skal ikke satse så meget på at få alle dine bat filer til at køre på din ubuntu
Men for at komme tilbage til det vores ven spurgte om
Hvordan laver jeg en fil der gør som den jeg bruger i Windows....
Hvis du har interesse for scripting.
BASH Programming - Introduction HOW-TO by Mike G mikkey at dynamo.com.ar
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
Advanced Bash-Scripting Guide An in-depth exploration of the art of shell scripting Mendel Cooper
http://tldp.org/LDP/abs/html/
Og så skal du kigge på recursive funktioner se. feks. http://www.tech-recipes.com/rx/732/recursive-grep/
Held og lykke med projektet
Re: Kan nogen hjælpe mig?
Kan du så komme ud og vaske dit tastatur med "vand og sæbe", redeeman
#3:
det giver ingen mening
#3:
det giver ingen mening det du skriver
#6:
mit tastatur er ganske rent, det er det script der fandme ikke
Re: Kan nogen hjælpe mig?
#0: Hvis du alvorligt prøver at skifte til linux er der et råd du skal have. Når du skal løse et problem skal du fokusere på målet og ikke midlet!!! Forklaring følger.
Du skal for eksempel ikke sige, "jeg vil gerne have dette script portet til linux", men i stedet skal du sige, "jeg vil løse DETTTE problem på linux". Det kan nogle gange godt være svært at definere problemet.
Et eksempel: Mange nye linux brugere spørger om hvordan de kan køre iTunes på linux. Dette er det helt forkerte spørgsmål. I stedet skal man gøre sig klart, hvorfor man vil have iTunes på linux. Er det måske bare fordi man vil kunne spille musik, synce med sin ipod, købe musik, .... Alle disse problemer ER løst i linux (rythmbox), men iTunes kører ikke på linux, og vil nok aldrig gøre det. (Aldrig = ikke i den nærmeste fremtid, for en arbitrær definition af nærmeste)
Desuden vil du gøre dig selv og os andre en tjeneste ved at skrive en titel, der giver mening. Halvdelen af alle poster her, handler om at hjælp nogen med noget, men hvis du skriver "hjælp til DETTE problem" ved alle hvad de går ind til, og færre sprinter det måske over...
Venlig hilsen
Troels
#8
Intet at fratrække eller
#8
Intet at fratrække eller tilføje.
I alle livets forhold er det en styrke og en kvalitet i sig selv, som ville kunne frembringe mere og ikke mindst bedre kvalitet.
Hvis du ikke kan definere en opgave kan du heller ikke løse denne!
Finder det helt iorden, at der stilles krav til indehaveren af problement uden at blive elitær.
Re: Kan nogen hjælpe mig?
det var et frygteligt langt bat script for at køre følgende to komandoer fra det bibliotek spillet ligger i.
javac *.java
java -Xmx1024m -cp .;./jython.jar;./MySql/mysql-connector-java-3.0.17-ga-bin.jar server
Hvad den gør før det manuelt at teste for ca 10 forskellige lokationer hvor java måske er, for at sætte claspath(windows installers sætter ikke classpath linux pakker gør), derefter printer det en readme. meget af det resterende er basalt set unødvendigt under linux.
Og for at secondere redeman av mine øjne en GOTO ;-), ej der er ingen måde et bat script nogen sinde bliver kønt så de stakkels windows brugere må leve med den slags.
Dybest set skal du bare ændre syntax for at det virker som et possix shell script(bash er possix shell compatibel) men rigtigt mange af dine if exist sætninger er dybt unødvendige i et linux miljø.
Er det noget du selv har lavet eller noget du har hentet/købt ude på nettet? og hvad skal det precist gøre.