I usually use chilkat library () develop only with windows. but this library have each library file for each platform, and today I have to do it cross platform.  Example   Windows x64 use win64.dll Windows x84 use win32.dll Linux x64 use linux64.so Linux x32 use linux32.so Max OSX use osx.jnilib    This my source code for include chilkat library when use windows only.  static {     try {         System.loadLibrary("lib/win64");     } catch (UnsatisfiedLinkError e) {         try {             System.loadLibrary("lib/win32");         } catch (UnsatisfiedLinkError e2) {             System.err.println("Native code library failed to load.\n" + e2);             System.exit(1);         }     } }   And now I no idea. How include each library file on java application for cross platform ?  Please guide best way to me.  Thank you.  Edit1: sorry for confusion. i know how find os.name on runtime. but this question i mean how include each library file for run each platform.
2167
I would like to determine the operating system of the host that my Java program is running programmatically (for example: I would like to be able to load different properties based on whether I am on a Windows or Unix platform). What is the safest way to do this with 100% reliability?
59417
I'm using code that I found on the .  The only problem is it uses external DLL calls that don't work in mono.  I was wondering if anyone knew of a way to accomplish the same thing as that code, but will run in both Windows using .net, and Linux using mono?  Edit:  Clarifying what I'm trying to do: I'm making a .  The program sits in the system tray and when the user presses the hot-key, it will pop up all the gadgets.  So the program doesn't have focus, so typically it won't catch any keystrokes, so I'm using the low-level keyboard hook and I hook the two keys that the user defines as the hot-keys.  But I'm using a Windows DLL call for that, which doesn't work in Linux using mono.  So I'm wondering if there's a way to do the same thing, but will run in Linux using mono?
24106
msvcr71.dll is missing on Windows 7 and I can't register my dll throw regsvr32  I just can't understand why it can happen Does this dll come with OS, or I can install C++ runtime libraries, or .NET framework to present this file in Windows?  The question is: what (C++ runtime/NET framewor/...) have I to download to present this file in Windows 7?
17432
On the Windows platform, most large applications come with their own installer which sets up folders under C:\Program Files, possibly some other places, and perhaps adding some registry keys, etc.  But there's still quite a few tools around that consist of just an .exe or maybe also a README and a .dll or two.  How should I install such tools? Directly in C:\Program Files? All in one subfolder under C:\Program Files? Somewhere under C:\Users\Me? Somewhere totally different?  Or maybe different approaches for the tools with just an .exe to those that also have other files, or maybe only the ones with .dlls need to be treated differenty ...  Is there any standard accepted way to do this? A "best practice"? If the answer depends on the Windows version, I'm using Windows 7.  In particular, what might strike people as the obvious answer seems to have a catch:  I had tried to manually create new subfolders under C:\Program Files. In fact I thought I had done so before, but Windows puts up a dialog Destination Folder Access Denied. This caused me to think twice rather than just blindly click Continue.      On the assumption that greater minds than mine have come up against this many times over the years I'd like to ask the community if some kind of "best practice" has come to be accepted.
100462
I have uninstalled all old versions of the data loader and installed the newest one: 36.0.0  I cleaned up all Java stuff on my 64-bit Win 7 machine and there's only one version left, it's this version (output of java -version):  java version "1.8.0_73" Java(TM) SE Runtime Environment (build 1.8.0_73-b02) Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)   My JAVA_HOME environment variable is C:\Program Files\Java\jre1.8.0_73  If I open a CMD window, the java.exe can be found.  Still, trying to execute data loader results in "This application requires a Java Runtime Environment 1.8.0 (32-bit)"  So, do I really need a 32-bit Java version next to my 64-bit Java version? Is that even possible? Do I need to set up something else? I need the 64-bit version for other apps, I cannot replace it with a 32-bit version (provided that's even possible with 64-bit Win 7).
4740
I would like to monitor the following system information in Java:   Current CPU usage** (percent) Available memory* (free/total) Available disk space (free/total)  *Note that I mean overall memory available to the whole system, not just the JVM.   I'm looking for a cross-platform solution (Linux, Mac, and Windows) that doesn't rely on my own code calling external programs or using JNI. Although these are viable options, I would prefer not to maintain OS-specific code myself if someone already has a better solution.  If there's a free library out there that does this in a reliable, cross-platform manner, that would be great (even if it makes external calls or uses native code itself).  Any suggestions are much appreciated.  To clarify, I would like to get the current CPU usage for the whole system, not just the Java process(es).  The SIGAR API provides all the functionality I'm looking for in one package, so it's the best answer to my question so far. However, due it being licensed under the GPL, I cannot use it for my original purpose (a closed source, commercial product). It's possible that Hyperic may license SIGAR for commercial use, but I haven't looked into it. For my GPL projects, I will definitely consider SIGAR in the future.  For my current needs, I'm leaning towards the following:   For CPU usage, OperatingSystemMXBean.getSystemLoadAverage() / OperatingSystemMXBean.getAvailableProcessors() (load average per cpu) For memory, OperatingSystemMXBean.getTotalPhysicalMemorySize() and OperatingSystemMXBean.getFreePhysicalMemorySize() For disk space, File.getTotalSpace() and File.getUsableSpace()   Limitations:  The getSystemLoadAverage() and disk space querying methods are only available under Java 6. Also, some JMX functionality may not be available to all platforms (i.e. it's been reported that getSystemLoadAverage() returns -1 on Windows).  Although originally licensed under GPL, it  to , which can generally be used for closed source, commercial products.
83307
Some platforms mandate that you provide a list of a shared library's external symbols to the linker. However, on most unixish systems that's not necessary: all non-static symbols will be available by default.  My understanding is that the GNU toolchain can optionally restrict visibility just to symbols explicitly declared. How can that be achieved using GNU ld?
14677
I would like to call python script files from my c++ program.   I am not sure that the people I will distribute to will have python installed.  Basically I'm looking for a .lib file that I can use that has an Apache like distribution license.
73679
I have a Windows forms project (VS 2005, .net 2.0). The solution has references to 9 projects. Everything works and compiles fine on one of my computers. When I move it to a second computer, 8 out of the 9 project compile with no problem. When I try to compile the 9th project (the main project for the application - produces the .exe file to execute the application), I get the following error:   'Error 3: A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)'   The file location for the error is is listed as "C:\PATH-TO-APP\LC".   I have checked in the project properties and all of the projects are set to build in Debug mode, none of them are supposed to be signed. In the project that is failing, the only assembly that it references that is not in any of the other projects is Microsoft.VisualBasic (a .net 2.0 assembly). So I am at a loss to find what ids causing this error (the file referenced above in the error message - "LC" - does not exist.   Anyone know how I can force the project to accept all unsigned assemblies, or to determine which assembly is the culprit?  The only meaningful difference between the dev environments between the dev environment where this worked and the current one is that the first was XP and this is Vista64. However, a colleague of mine who is using XP is getting the same error.  Third-party assemblies being used:   ComponentFactory.Krypton.Toolkit ComponentFactory.Krypton.Navigator VistaDB.NET20   All of these are referenced in other projects in the solution which build with no problems, so it doesn't look like these are the problem.  So far I have tried deleting the suo file, Rebuild All, unloading and reloading projects from the solution, removing and readding referenced assemblies. Nothing has worked.
73988
Everybody knows :-) that in Windows plain text files lines are terminated with CR+LF, and in Unix&amp;Linux - with LF only. How can I quickly convert all my source code files from one format to another and back?
15621
I am using a 32-bit machine, but I am having to use a relatively obscure semantic database which only comes in 64-bit versions.  What are my options for running it in my local dev environment?  Currently when I try to run it, I get an error message that looks like this:  cannot execute binary file   and when I check my machine info, I get this:  $ uname -a Linux slabrams-desktop 2.6.32-29-generic #58-Ubuntu SMP Fri Feb 11 19:00:09 UTC 2011 i686 GNU/Linux
112661
Is it possible to force the C# compiler to pull all the referenced calls out of the framework and pack them into dlls or even a single executable?   I like writing quick 'one-off' applications with C#, however I don't want to have to install the whole framework on the target machine once it's ready to go.
36917
Why did MS originally make the decision to maintain these two separate core libs? Maybe they had some scalability issue in mind, but nowadays I never see an application, of any type, that doesn't need both. Does anyone have any inside information on this? It's not really important, but been on my mind for years.  PS. I know what's in the two libs, I know the difference - I'm a big fan of  :) Just wondering what practical use the separation of the two has.
83161
Is there an IDE which can run on Ubuntu that supports C, C++ and Java? I installed , but it only supported Java. I installed the C/C++ package manually, but that package gives an error if I include iostream.   Is there any other IDE which can satisfy my needs? Or can I get NetBeans with all packages pre-installed in it?
15722
I understand how to define include shared objects at linking/compile time. However, I still wonder how do executables look for the shared object (*.so libraries) at execution time.  For instance, my app a.out calls functions defined in the lib.so library. After compiling, I move lib.so to a new directory in my $HOME.  How can I tell a.out to go look for it there?
85444
I'm not really sure if this belongs on SuperUser or StackOverflow, but it doesn't seem to be a coding problem so I'm gonna run with this.  I've started working on a C++ game using Visual Studio 2013 utilizing FreeGLUT and FreeImage. I can compile and run it on my desktop without issue, but when I try compiling the same code on my laptop I get the error "msvcr110d.dll is missing from your computer." After which there is about a 50% chance that Visual Studio freezes, and I'm forced to restart the computer as Task Manager cannot stop the process (another problem I'm still working on).  Google searches have told me to install Visual C++ Redistributable 2012, however this was already installed on this laptop (both x86 and x64), and reinstalling (from ) has not helped at all. I also tried installing Visual C++ Redistributable 2013 (x86 &amp; x64, from ), but to no avail. Both of those links do feature an ARM download. I'm not sure what that is, and attempting to install it results in a pop-up saying I can't install it on this version of Windows (Windows 8 that is), so I'm assuming I don't need that.  Looking in the C:\Windows\SysWow64 folder, I can see msvcr110.dll but not msvcr110d.dll. It looks like the release version was installed, but not the debug. I do see msvcr120d.dll, which should be the 2013 version right? So shouldn't Visual Studio 2013 be using that, instead of msvcr110d.dll?  Running a standard C++ HelloWorld project doesn't have this issue, so I imagine it must have something to do with FreeGLUT or FreeImage. However it compiles and runs on my desktop without issue, so I believe everything is coded &amp; linked correctly. I've added the include directories, library directories (both of which were debug), and added opengl32.lib &amp; FreeImaged.lib as additional dependencies.  Installing Visual C++ Redistributable hasn't helped, so is there another way of solving this issue? Should Visual Studio 2013 be using msvcr110d.dll at all, or it should be using msvcr120d.dll? Do I need that ARM install from the MSVCR download page? I'm using Windows 8 64 bit (brand new laptop as well so I don't think there's any corruption issues). Thanks in advance for your help.  Doug
592
I know that on a 64-bit version of Windows the "Program Files" folder is for 64-bit programs and the "Program Files (x86)" folder is for 32-bit programs, but why is this even necessary?  By "necessary", I don't mean "why could Microsoft not have made any other design decisions?" because of course they could have. Rather, I mean, "why, given the current design of 64-bit Windows, must 32-bit programs have a separate top-level folder from 64-bit programs?" Put another way, "what would go wrong if I somehow avoided the redirection mechanism and forced everything to install to the real C:\Program Files\?"  There are plenty of questions on Super User and elsewhere that assert "one is for 32-bit programs, one is for 64-bit programs", but none that I can find give the reason. From my experience, it doesn't seem to matter whether a 32-bit program is installed in the correct place or not.  Does Windows somehow present itself differently to a program running out of "Program Files (x86)"? Is there a description that shows exactly what's different for a program installed in "Program Files (x86)" instead of "Program Files"? I think it's unlikely that Microsoft would introduce a new folder without a legitimate technical reason.