executable

what's in a .exe file?

不问归期 提交于 2019-11-28 03:04:39
So a .exe file is a file that can be executed by windows, but what exactly does it contain? Assembly language that's processor specific? Or some sort of intermediate statement that's recognized by windows which turns it into assembly for a specific processor? What exactly does windows do with the file when it "executes" it? MSDN has an article " An In-Depth Look into the Win32 Portable Executable File Format " that describes the structure of an executable file. Basically, a .exe contains several blobs of data and instructions on how they should be loaded into memory. Some of these sections

How to run SWI-Prolog from the command line?

假如想象 提交于 2019-11-28 02:59:56
问题 Is there a way to just create a prolog script called hello.pl like this: #!/usr/local/bin/swipl -q -s -t main main:- write('Hello World\n'). And be able to run it from the terminal like this? $ hello.pl Hello World $ When I do that it gives me this: hello.pl: line 3: main:-: command not found hello.pl: line 4: syntax error near unexpected token `'Hello World\n'' hello.pl: line 4: ` write('Hello World\n').' I am able to get it working by writing this on the command line: $ swipl -q -f hello.pl

NullPointerException when trying to run .jar file

夙愿已清 提交于 2019-11-28 01:52:38
I have just started learning java, and know only a small amount of code, however this is still a simple program. It is more of a prank program, but mostly just to test if I can make a jar file. Here is the code: import java.awt.*; import java.awt.event.*; import java.lang.*; import java.util.Random; public class randommouse { public static void main(String[] args) { for (int i=1; i<1000; i++) { Random rand = new Random(); int w = rand.nextInt(1024) + 1; int h = rand.nextInt(768) + 1; int t = rand.nextInt(2000) + 1; try { Robot r = new Robot(); r.mouseMove(w,h); Thread.sleep(t); } catch

How can i execute an executable from memory?

无人久伴 提交于 2019-11-28 00:49:56
问题 Let's say I have included a binary into my program during compilation so, I keep it in a variable something like var myExec =[]byte{'s','o','m','e',' ','b','y','t','e','s'} So my question is whether there is a way to execute this binary within my program without writing it back to the disc and calling exec or fork on it? I am writing my app in Golang so the method I am seeking for is to do it using Go or C (using CGO). Basically, I am seeking something like piping the bash script into bash

Showing JPG image with Qt does not work with release executable

♀尐吖头ヾ 提交于 2019-11-28 00:20:25
i have a annoying issue with showing jpg images with qt. I devlope with Visual Studio 2008 in Windows 7 and using the Qt version 4.8.2. I will now describe my problem by means of the "collidingmice" example deliverd with Qt (../examples/graphicsview/collidingmice). I can build this example via Visual Studio IDE or with via the Visual Studio command prompt. In this example a jpg is used as background and is correctly shown when I execute the debug executable. But in release build this background jpg is not shown. I already realized, that Qt uses plugins for loading/showing different images.

How to include text files with Executable Jar

爷,独闯天下 提交于 2019-11-27 23:41:38
Hi guys rookie Java question. I have a Java project and I want to include a text file with the executable jar. Right now the text file is in the default package. InputFlatFile currentFile = new InputFlatFile("src/theFile.txt"); I grab the file with that line as you can see using src. However this doesn't work with the executable jar. Can someone please let me know how to keep this file with the executable jar so someone using the program can just click a single icon and run the program. Thanks! The base directory in the jar file is in the classpath. Try InputFlatFile currentFile = new

how can I create executable file for the program written on Java?

无人久伴 提交于 2019-11-27 22:36:48
everyone, how can I create executable file for the program written on Java in Eclipse Helios? I mean to create small icon to be able start program only by double-clicking on its icon, thanks in advance edited I mean executable for Windows Export .jar in eclipse. (how to) Use JSmooth (info) to make an .exe file. (how to) Here is a tutorial that shows you how to make a jar file from eclipse. If Java is installed on the computer, you can execute your application by doubleclicking the jar file: http://ecs.victoria.ac.nz/Courses/COMP205_2009T1/TutorialEclipseExportToJar You didn't mention what

Why does the PLT exist in addition to the GOT, instead of just using the GOT?

丶灬走出姿态 提交于 2019-11-27 21:36:12
I understand that in a typical ELF binary, functions get called through the Procedure Linkage Table (PLT). The PLT entry for a function usually contains a jump to a Global Offset Table (GOT) entry. This entry will first reference some code to load the actual function address into the GOT, and contain the actual function address after the first call (lazy binding). To be precise, before lazy binding the GOT entry points back into the PLT, to the instructions following the jump into the GOT. These instructions will usually jump to the head of the PLT, from where some binding routine gets called

How can I convert a VBScript to an executable (EXE) file? [closed]

本秂侑毒 提交于 2019-11-27 20:37:10
I'd looked around for information to convert a VBScript (*.vbs) to an executable and realised that most of the tools available are actually wrapping the script in the executable. Tried a few tools and it didn't worked as well as expected. I tried IExpress (in Windows XP) to create the Win32 self extraction cab file but it didn't invoke properly on Windows 7 machines. So I am looking for a way to compile the vbs into exe. I am trying to port my current script into VB Express 2008 but I have no prior knowledge of Visual Basic here. There are a lot of errors but I am still trying around. Can

How To Store Files In An EXE

拜拜、爱过 提交于 2019-11-27 20:11:01
问题 Alright, so I'm working on programming my own installer in C#, and what I'd like to do is something along the lines of put the files in the .exe, so I can do File.Copy(file, filedir); Or, if this isn't possible, is there another way of doing what I am attempting to do? 回答1: I wouldn't code my own installer, but if you truely want to embed files into your assembly you could use strongly typed resources. In the properties dialog of your project open up the "Resources" tab and then add your file