Executable files under linux

Hello,
could anyone tell me how to convert the .jar file to an executable file under linux

could anyone tell me how to convert the .jar file to
an executable file under linuxwell first this is the wrong forum to post the question, but anyways
1-chmod u+x <your_jar_file>

Similar Messages

  • How to output executable Bin file under linux from java

    Hi
    im beginner in java under linux and i want to out put my java programs to be bin files that can run
    if this not possilble
    how to run the output jar files with just double click ?
    does i have to run sh file that do the hob how?
    thanks in advance.

    say your main method (application's entry point) is located in a class com.my.Class,
    then first you create a text file (say, manifest.txt) that contains this line:
    Main-Class: com.my.Class
    [/code}
    and then you append this to the jar's manifest as such:
    jar cfm yourjarfile.jar manifest.txt [additional files you might want to add]
    for more info,
    http://java.sun.com/docs/books/tutorial/deployment/jar/manifestindex.html                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Files under linux and windows

    Hi,
    I have a program that works under both windows and linux. I wanted to know what is the best way for the file paths I use.
    What is the difference between using "/" and "java.io.File.separator"?
    Any more info/tips on the difference between working under windows and linux will be great. I tried searching for it online but couldn't find anything useful.
    Thanks,
    Shaul

    BigDaddyLoveHandles wrote:
    I thought that if you used a '/' in a path string it was interpreted correctly, even in Windoze.Other platforms are available :-)
    I can't recall the details now, but we had an inexplicably-breaking build on Windows earlier this year for code that was fine under Linux, and tracked it back to the use of "/" rather than File.separator. It was an odd corner case which escapes me, but a lesson learnt nonetheless

  • Forms compilation Errors under Linux

    Hello,
    I have a main form called Tbdoctrk.fmb.
    This forms compiles and runs perfectly through Oracle 9i iDS.
    When transfering the fmb file under Linux, and attempting to recompile using the f90genm.sh utility, I get the following compilation errors:
    FRM-18108: Failed to load the following objects.
    FRM-30436: Parent window not specified for canvas.View Canvas H_TOOLBAR
    FRM-30041: Position of item places it off of canvas.
    Item: BUTTON_HELP
    Block: VARIABLE
    Form: TBDOCTRK
    FRM: Unable to adjust form for output.
    ====
    I noticed that most of the object that failed to load (1 data block object, 1 canvas and a number of property classes and visual attributes) are contained in a file called TOOLBAR.fmb.
    The TOOLBAR.fmb file compiles without errors under Linux/WIndows + is located in the same folder as the Tbdoctrk.fmb file.
    1) How can I resolve this issue ?
    PT
    PS: I tried renaming the fmb files to upper/lower case without success.

    Hello,
    My main form called Tbdoctrk.fmb in turn calls a form called Pre_bord.fmb in a Program Unit.
    Most but not all Class and Value Attributes are included in a file called toolbar.fmb. I did not find any specific reference to the toolbar.fmb file.
    However, at compile time, I find that those objects are not loaded.
    1) In what part of the main form Tbdoctrk.fmb should I find any such reference to the toolbar.fmb file ?
    2) How should I create those symbolic links under Linux ?
    PT

  • Deploying under linux

    Dear all
    I develop a project using Jdeveloper under windows, but when its deployed on linux, i get some problems in running the project while it work fine when i deploying it on AS under windows.
    do i have to use jdeveloper under linux to develop project that will be deployed under linux.
    Tanks in advance

    Hi
    thank you, I know that the development using Jdeveloper should be platform independent, but I dont know if this is practically correct, and I dont use any os specific functions, and the problems happened to me under linux when I am trying to use to upload a file under linux by using the intermedia, while under windows every thing is fine.
    the other problem is when I download the jdeveloper base version to work under linux and trying to download the jdk from the link given by oracle. the download for the jdk is always failed, so please help me in finding the JDK.
    regards

  • Create Zip File In Windows and Extract Zip File In Linux

    I had created a zip file (together with directory) under Windows as follow (Code are picked from [http://www.exampledepot.com/egs/java.util.zip/CreateZip.html|http://www.exampledepot.com/egs/java.util.zip/CreateZip.html] ) :
    package sandbox;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.zip.ZipEntry;
    import java.util.zip.ZipOutputStream;
    * @author yan-cheng.cheok
    public class Main {
         * @param args the command line arguments
        public static void main(String[] args) {
            // These are the files to include in the ZIP file
            String[] filenames = new String[]{"MyDirectory" + File.separator + "MyFile.txt"};
            // Create a buffer for reading the files
            byte[] buf = new byte[1024];
            try {
                // Create the ZIP file
                String outFilename = "outfile.zip";
                ZipOutputStream out = new ZipOutputStream(new FileOutputStream(outFilename));
                // Compress the files
                for (int i=0; i<filenames.length; i++) {
                    FileInputStream in = new FileInputStream(filenames);
    // Add ZIP entry to output stream.
    out.putNextEntry(new ZipEntry(filenames[i]));
    // Transfer bytes from the file to the ZIP file
    int len;
    while ((len = in.read(buf)) > 0) {
    out.write(buf, 0, len);
    // Complete the entry
    out.closeEntry();
    in.close();
    // Complete the ZIP file
    out.close();
    } catch (IOException e) {
    e.printStackTrace();
    The newly created zip file can be extracted without problem under Windows, by using  [http://www.exampledepot.com/egs/java.util.zip/GetZip.html|http://www.exampledepot.com/egs/java.util.zip/GetZip.html]
    However, I realize if I extract the newly created zip file under Linux, using modified version of  [http://www.exampledepot.com/egs/java.util.zip/GetZip.html|http://www.exampledepot.com/egs/java.util.zip/GetZip.html] . The original version doesn't check for directory using zipEntry.isDirectory()).public static boolean extractZipFile(File zipFilePath, boolean overwrite) {
    InputStream inputStream = null;
    ZipInputStream zipInputStream = null;
    boolean status = true;
    try {
    inputStream = new FileInputStream(zipFilePath);
    zipInputStream = new ZipInputStream(inputStream);
    final byte[] data = new byte[1024];
    while (true) {
    ZipEntry zipEntry = null;
    FileOutputStream outputStream = null;
    try {
    zipEntry = zipInputStream.getNextEntry();
    if (zipEntry == null) break;
    final String destination = Utils.getUserDataDirectory() + zipEntry.getName();
    if (overwrite == false) {
    if (Utils.isFileOrDirectoryExist(destination)) continue;
    if (zipEntry.isDirectory())
    Utils.createCompleteDirectoryHierarchyIfDoesNotExist(destination);
    else
    final File file = new File(destination);
    // Ensure directory is there before we write the file.
    Utils.createCompleteDirectoryHierarchyIfDoesNotExist(file.getParentFile());
    int size = zipInputStream.read(data);
    if (size > 0) {
    outputStream = new FileOutputStream(destination);
    do {
    outputStream.write(data, 0, size);
    size = zipInputStream.read(data);
    } while(size >= 0);
    catch (IOException exp) {
    log.error(null, exp);
    status = false;
    break;
    finally {
    if (outputStream != null) {
    try {
    outputStream.close();
    catch (IOException exp) {
    log.error(null, exp);
    break;
    if (zipInputStream != null) {
    try {
    zipInputStream.closeEntry();
    catch (IOException exp) {
    log.error(null, exp);
    break;
    } // while(true)
    catch (IOException exp) {
    log.error(null, exp);
    status = false;
    finally {
    if (zipInputStream != null) {
    try {
    zipInputStream.close();
    } catch (IOException ex) {
    log.error(null, ex);
    if (inputStream != null) {
    try {
    inputStream.close();
    } catch (IOException ex) {
    log.error(null, ex);
    return status;
    *"MyDirectory\MyFile.txt" instead of MyFile.txt being placed under folder MyDirectory.*
    I try to solve the problem by changing the zip file creation code to
    +String[] filenames = new String[]{"MyDirectory" + "/" + "MyFile.txt"};+
    But, is this an eligible solution, by hard-coded the seperator? Will it work under Mac OS? (I do not have a Mac to try out)
    p/s To be honest, I do a cross post at  [http://stackoverflow.com/questions/2549766/create-zip-file-in-windows-and-extract-zip-file-in-linux|http://stackoverflow.com/questions/2549766/create-zip-file-in-windows-and-extract-zip-file-in-linux] Just want to get more opinion on this.
    Edited by: yccheok on Apr 26, 2010 11:41 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Your solution lies in the File.separator constant; this constant will contain the path separator that is used by the operating system. No need to hardcode one, Java already has it.
    edit: when it comes to paths by the way, I have the bad habit of always using the front slash ( / ). This will also work under Windows and has the added benefit of not needing to be escaped.

  • Executing the .bat file under java

    Hi,
    I have a batch file which will do some useful stuffs
    like compilation of jar file, deploying the ejb's under
    WebLogic container etc.
    I called the batch file under windows environment, it
    used to display the console without any processing
    on it.But similar stuff with shell script works fine on
    Linux OS.
    How do I execute the batch file from Runtime?

    We use
    Runtime.getRuntime().exec("c:\\path\\to\\batch.bat");
    If that doesn't work, try "cmd /c c:\\path\\to\\batch.bat".
    You might have to capture the output from the process from Java to make sure it works correctly. And yes, the downside is that it will bring up an empty command prompt when you run it under Windows 95,98,Me... not a lot you can do about that, it's avoidable under NT,2K,XP with a bit of trickery though.

  • Executing JAR files on Linux

    Hi!!
    I make a little application and I want make the files who executes the jar file generated to allow user execute the program easily.
    In windows i make a .bat file that jost contains "javaw -jar <file.jar>".
    but how can i do to make the same in Linux?? what kind of script i must to do?
    Thanx!!
    PD: sorry my bad english!!

    You need to write a linux script, something like
    javaw -jar <file.jar>
    should do fine. Note, under linux the filename and its extension are not important. However you need to make the script executable e.g.
    chmod +x <script>                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How do I import old FCP projects that have mysteriously changed to Linux Executable files?  Is it as simple as renaming the files with the.fcp extension?

    I had some FCP projects on an old G3 tower that I finally want to finish. I was able to grab everything, media, etc. to my macbook pro but all of the Final Cut Pro actual movies/projects have turned into "linux executable files" that FCP X won't import.
    I tried googling this issue but didn't really see any good answers. Would it be as simple as renaming the files with the .fcp extension?  I can't recall if my old version (really old) of FCP saves projects as .mov or .fcp files, but I'm assuming I'm not the only person this has happened to.
    Thanks for your help!

    I had some FCP projects on an old G3 tower that I finally want to finish.
    What version of FCP was this? The project files can probably no longer be opened in the newer version of the OS. You could try adding the .fcp suffix, but I don't think it will help for this. Projects files are .fcp.
    Regardless of the version, no legacy FCP projects will import into FCPX.
    Media is a different matter. These are probably QuickTime .mov files. If these are appearing as Unix ececutables, they're probably not recoverable either.

  • Compile fail under linux ! oci.h: No such file or directory

    I want to transplant an Win32 OCI program to Linux.When i compile the program under Linux, the gcc returns the error information 'oci.h: No such file or directory '.
    Where can i find the OCI libs and includes under Linux/Unix?

    and I suggest you should use $ORACLE_HOME/rdbms/demo/demo_rdbms.mk to build oci applications. Instructions are there in the same file.

  • Different behaviour of file vis under linux and microsoft

    I am porting software written under Windows labview to Linux Labview (6.1). When using the Open/Create/Replace vi in windows if I use a pattern of "*.abc" and enter "123" in the dialogue box a file called "123.abc" will be created which is what I would expect. The same operation under Linux will create a file called "123" without the extension. Is this normal and is there a way of making the linux version behave in the same way as the windows version?

    Sorry about the delay - vacation.
    There appears to be no check box under Linux to use native file dialogs although it does indeed exist under windows. In fact the linux version does use linux file dialogs by default. It seems that the only options are to force the windows version to behave like the the linux version - which is counter intuitive, or write a new file dialog vi for linux.

  • DSC powershell xwindowsprocess to execute batch file under different user account

    DSC powershell run under "NT AUTHORITY\SYSTEM".
    I am trying to execute a batch file under different user account using xwindowsprocess in DSC resource kit.
    I created a custom dsc resource with 3 parameters namely Exepath, Arguments, Credential.
    I received those parameter values in settargetresource method.
    CallPInvoke
    [Source.NativeMethods]::CreateProcessAsUser(("$ExePath "+$Arguments), $Credential.GetNetworkCredential().Domain, $Credential.GetNetworkCredential().UserName, $Credential.GetNetworkCredential().Password)
    I tested it by invoking a batch file and writing username under which it executes to a text file.
    After executing, the output text file still contains the "Systemname$".

    Configuration Sample_xService_ServiceWithCredential
    param
    [string[]]
    $nodeName = 'localhost',
    [System.String]
    $Name,
    [System.String]
    [ValidateSet("Automatic", "Manual", "Disabled")]
    $StartupType="Automatic",
    [System.String]
    [ValidateSet("LocalSystem", "LocalService", "NetworkService")]
    $BuiltInAccount="LocalSystem",
    [System.Management.Automation.PSCredential]
    $Credential,
    [System.String]
    [ValidateSet("Running", "Stopped")]
    $State="Running",
    [System.String]
    [ValidateSet("Present", "Absent")]
    $Ensure="Present",
    [System.String]
    $Path,
    [System.String]
    $DisplayName,
    [System.String]
    $Description,
    [System.String[]]
    $Dependencies
    Import-DscResource -Name MSFT_xServiceResource -ModuleName xPSDesiredStateConfiguration
    Node $nodeName
    xService service
    Name = $Name
    DisplayName = $DisplayName
    Ensure = $Ensure
    Path = $Path
    StartupType = $StartupType
    Credential = $credential
    $Config = @{
    Allnodes = @(
    Nodename = "localhost"
    PSDSCAllowPlainTextPassword = $true
    #Sample Scenarios
    $credential = Get-Credential
    Sample_xService_ServiceWithCredential -ConfigurationData $Config -Name "Sample Service" -DisplayName "Sample Display Name" -Ensure "Present" -Path "C:\DSC\TestService.exe" -StartupType Automatic -Credential $credential
    ¯\_(ツ)_/¯

  • Jar files as application Error under linux

    I created a jar file with the following jar command
    jar cmf mainclass Asdi2GuiJar.jar *.class
    Main-Class: ASDIGUI
    It did work without any problem : java -jar Asdi2GuiJar.jar
    when I added to the CLASSPATH under linux "Redhat 7.2" C-shell, it give me an error:
    Exception in the thread main java.util.zip.ZipException: No Such file or directory
    even im not using any zip file class in my java application. Any idea why im getting such an error even before addding the jar file to the CLASSPATH it did work without any problem?

    ah young grasshopper you are using zip files :) rename your .jar file a .zip and use unzip on it :)
    and that error means that the jvm's classloader couldn't load it's zip component so it's likely that your jvm can't find it's standard lib's
    make sure your class path points to the /lib directory of your java install..... which version of the jdk are you using?
    are you setting the classpath globally? since the way you said CLASSPATH I guess you are... ....are you keeping the old classpath when you set it? like CLASSPATH=$CLASSPATH:/myNewSource
    or something like that...
    maybe something in that will help

  • Problem of executing a process under Linux using Runtime.exec

    Hi, All
    I am having a problem of executing a process under Linux and looking for help.
    I have a simple C program, which just opens a listening port, accept connection request and receive data. What I did is:
    1. I create a script to start this C program
    2. I write a simple java application using Runtime.exec to execute this script
    I can see this C program is started, and it is doing what it supposed to do, opening a listening port, accepting connection request from client and receiving data from client. But if I stop the Java application, then this C program will die when any incoming data or connection request happens. There is nothing wrong with the C program and the script, because if I manually execute this script, everying works fine.
    I am using jre1.4.2_07 and running under Linux fedora 3.0.
    Then I tried similar thing under Windows XP with service pack2, evrything works OK, the C program doesn't die at all.

    Mind reading is not an exact science but I bet that you are not processing either the process stdout or the stderr stream properly. Have you read http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html ?

  • Cannot install JMF under Linux Mandrake 10

    I simply cannot install JMF under the Mandrake 10 Official Linux distribution. I downloaded the jmf-2_1_1e-linux-i586.bin file and tried to execute it as root. It unzipped some files then showed me an error message about AWT and GTK+. I found a hack consisting of modifying the .bin file to have the PATH variable point to SUN JDK, the error does not show up, but the installation still does not work. In fact, the installation works, but the Diagnostics applet keeps telling me than class files are not present. My Mozilla 1.6 Java plugin is working and displaying the applet. My JMF lib directory does not contain sound.jar, such jmf.jar. I set the CLASSPATH and LD_LIBRARY_PATH according to the readme.html file. I would like to know if it is a compatibility problem with Mandrake 10, the 2.6 kernel or if JMF just DO NO work under Linux. In the latter case, JMF is a violation to the Java portability philosophy and I would never use it on my own initiative, just if I were asked to.
    After the files are unzipped, I have the following warning and error messages.
    Warning:
    Name: HorScrollBar
    Class: XmScrollBar
    The specified scrollbar value is greater than the maximum
    scrollbar value minus the scrollbar slider size.
    JavaSound Capture Supported = true
    JavaSoundAuto: Committed ok
    java.lang.Error: Can't open video card 0
    java.lang.Error: Can't open video card 1
    java.lang.Error: Can't open video card 2
    java.lang.Error: Can't open video card 3
    java.lang.Error: Can't open video card 4
    java.lang.Error: Can't open video card 5
    java.lang.Error: Can't open video card 6
    java.lang.Error: Can't open video card 7
    java.lang.Error: Can't open video card 8
    java.lang.Error: Can't open video card 9
    Done.
    Even if I do not have a working video capture card (I have an ATI All-in-Wonder 128 but it is not working under 2.6 kernel), JMF should work because some people do not have a video capture card. I also tried with the cross-platform ZIP file, but this one does not contain sound.jar either and the Diagnostics applet keeps complaining about missing class files. I tried to search on the Web for solutions to this problem or for a way to change the CLASSPATH used by the Mozilla Java plug-in (if it uses a different CLASSPATH than the one from the environment variable), but nothing, nothing. Is there a distribution from which JMF would work better than Mandrake 10? Or can JMF work only under Microsoft Windows or Sun Solaris? I also tried Blackdown, but a README file directed me to the Sun's page, nothing to download here about JMF.

    well, your not the only one.
    I have it working in Debian, and JDS.(JMF is setup automatically in JDS).(2.6.6 kernel)
    I looked at the installation structure of JDS, and was able to duplicate what they did for Debian.
    Maybe it will work for Mandrake two??
    ok, all you have to do is copy or create soft links from your Mozilla directory, just like you did with the java plugin, and link to all the *.so files in JMF-2.1.1e/lib directory.
    Should work.
    I also read that not haveing the native files only matters if you are doing Capture. not play.
    to get your ATI All-in-Wonder 128 to work, make sure you install the correct driver, and have it working under linux, then try it in JMSTUDIO

Maybe you are looking for

  • Native library loading problem

    Hi Folks, I currently downloaded, and compiled the bDB core using VS 2010 x64 (I run 64 bit win7, and JRE 64 bit). In Eclipse I'm trying to use the native library (setting up the path correctly), however the java is complaining that it cannot find de

  • Removing unchecked call warnings

    I have moved from 1.4.2 to 1.5.0 today, and now I'm trying to solve all the unchecked call warnings that I had in the code, but I have one that I don't know how to avoid it. I need a matrix of nxn dimensions where every element is an Integer. I was c

  • Help for Delete command syntax

    1. When i use command: select * from families f, type_family t where f.family_name = t.family and f.type_id != t.type_id I get the output successfully. 2. But I want to run a command like: Delete from families f, type_family t where f.family_name = t

  • Validate signature automatically on Adobe Reader X

    Hi! Adobe Reader 9 auto validates the document signature without doint nothing (only opening the pdf). With Adobe Reader X the signature appears with a green tick but it says "Signature not verified", and I need to click on it to verify it. The certi

  • Redownload server

    I wiped my drive and need to reinstall Lion Server. It no longer shows up as a purchased app in App Store. How do I reinstall it? Thanks.