Batch file using terminal HEEELLLLPPP

All i want to do is make a batch file, make it run a .jar file with this command
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
This basical runs the file wich is a server with more ram
But i have made a batch file and no matter wich command, even (ls) will not work, please someone, i just need a file that will execute commands like a batch file on windows, you click it and it does what ever is in the codes.
So basicaly, i need it to a find directory using cd then run the command given. but nothing works.

wiinick100 wrote:
so my file icon says shell, and it has these lines in it
#!/bin/bash
cd desktop
Even this simple command does nothing, i have also tried ls, and say, and also a bagillion other commands but it only gives me this error
I do not think you have had enough time to enter a bagillion commands
Last login: Tue Dec 14 13:04:09 on ttys001
Imac:~ name$ /Users/lenzini/Desktop/hello.command ; exit;
/Users/name/Desktop/hello.command: line 1: {rtf1ansiansicpg1252cocoartf1038cocoasubrtf350: command not found
/Users/name/Desktop/hello.command: line 2: syntax error near unexpected token `}'
/Users/name/Desktop/hello.command: line 2: `{ onttbl 0 modern charset0 Courier;}'
logout
[Process completed]
whats wrong
I do not know what is in your hello.command file, but it very much looks like there are lines such as
{rtf1ansiansicpg1252cocoartf1038cocoasubrtf350
I do not know what that is doing there, but is is not something the shell knows how to execute.
I also made a new file, and now its saying i dont have the privileges.
Did you make the file executable using the "chmod +x filename" command?
Maybe you could post your script so we can analyze it. When you do this, put it between a pair of tags so that the forum software does not mess with its contents and steal some of the characters as formatting meta-characters
... Your script here ...
{code}

Similar Messages

  • Running a Batch file Using Java

    hi All ,
    I am executing a DOS batch file using the Java .
    I am using it as
    Process P;
    Runtime rt = Runtime.getRuntime();
    P = rt.exec("C:\\X12TST\\BATCH1.BAT ");
    But in case BATCH1.bat have call to some other Batch File Say Bactch2.bat , i am not getting the output of BATCH2.BAT .
    My Java Program exits as soon as it enters to the point where BATCH1 is calling BATCH2 using (call BATCH2.bat).
    Any help is resolving the problem is highlt appreciated .
    Please advise me if you have any alternative to solve the problem .
    Thanx in advace

    The Runtime.exec() should'nt be used with a .bat or .cmd file since .bat and .cmd are not really executable. I think the expected behaviour you experimentred is a process hang at the last command line of the .bat file.
    Insert "echo XXX" or "net send mycomputer XXX" debug messages in your .bat, you'll see the .bat executes until last line. But the last one NEVER terminates, resulting in a hang in the Java thread doing a process.waitFor().
    The only workaround (or right use of exec) is to call the cmd.exe (with FULL PATH OF cmd.exe SPECIFIED in the exec() call). An exec() calling C:\WINNT\System32\cmd.exe /C mybatch.bat should return properly, cause cmd.exe is a standard Win32 program that will be launched to interpret mybatch.bat then terminate.
    PLEASE UNIX/LINUX USERS : report if the behaviour you get is the same on your plat-form, or if it is -one more- bug in win32 OS. Can you exec() a shell script direcly or do you have to exec() a "bash" or "ksh" or "csh" with you shell script as command line argument ?

  • How to run a batch file using tigger....

    Hi, i am trying run a batch file using a trigger on a table.
    say i have a table XYZ(col_1 varchar2 primary key, col_2 varchar2)
    the values of col_2 keeps changing and col_1 are constant
    whenever the value of col_2 in any row changes from "on" to "off" i want to run a batch file C:\Users\ABC\Desktop\test.bat
    i did some searching but couldn't find any solution. Thanks in advance
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    sorry wrong foum to post.
    will post in the correct one
    how to run batch file using trigger?

    Hallo,
    welcome to the forum.
    This is the forum for the tool {forum:id=260}. Your question should be placed in {forum:id=75} or {forum:id=61}.
    When you post your question there please provide additional information like db version, what kind of trigger you want to use, how you want to prevent the execution when the transaction is rolled back... {message:id=9360002}
    Regards
    Marcus

  • Why do I get error -17500 when calling a batch file using the call executable step type?

    I am calling a batch file using the call executable step type. If the path to the batch file contains a space I get error -17500 and a message stating there was an error in "Post". For example the path to the batch file is "c:\TestWin\Test Files\...\Program.bat" When I run this I get the above mentioned error, however if I change my directory structure so the path is now "c:\TestWin\TestFiles\...\Program.bat" it runs fine. I use the browse feature to find my batch file so it is not me typing in a path incorrectly. I have removed the batch file and I get a different error stating that it couldn't find the file so it appears that for my error it can find the file but can't run it. I am
    sure that this has something to do with the fact that batch files are written in DOS but really don't want to resort to changing my directory structure on all my test stations. Is there any way to fix this problem so I can leave a space in my path?

    It appears I have figured it out. This was on another computer so I was unaware of how they used their computer. I like you got it to work in the temp directory and in fact got the program.bat file to work as long as I put it under the temp directory, but when I switched out to my TestWin directory it wouldn't work, so I removed everything from the directory except the batch file it self and it work. What I found out after adding files in one at a time is that the person had a file called "Test" with no file extension in there "c:\TestWin\" directory. Removing this file made it work. Putting the file back broke it. So it appeares that when teststand was running it followed the path saw a space and attempted to grab the "Test" file instead of bro
    wsing into the "Test Files" directory. If you create a file in your temp directory called "temp" with no file extension you will see the same problem. Thank you for your help.

  • Can we run the batch file using simple java application

    Hello sir,
    we want to run the batch file using simple java application. i tried with some example, we run the exe files but not batch file.
    Runtime r = Runtime.getRuntime();
    r.exec("D:\\jboss\\bin\\run.bat");
    My application is server will run when we run the java appliation.
    any suggestion? plz give me the solutions

    yes you can run html file
    WEB.SHOW_DOCUMENT is a built-in that is used in Forms to call URL from a Web Form. It works much like the similar way that a link on an HTML page works and it takes two arguments, one is URL and second one is TARGET, in your case use following.
    WEB.SHOW_DOCUMENT('http://channas.iil.informatics.lk:8890/forms/frmservlet?config=abc.html', '_blank');
    Hope this will work for you
    Abbas

  • How to run batch file using trigger?

    Hi, i am trying run a batch file using a trigger on a table.
    say i have a table XYZ(col_1 varchar2 primary key, col_2 varchar2)
    the values of col_2 keeps changing and col_1 are constant
    whenever the value of col_2 in any row changes from "on" to "off" i want to run a batch file C:\Users\ABC\Desktop\test.bat
    i did some searching but couldn't find any solution. Thanks in advance
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

    >
    the script will be started around 60-70 times a day
    >
    No - as marwim said the script will be executed every time the trigger is fired. And that trigger, depending on how it is written, might be fired several times for the same transaction.
    And if the trigger is fired the script will be executed even if the transaction that caused the trigger to fire issues a ROLLBACK.
    Triggers are non-transactional. You need to clearly define the business rules for when the script should run. Should it run only when the transaction is COMMITTED? Or should it run if the transaction executes even if the transaction performs a ROLLBACK?
    A trigger is the wrong solution for your problem.
    Please clarify what the business rules are that should control the execution of the script.

  • Executing batch file using SM49 Tcode

    Hi,
    Theirs a batch file which is used to encrypt a text file ie from '.txt' to '.enc'.
    Seperate Encryption software and Java Pakage is used.
    When in SM49 the operating system command is executed,its throwing error
    File Not Found Exception.
    ie call failed
    Java.io.filenotfoundexception :  ..\logs\star_pkcs7-client-events.log(The system cannot find the path specified)
    OS is WinNt,File is encrypting at OS level seperately.
    All authorisation issue has been taken care of.
    If any questions or need information then plz ask
    Help me on this...its urgent

    hi,
    well try the following
           String cmdLine[] = {"cmd.exe","/c","copy.bat"};       Runtime.getRuntime().exec(cmdLine);it works fine in Win NT, the process terminates normally.
    cheerz
    ynkrish

  • Running a Batch File using Auto Scheduler in HFM?

    Hi,
    Can we execute a batch file or run a macro or execute a VB script using the auto scheduler in Task Automation in HFM??
    Abhishek
    Edited by: user10378700 on Sep 30, 2008 7:18 AM

    I'm having difficulty running a batch script the way you describe.
    One line of code in c:\test.bat:
    echo Hello >c:\test.log
    This works just fine.
    However, for the life of me I cannot get this to work through Task Automation.
    I have the Application as Hub.
    The Action as Execute.
    The Command as c:\test.bat.
    When I select the task and click on Run Now, I get a message that the taskflow has initiated successfully. However, nothing fires on the server. I cannot see this process in Running Tasks (it would run quickly).
    Any hints?
    I have not found this subject to be...overdocumented.
    Regards,
    Cameron Lackpour

  • Pass Passord Variable to a Batch File using Execute Process Task

    I have an FTP batch file that I want to execute using Execute Process Task. The content of the ftp (ftpscript.cmd) is as below:
    open ftpsite
    UserName
    Password
    ASCII
    get file  c:\temp\test.txt
    bye
    Using SSIS Execute process task, I was able to download data. I configured the Execute Process task as follows:
    Executable: ftp.exe
    Arguments: -s:"c:\temp\ftpscript.cmd"
    The above works fine. But the problem is that I don't want to store the password value in the batch file for security/policy reasons. Please, is there a way I can pass the password value to the ftp executable or the batch file at run time?
    I know how to get and store variables in SSIS but I don't know how to pass this kind of variable to the batch file just before execution.
    Any suggestions will be appreciated. Thanks.

    you can dynamically generate the source (CMD) for the FTP and delete after the execution. The password can be stored in a secure database for example, not 100 % secure, but the best you can do.
    Another option I did was an encrypted VBScript (also quite easy to open in plain text to some people).
    Finally it can be a binary e.g. an EXE with the FTP called as process in it.
    Arthur My Blog

  • Can't terminate batch file using Ctrl+C in 2003 and 2008server

    Batch file like below:==============================================================@echo off
    set DB_USER=:INPUT_USERNAME
    if "%DB_USER%"=="" (
    set /p DB_USER=Please enter username:
    goto INPUT_USERNAME
    ================================================
    When running this bat file, can't terminate using Ctrl+C in 2003 and 2008 server. But the same bat is running normally in other windows operation system.
    Pls tell me why. Thanks in advance.
    Rocky Su

    I have tested the bat on Windows server 2003 R2 Enterprise x64 Edition SP2 and Windows server 2008 R2 Enterprise.
    Rocky Su

  • Calling batch file using dbms_scheduler

    Hello,
    i have created a schedule, program and a Job to using the DBMS_SCHEDULER. creates all those fine but when i try to run i get errors.
    here is the code:
    begin
    dbms_scheduler.create_schedule(
    schedule_name => 'dailyjob',
    repeat_interval => 'FREQ=DAILY; INTERVAL=1;
    BYDAY=TUE; BYHOUR=4',
    comments => 'schedule to run daily');
    dbms_scheduler.create_program
    ( program_name => 'runord',
    program_type => 'EXECUTABLE',
    program_action => 'd:\oracle\product\admin\scripts\ord.bat >nul',
    enabled => TRUE,
    comments => 'ORDERS.'
    dbms_scheduler.create_job (
    job_name=>'TEST',
    program_name =>'runord',
    schedule_name=> 'DAILYjob',
    enabled => true,
    comments => 'TESTING the Orders Job.'
    end;
    exec dbms_scherduler.run_job('TEST');
    gives me the errors.
    in the batch file i am calling connecting to the database and calling the sql file. is there any way that i can connect to the database directly from scheduler itself? i dont like to save username and passwords in a file to connect and invoke sqlplus?
    could any one help.....

    Pass them to the external command line as parameters? That exposes the name and password even more.
    We use a tightly controlled directory with this information in it and access to the directory is controlled. The scripts are also in a controlled directory and have read privileges where the credentials are stored.
    That way the scripts don't have the data exposed and don't use it until they run.

  • LabView equivalent to running batch files using the "shell" command (VisualBasic)

    I'm converting a VisualBasic app to LabView and am having trouble figuring out how to run a batch file with LabView.
    The VB code that I'm trying to replicate is:
    'UNLOAD RTX DRIVERS
    Dim ProcessId As Long
    ProcessId = Shell(App.Path + "\UnloadReloadRTX.bat", vbNormalFocus)
    Wait 400
    I haven't found a LabView equivalent to the Shell command. Any suggestions will be appreciated.
    thanks,
    Todd

    It seems as if this question pops up every week. Use the System Exec.vi found under Funtions - Communications palette. It is the equivalent of Shell.
    - tbob
    Inventor of the WORM Global

  • Running batch files using java

    Hi,
    How can i run two batch files in a specified interval(Eg. 1 hour) using java.
    Thanks

    Hi,
    Learn to Use the API.
    import java.io.IOException;
    import java.util.Timer;
    import java.util.TimerTask;
    public class RunBat {
         static void runBatchFiles(String[] batchFiles)
              final String[] files = batchFiles;
              Timer timer = new Timer();
              TimerTask task = new TimerTask()          {               
                   Runtime r = Runtime.getRuntime();               
                   public void run() {
                        for(String command : files)
                             try {
                                  r.exec(command);
                             } catch (IOException e) {                              
                                  e.printStackTrace();
              timer.schedule(task, 1000, 1000*60*60);
         public static void main(String[] args) {
              runBatchFiles(new String[]{"cmd /C start f:/one.bat","cmd /C start f:/two.bat"});
    }Thanks

  • Run Batch file using GPO in all users with Windows 2008 R2

    Dear Sir,
    We have to install one software packages in all laptops using GPO. we have batch file and using this we can install software.
    is there any way to install automatic by this batch file?
    this is not msi packages.
    Regards,
    Sunil 
    SUNIL PATEL SYSTEM ADMINISTRATOR

    > Please provide how to configure...
    https://technet.microsoft.com/en-us/magazine/dd630947.aspx
    https://technet.microsoft.com/library/cc779329.aspx
    Greetings/Grüße,
    Martin
    Mal ein
    gutes Buch über GPOs lesen?
    Good or bad GPOs? - my blog…
    And if IT bothers me -
    coke bottle design refreshment (-:

  • How to recover trash emptied docx file using terminal!! please help, many recovery software doesnt work!

    i accidentally deleted a .docx file today and emptied it in the trash!! i tried to use softwares like iskysoft,stellar,wondershare, but none can find the required file! I also tried to use terminal to recover my file by typing --> Tserings-MacBook-Pro:~ tseringdorjee$ mv .Trash/OS copy .  but ended with
    mv: rename .Trash/OS to ./OS: No such file or directory
    mv: rename copy to ./copy: No such file or directory
    where OS copy is the name of my .docx file! i also tried to put .docx after the file name, but it doesn't work too!
    so, please help!!!

    If you placed the file in the trash and emptied the trash and recovery software is unable to get the file back, I'm afraid it is gone.
    You will have to resotre from backups if you any,  or else try sending the drive to a commercial data recovery outfit. But it will be very expensive and the likely hood of a better outcome is not high.
    regards

Maybe you are looking for