I have built a program in NetBeans, it creates myprogram.jar file but also creates folder named lib which includes JavaMail's mail.jar file. So I want to send that program to my friend without having to send him lib folder and telling him to put them together. So is there any way I can add all that in single .jar file? Thanks.
So I found this kind of solution, which was wery easy to understand, doesn't include any other program than NetBeans and which worked excellent for me. Here is the link: http://javanepal.wordpress.com/2009/09/15/merging-jar-files-to-single-jar-via-ide-netbeans-6-7/
If i'm not mistaken you cannot add jar files to jars. What you can do is extract the contents of the jars you have (preserving the directory structure) and then jar the resulting directory hierarchy by follow the instructions on how to create jar files
Of course once you figure out the exact commands involved, you could create a batch file to do the work for you again.
Related
I have a project in VC++ MFC and works fine with the .mdb files. But just copying the project's .exe file on other system does not let the project work as it searches for the same path as mentioned in the code for the .mdb files and fails to find one. Also, apart from .mdb files, theres a need for certain .ocx files and io library suite to be registered in the system prior to the project's execution. How to overcome this problem?
You need to wrap up all the files into a package also known as installer. One of the most popular (and free) at the moment is Inno Setup. This will produce a single exe file that you will be deploying to users / other machines. You need to make sure that you include all the needed files, libraries etc in your setup.
Every time I enter lua my_script.lua in command line, it prompts me for lua53.dll on the same folder. How do I set a path so I won't need to have a copy of the lua library in every folder that I want to run a .lua file? I wonder if it is made via parameters or if I should build my own .exe from the .c files using environment variables, but I don't really know.
I've downloaded the binaries from http://luabinaries.sourceforge.net (v5.3.2 - may 19th) and have put lua.exe inside C:/Windows/System32.
According to this MSDN article, the directory from which the application is loaded is the first location being checked for the DLL file. If you put the DLL next to the location of lua.exe it came with, the DLL should be found and loaded by the system.
It may be better to not put application files into your system folders. Just create a separate folder and put your Lua files (.exe and .dll) there. You can then add that folder to PATH environment variable, so that it can be found when you run it as lua.
I'm working on a small installer program (silent install of setup, unzipping, ...).
I wondered how to build everything into one .exe file.
I don't even know HOW to search for that correctly.
Could you tell me some keyword to search for?
E.g.:
I have Setup.exe and Configs.zip for my installer to use.
After compiling I just wanna have 1 file (Install.exe) which has Setup.exe and Configs.zip included and can use them.
You could use resources that is a normal way to store such files. You can extract that files and execute that than from the temp directory.
I've got a project and I'm trying to make it read a .OGG file.
I've downloaded the libogg and libvorbis from here, compiled them (had some trouble figuring I had to build libogg first), then got the following files:
libogg.lib
libogg.dll
libvorbis.lib
libvorbis.dll
libvorbisfile.lib
libvorbisfile.dll
I dragged all of them in my project's Libraries folder, already added to the project, and included them in the Linker->Input (only the .lib).
Next I copied the headers to my project's Includes folder, also already added to the project, with the files:
ogg/ogg.h
ogg/os_types.h
vorbis/codec.h
vorbis/vorbisenc.h
vorbis/vorbisfile.h
Then I added some code, and I get the error "The program can't start because libvorbisfile.dll is missing from the computer."
And I'm pretty sure the file IS in the Library folder and properly defined in the properties.
Did I do something wrong along the way?
How can I figure what is wrong so I can fix it?
I already tried putting the .dll in the project's folder and in the Windows/System32 folder as well, didn't work.
The library folder is fine for your .lib files, but it's looking for the .dll at run time, which your project settings have no effect on. Windows looks in a few places for a .dll, but the easiest way to get your program to run is to put the .dlls in your working directory, which is where ever you run your executable from (probably the same directory as the .exe file).
What I am trying to do is exactly like the instructions on this website:
http://www.cprogramming.com/tutorial/sdl/setup.html
The only problem is that I didn't download the version of Code Blocks that comes with the mingw32 compiler. I got the latest release from http://www.equation.com/servlet/equation.cmd?fa=fortran and installed it in 'C:\gcc'. So, the folders that it is asking me to move files into don't exist.
The article asked me to download this file:
SDL-devel-1.2.15-mingw32.tar
Then in that file move the 'include\SDL' folder into the 'C:\Program Files\CodeBlocks\include'. (I don't have a CodeBlocks\include folder)
It then asked me to move the 'SDL.dll' to 'C:\Windows' which I was able to do.
Finally it wanted me to copy the contents of the 'lib' folder into the 'CodeBlocks\lib' folder. (Another folder I don't have because I installed my compiler separately from the Code Blocks install)
Since I installed my compiler at 'C:\gcc' I tried to add the files into the 'C:\gcc\include' and 'C:\gcc\lib' files, but that didn't work.
I am not very familiar with the process of using 3rd party libraries. I usually use Java where you can just stick the .jar file in with your code. Do I need the .dll, include, and lib files. Where do I actually need to put them? I would also appreciate knowing why as well?