cross-platform

How can I get system user documents, pictures, music folders independent of OS using Java?

半城伤御伤魂 提交于 2019-12-08 03:09:45
问题 While I was working on my project I received a requirement: I need to get the system user documents folder (like “My Documents” for Windows and “Documents” for Linux and Mac OS X). I need to get it for all the operating systems. How can I do this? I can get the user root directory by using System.getProperty("user.home") . I need a solution for this requirement using Java. 回答1: The location of the default system "Documents" or "Pictures" folder is highly operating-system dependent,

Apple deprecating Java. Will Apple-specific customizations still work with other JREs/JVMs?

泄露秘密 提交于 2019-12-08 02:34:24
问题 Apple "deprecated" Java and will stop supporting it in the future. Assuming that Oracle will take over support for Java on the Mac, is there a way to be sure that Apple-specific hacks like those "put the menubar at the top of the screen" or "use the native theme by default" will be supported the same way on other JREs/JVMs targeting Apple's platform? Is there some industry standard or precedence how situations like these are handled or is this an additional burden for the individual developer

Is there any cross platform file IO / path util library for C?

限于喜欢 提交于 2019-12-08 01:42:38
问题 Is there some C library that implements platform independent version of path operations? Some examples that come to mind: Getting the absolute path from a relative one (without requiring the file to exist) Ensuring a directory exists. Creating a file if non-existent, and any directory in the given path that is missing. Concatenating paths. Getting directory part of path. Getting filename part of path. Lots more.... There are of course platform specific versions of these, but they hardly ever

Supporting SWT on Windows/Mac & 32bit/64bit

爱⌒轻易说出口 提交于 2019-12-08 01:38:35
问题 I'm currently working with the DJProject to put a browser into my Java Swing application. DJProject uses SWT to run and I have very little experience with SWT. I want to support Windows and Mac both 32bit and 64bit. I understand there is a swt.jar file for each of these platforms. I have all 4 swt.jar libraries added to my classpath as a library to the main application. My problem is when I try running the application on a Mac for example I get the error: Exception in thread "main" java.lang

Creating installers for complex cross-platform programs

老子叫甜甜 提交于 2019-12-08 00:33:11
问题 I'm sketching an application deployment process for a bunch of relatively complex desktop applications. We have both native and Java apps, so the deployment must be able to check for existence of the JRE and install it if needed. Some of the apps depend on special hardware, so the deployment must also be able to launch the necessary driver installers. Some of the apps are multiplatform, and preferably the same mechanism should be able to create Windows, Linux and Mac OS X installers. That is:

Run a C executable in another distro

南楼画角 提交于 2019-12-07 22:41:07
问题 I have a C program that I'm developing using Ubuntu 11.10 (Linux version 3.0.0-12-generic-pae kernel). I need to run that program in a cluster that has Debian 3.1 (Linux version 2.4.24-om2) installed, and uses Intel(R) Pentium(R) 4 CPU 3.20GHz processors. The problem is that I can't compile in the Debian cluster because it doesn't have installed the GSL library that my program needs, and I don't know how to install it (or make use of it) without root privileges. If I try to run the executable

How to set ContentPage orientation or screen orientation on particular page in Xamarin.Forms cross platform

99封情书 提交于 2019-12-07 19:31:37
问题 How to set Content-Page orientation or screen orientation on particular page in Xamarin.Forms cross platform. I have set ScreenOrientation = ScreenOrientation . Portrait at property of all platform but I want to show some page show in both variation means Portrait and Landscape, so how to set on page in `xamarin.forms. set screen orientation not device wise but set on page-wise some pages show in Landscape & some page show in Portrait in xamarin forms cross- platform 回答1: You can do this by

Perl command or module like Linux “file” command

走远了吗. 提交于 2019-12-07 17:58:43
问题 I have a script that downloads files but these files do not have any information about them before they are downloaded. While writing for Linux I have just called qx{ 'file ' . $filename } to see if it is a JPEG image an if not delete it. However, I am now trying to rewrite to a platform independent and pure-Perl form. I have turned all the calls to system{ 'curl', $image_website } to LWP::UserAgent calls and I was hoping that there is some way to replace calls to file with something as well.

Should I compile a library from source?

主宰稳场 提交于 2019-12-07 14:47:28
问题 I'm working on an application that will run on a custom-built, debian-based linux system. We have a toolchain so that we can cross-compile the application for the target system, that way we don't have to depend on the host OS (as opposed to target OS) on which we're doing the compilation. I'm not sure, however if we should be cross-compiling the 3rd party libraries from source or whether we should just use the pre-canned libraries and header files. For example, libSDL1.2 seems to be distro

Porting C++ code from Windows to the Mac

丶灬走出姿态 提交于 2019-12-07 14:18:59
问题 I'm a long time Windows developer, and it looks like I'm going to be involved in porting a Windows app to the Mac. We've decided to use Flex/Air for the gui for both sides, which looks really slick BTW. My Windows application has a C++ DLL that controls network adapters (wired and wireless). This is written using the standard library and Boost, so most of it should work cross platform. On the Mac, what IDE/complier do most folks use if they want to write C++? Also, can someone provide a