executable

Creating Jar file - doesn't work on other computers

﹥>﹥吖頭↗ 提交于 2019-12-07 04:59:07
问题 I'm trying to package my program into a JAR file so it can be used on multiple computers. My program is composed of start.java , userinterface.java and writer.java . The program, written in Eclipse, works perfectly on my computer. When exported, it will work on my computer but cause the following error on other computers: "Could not find the main class: start. Program will exit". Again, my program runs fine on my computer when I double click on it. I've tried creating the JAR file via command

Objective C - How to check if Executable can be launched (eg. terminal)

被刻印的时光 ゝ 提交于 2019-12-07 02:38:30
I am currently building an Executable handling application in Objective C and I just wanna know a simple code that can determine if an executable file can be launched (without launching it) or if it is just a loadable one. Thanks. Once you've taken care of permission bits and whether the file is a Mach-O, there are three things you need to consider: File type CPU compatibility Fat binaries File type Whether your Mach-O is an executable, dylib, kext, etc., can be determined from a field in its header. From <mach-o/loader.h> : struct mach_header { uint32_t magic; cpu_type_t cputype; cpu_subtype

Making a Ubuntu executable

╄→尐↘猪︶ㄣ 提交于 2019-12-06 23:32:24
问题 i have made a program in C using the gcc compiler. Right now it has no GUI components. I am compiling it with makefile and running it in the terminal. I need to deploy it so that the executable is standalone. I want the executable to have an icon and when clicked start the program in the terminal. Can anyone tell me how to do this? 回答1: The basics (disclaimer: the following was tested with kubuntu, you might need to make some adjustments for your system) Actually there is a standard to do

Running a perl script on windows without extension

ε祈祈猫儿з 提交于 2019-12-06 21:35:57
问题 I am trying to find a way to register the files with extension .pl as executables. I spent some time on the web looking for a solution, but I couldn't find anything. What I can do: I made a script, let's call it myscript.pl I can run it like this : perl myscript.pl [my_script_parameters] Now since the file is associated with perl, I can also run it as: myscript.pl [my_script_parameters] Now, I know that there is somewhere a list of extensions that are considered as executables (.exe, .bat,

Using Py2Exe without command line

陌路散爱 提交于 2019-12-06 21:10:33
Is it possible to compile a python script with py2exe without calling py2exe from the command line? >Python setup.py py2exe I'd like to run it all from a script, but haven't found a way to do so. at the beginig of the setup.py import sys if len(sys.argv) == 1: sys.argv.append("py2exe") this way, if setup.py is called without args or with a double click, it will start the packaging 来源: https://stackoverflow.com/questions/15551527/using-py2exe-without-command-line

What, if any, are the implications of compiling objects with gcc -fPIC flag if they get used in executables?

一曲冷凌霜 提交于 2019-12-06 20:14:32
问题 I am putting together a makefile for a project i am working on. I have an executable and a shared library in the project. Both use some of the same source files which get compiled separately into object files. To be able to use these objects in the shared library I need to use the -fPIC (position independent code) flag in gcc. Are there any implications of compiling objects with -fPIC that get used in a executable? 回答1: Compiling position-independent code when not necessary is a performance

Maven plugin to create executable jar with dependencies not unpacked (jar with jars)

試著忘記壹切 提交于 2019-12-06 19:09:02
问题 I read a lot of solutions to build executable jar with dependencies (maven shade plugin, maven dependency plugin, maven assembly plugin) and all of this plugins unpack dependency jars and repack them in executable jar. The only plugin that pack dependency jars unpacked in executable jar is one jar plugin but this plugin add its runner code in executable jar. Is there any solution to create jar like this: ├─executable.jar ├──lib/ ├───dependency1.jar ├───dependency2.jar . . . and that solution

How to generate the backtrace by looking at the stack values?

半城伤御伤魂 提交于 2019-12-06 15:27:50
This question was migrated from Unix & Linux Stack Exchange because it can be answered on Stack Overflow. Migrated 8 years ago . Quiz : How to generate the backtrace by looking at the stack values? 0xf3e2de34 f3e2de70 c0135351 401ef021 00000000 p.bsQS...p...... 0xf3e2de44 f3e2de81 00000021 f3e2c000 f7950924 ..bs......bs...w 0xf3e2de54 00000000 401ef000 00000246 00000246 .....p..F...F... 0xf3e2de64 00000001 00000001 f7950000 f3e2df18 ...........w..bs 0xf3e2de74 c02898b5 322d7875 23203235 00007820 5...ux.252...x.. 0xf3e2de84 f3e2de98 00000000 f7950bd0 bffff0ec ..bs....P..wlp.. 0xf3e2de94

python multiple threaded processes for running executables

北城以北 提交于 2019-12-06 14:12:25
I am trying to upgrade a python script that runs an executable on windows and manages the text output files to a version that uses multiple threaded processes so I can utilize more than one core. I have four separate versions of the executable which each thread knows to access. This part works fine. Where I run into problems is when they are running simultaneously and try to open the (different) output files to ensure they ran correctly and react depending on the contents of the output file. Specifically, when running three threads, two will crash with the following error, while one continues

Using a Windows path within Python's subprocess (point to an executable) [beginner]

丶灬走出姿态 提交于 2019-12-06 10:38:48
问题 I started developing a small pdf to jpg script on a Windows 7 x64 machine with cygwin installed (Python 2.7). The following works perfectly: import subprocess filename = "test" subprocess.check_output('gs -sDEVICE=jpeg -dPDFFitPage -g2800x3620 -o ' + filename + '-2800-%03d.jpg ' + filename + '.pdf', stderr=subprocess.STDOUT) After pulling this project on my Windows 10 x64 non-Cygwin machine (Python 2.7), this code errors as it no longer recognizes "gs" as a built-in short for ghostscript. So