How to create an executable File (Linux-Script) in Java

Hello,
I'm creating a script file in my Java Application.
This script should be executed by hand on my linux system. Therefor the execute flag must be set. But how can I set this flag without executing the "chmod"-command?
Is there any possiblility to do this?
Thanks,
Armin

I don't think there is. But you can use Runtime.exec() to execute a chmod command.

Similar Messages

  • How to create an executable file by including my C# project and database(SQL) in visual studio ?

    Hi,
         I had developed a project in visual studio c# and my database in SQL server. How can i create a executable file including both. 
    can any one give me a solution for this.
    I am trying to make executable in installshield.
    Thank you

    Hi,
    Try to use custom actions to call some managed method, execute the SQL script to create and initialize the database in the method.
    Check this article, it should be helpful for you to create the script and installation:
    https://msdn.microsoft.com/en-us/magazine/cc163919.aspx#S2
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to create an executable file

    hello,
    i don't know if its the right forum but i hope you will be able to help me.
    i have written a java program using NetBeans 4.1. and i want to create an executable file so that i coulfd copy it to other computers and run it from there.
    when i try to simply run Java i get a lot of errors because it cant find NetBeans specific packages, what can i do?
    a huge thanks to anyone who would help.

    i have written a java program using NetBeans 4.1. and
    i want to create an executable file so that i coulfd
    copy it to other computers and run it from there.How about an executable JAR instead?
    http://onesearch.sun.com/search/onesearch/index.jsp?qt=create+executable+jar&qp_name=null&subCat=siteforumid%3Ajava31&site=dev&dftab=siteforumid%3Ajava31&chooseCat=javaall&col=developer-forums
    http://onesearch.sun.com/search/onesearch/index.jsp?qt=create+exe&col=developer-forums&subCat=siteforumid%3Ajava31&cs=false&chooseCat=javaall&qp_name=null&rt=true&site=dev&dftab=siteforumid%3Ajava31
    when i try to simply run Java i get a lot of errors
    because it cant find NetBeans specific packages, what
    can i do?You'll have to distribute them as well (as long as the license agreement allows you) and have to include them in the user's classpath.

  • How to create windows executable file from a java file. Please help.

    Hi,
    For my project I developed the codes in Java. It is working well with java run time environment. But without that I can not run it. I need to create a exe file (windows executable file) from the java source code. If you have any idea please share it with me.
    Even if you know it very lightly, please help with what you know. That would be a big help for me.
    Thank you very much.

    Does anybody know how to read a manual?
    Matt Richardson
    Certified LabVIEW Developer
    MSR Consulting, LLC

  • How to create a executable file from .java file?

    Well usually we would compile and run our program using jdk1.x. Can we create a .exe file so that it will run everytime I open it without compile and run it?
    Regards,
    Ng

    hai,
    you can create a batch file,in it define the commands javac and java.so that whenever u are running the batchfile it is compiled and the program is executed..
    it will work..
    bye,
    j.mouli

  • How do I create an executable file?

    How exactly do I create an executable file from my .java file?

    I've tried to run it from the DOS prompt two ways.
    If I type "java -jar Plist" (Plist is the .jar file
    name, the .java file name, and the class name), It
    says...
    Exception in thread "main" java.util.zip.ZipException:
    The system cannot find the file specifiedThat seems pretty clear - there is no file called "Plist" and that's it. "The system cannot find the file specified."
    If I type "java -jar Plist.jar", It says...
    Exception in thread "main"
    java.lang.NoClassDefFoundError: Plist
    Two questions...
    1. What am I doing wrong??Two possibilities, I'd put my money on the first one:
    1. That jar file of yours really doesn't contain a class called Plist. Check the contents with "jar -tf Plist.jar". The file Plist.class (along with other stuff you put in the jar) should be listed.
    2. If it is listed, your classpath may be set wrong - can you run the app with "java -classpath Plist.jar Plist"?
    2. Once I get this .jar deal to work, will I be able
    to run it on other computers? It seems to be tied in
    with some of the Java utilities and files on my
    computer. Is it independent like a .exe file or not?No, it's not independent like a .exe file. It's a lot more independent than any .exe file. Ever tried running them on a Mac? Linux? Solaris? Anything else than windoze? On a windoze system that's older than recommended, like on win95 instead of 2k?
    The independence of java class files packed in jars is on the level of xml, pdf and postscript files - you can use them everywhere. To be more exact, on every system that has a "viewer" for those files; in java's case the "viewer" is the runtime environment. Once it's installed the files can be run like other programs on the system.

  • How to create a password file for executing psadmin command to deploy portl

    how to create a password file for executing psadmin command to deploy portlet

    What you have done is perfectly right. The password file doesn't have anything else apart from the password
    for example in your case
    $echo password > /tmp/password.txt
    However I remember that in windows install, the Application server used to wait for a user's input when a deploy was to be done for the first time. So Can you read the Release notes or the Readme file which has come with windows.
    The solution was,
    manually use asadmin command of application server to deploy some war (any webapp will do), at this time, a question will be prompted to accept a certificate. once this is done, deploy portlet should work fine!!!
    HTH

  • How do I include all the necessary files required for the DAQ Assistant to create an executable file?

    I am creating an executable file to run on a computer that does not have LabVIEW installed.  The problem is that I am using the DAQ Assistant.  The VI Hierarchy is rather large, and I am not sure how to include all of the required files to eliminate the error "The full development version of LabVIEw is required to fix the errors."  Attached is an image of the VI Hierarchy.
    Solved!
    Go to Solution.
    Attachments:
    hierarchy.jpg ‏419 KB

    Yes I did create an installer.  See image installernoDAQmx.jpg  
    When this is all I do I get an error that subvi is not included, a list of about 6 subvi's.  To eliminate this error I manually add the subvi from the dependencies list to the my computer list. This allows me to add them as support files.  This eliminates the error about subvi not included, but then I get the error I spoke of earlier.
    If I include the DAQmx I get an error.  See image installererror.jpg
    Not sure what MAX refers to?
    Attachments:
    installernoDAQmx.jpg ‏259 KB
    installererror.jpg ‏103 KB
    dependencies.jpg ‏344 KB

  • HOw to create a Batch file for java application and whats the use of this ?

    HI,
    How to create a Batch file for java application ?
    And whats the use of creating batch file ?
    Thanks in advance

    First of all, you're OT.
    Second, you can find this everywhere in the net.
    If you got a manifest declaring main class (an classpath if needed), just create a file named whatever.bat, within same directory of jar file, containing:
    javaw -jar ./WhateverTheNameOfYourJarIs.jar %*By the way, assuming a Windows OS, you can just double click the jar file (no batch is needed).
    Otherwise use:
    javaw -cp listOfJarsAndDirectoriesSeparedBySemiColon country/company/application/package/className %*Where 'country/company/application/package/' just stands for a package path using '/' as separator instead of '.'
    Don't specify the .class extension.
    Javaw only works on Windows (you asked for batch, I assumed .BAT, no .sh), in Linux please use java.exe (path may be needed, Windows doesn't need it 'cause java's executables are copied to system32 folder in order to be always available, see PATH environment variable if you don't know what I'm talking about) and use ':' as classpath (cp) separator.
    The '%***' tail is there in order to pass all parameters, it only works on Windows, refer to your shell docs for other OSs (something like $* may work).
    This way you have a command you can call to launch your code (instead of opening NetBeans just to see your app working). You could schedule tasks on it or just call it in any command prompt (hope you know what it is 'cause there have been people in this very same forum with no clue about it, if not just hold the 'Windows button' and press 'R', then type 'cmd' and run it).
    Finally add dukes and give 'hem away.
    Bye.

  • How to create .ctl (control file) to calide excel rows in ssis ?

    In my package i have a requirement to use .ctl control file to valide excel rows. can anyone tell me how to create a .ctl file which will have all of this information. 

    A few assumptions 1st:
    1) I understood the .ctl file can be any ASCII (flat) file of arbitrary format; and that
    2) You will drive the validation rules.
    Since you seem like want to apply the validation as the first step in your package I advocate plugging the Script Transformation task in which happens to expose the "ProcessInputRow" method that in turn allows a developer to intercept each row for inspection.
    This is where you will need to apply much thinking to how to make the validation rules applied in retrospect to the incoming data.
    You drive the code (logic). More through help is a click away here http://www.codeproject.com/Articles/193855/An-indespensible-SSIS-transformation-component-Scr which only covers how to make the row-by-row processing possible.
    If you expected SSIS to have this functionality provided for free - unfortunately this is not happening.
    One of many reason is, what you want to do is extremely laborious.
    Arthur My Blog

  • How to create a pdf file from multiple images ?

    Dear All,
    I want to create a SINGLE page pdf file from two or more page size images that are combined to make a single page pdf. Again, this question is on pdfs that are made out of several, atleast  two color images and a black-and-white mask for one of them.
    I have such pdf files from an unknown source (the producer is edited out) whereby there are three tiff images, obtained using the well known pdfimages extractor.
    When I want to make a pdf out of tiff or png or other image formats, I right click and tell Adobe Acrobat to make a pdf.
    However, I dont know how I can give a command to select say,  three tif images and specify which is the mask for which and then join  them in a way that I get the pdf from the composite of the two color images and a mask for one of them.
    Please help me out.
    I am a little familiar with the pdf structure skeleton and when necessary, fixed xref tables in one of my favorite editors. A few years ago, I also wrote a bunch of javascripts to make some annotations and needed some automation and used some itext type libraries. However, I need your help in this problem as I am now rusty and forgot some of what I studied to solve my earlier problems. This is a new problem for me. Gentle hints from you would be very nice to help me in this problem. Please specify if necessary what manual and pages to read. in the pdfspec.
    Best Regards
    Disabled Veteran [physically handicapped]

    Hello Again.
    On Fri, May 11, 2012 at 12:20 PM, lrosenth <[email protected]> wrote:
    >
    > Re: How to create a pdf file from multiple images ?
    >
    > created by lrosenth in PDF Language and Specifications - View the full
    > discussion
    > ________________________________
    >
    > No clue who Irving is…
    >
    I was hoping to have your first name so its easy for me to address you.
    > I have no clue what OS platform, programming language, etc. you use so
    > can’t really narrow things down.
    I would gladly mention that I am working on windows platform, preferably XP.
    I can also work on linux for free products that come with it.
    >  Also, as this is an Adobe forum, we only
    > recommend Adobe products – so there may be other options that even my list
    > wouldn’t include.
    But adding other products, for the help of an adobe products user,
    even if it outside adobe, shall add greater prestige to your company
    and give impression of user-centeredness.
    > If you read ISO 32000-1:2008 (aka the PDF standard), you will find the
    > information about Images and Image Masks well described.  I didn’t think I
    > needed to repeat any of that information.
    Well, just add the few pdf stanzas since you are proficient on it and
    I am presently a little rusty as I mentioned. Just asking a little
    extra yard, not even to go an extra mile.
    > And, if you read that same document, you will see that there is NO SUCH
    > THING as a “text only PDF”.   All PDF documents are structured binary files.
    Well, ascii format or uncompressed format that is human readable. I
    know its a binary file, but human readable ascii version of it.
    I hope you can give me some stanza and various other approaches
    possible so I can select or combine things for myself. I see only a
    miniscule number of posts claiming to have written masks in this forum
    and then with no details.
    Regards
    Roger
    Message was edited by: dying veteran
    because the adobe posting system went crazy and truncated all except the first line ... dunno why

  • Create an executable file

    I have created and build a project. How can I create an executable file to run the whole package?

    In general, you can't. Java programs have to be run under the jvm so you have to run the java command every time.
    You can package your project as a runnable jar file. How you run it depends on your opperating system.

  • How to create an executable

    Hello, I am trying to figure out how to make an executable file from LabVIEW. This is my first time ever creating an executable so I need instructions in basic terms. I tried to do it using the project manager. The file that was created needs LabVIEW Run-Time in order to work.
    Is it even possible to have a LabVIEW program and create an executable that would let any computer without NI products run the appllication?
    Also, I searched for some instructions of how to do this but could not find any useful ones. If anyone can direct me to a post or set of instructions that explain how to create an executable that would be perfect. Thank you!
    Solved!
    Go to Solution.

    Is there any way i can make the RunTime install silently with no user interaction? If I can, how? I have looked at other posts and how NI tell me to do it (http://digital.ni.com/public.nsf/allkb/188FE05BA8933F4486256BC300708527) , but it is way over my head. Is this the right way? or is there a simpler way?
     I do not understand how to compile the installer and executable file together. I can create the executable from the LabVIEW file that I need to run, but I want the RunTime to install automatically before that executable is executed. (If this statement doesnt make sense, tell me. )
    Any feedback would be appreciated.

  • How to create smaller .exe file use JBuilder7

    I am currently using JB7(EE), which can create native executable file for me. But I found it so foolish that add so many unneed classes to .exe(As I can use WinRar open it, but cannot change it).
    Does anyone know how to reduce the .exe?
    ps: As I use castor, so I had to include castor class in it, but I really don't want to add all of these to it.

    In the Wizar you employ to make the native executable,
    in the second step the Wizard ask you what to do with
    the libraries you have employed in the proyect,
    include all them include only the classes and
    resources nedded, or not include. This way you'll be
    able to control what is in you .exe file.
    AbrahamYes, I had tried it, and tried every possible combination/permutation of the four choice.
    But still bigger than it can be.
    For example: I used castor.xml library, but JBuilder include all castor include xml parser, html parser, xhtml parser, etc.
    As castor.xml --> castor.xxx(I cannot remember its name) --> castor.html-->...
    So JB7 maybe confused by the complex deps.
    So JB7 include ALL in my exe fiel.
    It may be impossible to create smaller .exe file with normal way.
    So anyone know any other way to create .exe file with the .jar file?
    As I can change the content of .jar, but cannot to .exe.
    thx for continous reply

  • How to create a bat file by abap?

    hi~
    i ask a elementary question.how to create a bat file in my local pc?how to write some message in this bat file ?thank you !

    execute bat-files
    Reward Points if it is helpful
    Thanks
    Seshu

Maybe you are looking for

  • Flash SWF file within Swing JFrame

    I was wondering whether its possible to open a Flash swf file within a JFrame I am looking for a solution similar to the usage of Flash Activex control in .NET thanks in advance Vikas

  • Losing all my recordings due to an upgrade

    I've just been informed that I will lose all my recordings due to an upgrade in 30 days time. Unfortunately the 2 weeks prior to this I am on holiday and wanted to record things whilst I'm away. Frankly, I am appalled that any upgrade should make us

  • Retrieving the firstname from repository

    can anyone please tell me how can i retrieve the firstname of a user created in IDM in to a form in the workflow..

  • Guest-User custom Webauth Page

    I have created and loaded a custom webauth page on my 4400-Software version 4.2.61.0. The TAR file loaded successfully on the controller. When a user logs in they get an ip however they never get re-directed to the page. It doesn't even try. When I t

  • External cd dvd drives

    I have a newer imac running 10.6.7   iMac   Model Identifier:    iMac7,1   Processor Name:    Intel Core 2 Duo   Processor Speed:    2.4 GHz   Number Of Processors:    1   Total Number Of Cores:    2   L2 Cache:    4 MB   Memory:    4 GB   Bus Speed: