portability

Portable JRE on Linux - possible?

隐身守侯 提交于 2020-01-14 22:45:30
问题 I am making a remastered distribution that was at first packed with Sun Java, however I decided I would like Java to run from a folder on the hard drive with my application instead. I see there's a portable Java for Windows - how can I do this with Linux? I haven't tried simply putting the whole folder in there but that seems like an ugly hack, and I'm not sure if there are other files in the Java install that need to be put in system directories. 回答1: On Linux you download jre-6u21-linux

Portability vs Platform Independent

断了今生、忘了曾经 提交于 2020-01-14 05:27:53
问题 Can someone explain me difference of these? If the program is platform independent doesn't it make it portable too and the opposite? 回答1: Platform independent means, these programs can run in "nearly" all operating systems. Doesn't need to be all, but at least MS, Linux and Mac will be fine to use this word. And, lets dig out the facts behind the word "platform independent". NOTE: The following sentences are my opinions. If anyone read, couldn't understand the logic behind or doesn't like,

How To Use A Relative Path For The Eclipse Workspace

拜拜、爱过 提交于 2020-01-14 04:23:22
问题 Whenever I move the Eclipse folder to another location, it would completely reset unless I switch the workspace manually. It seems to use an absolute path, but I want a relative one to actually make it fully portable. Any way of doing this? Where do I find the workspace path I've set? As a side note, referenced libraries inside projects must use relative paths to prevent a re-configuration. 回答1: If your workspace is relative to your eclipse folder then try adding this to the config.ini using

Why does this simple threaded program get stuck?

本秂侑毒 提交于 2020-01-13 13:31:59
问题 Take a look at this simple Java program: import java.lang.*; class A { static boolean done; public static void main(String args[]) { done = false; new Thread() { public void run() { try { Thread.sleep(1000); // dummy work load } catch (Exception e) { done = true; } done = true; } }.start(); while (!done); System.out.println("bye"); } } On one machine, it prints "bye" and exits right away, while on another machine, it doesn't print anything and sits there forever. Why? 回答1: This is because

Why does this simple threaded program get stuck?

情到浓时终转凉″ 提交于 2020-01-13 13:31:08
问题 Take a look at this simple Java program: import java.lang.*; class A { static boolean done; public static void main(String args[]) { done = false; new Thread() { public void run() { try { Thread.sleep(1000); // dummy work load } catch (Exception e) { done = true; } done = true; } }.start(); while (!done); System.out.println("bye"); } } On one machine, it prints "bye" and exits right away, while on another machine, it doesn't print anything and sits there forever. Why? 回答1: This is because

C++ Process Management [closed]

半城伤御伤魂 提交于 2020-01-13 11:15:28
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 months ago . Is there a well-known, portable, good library for C++ process management? I found a promising library called Boost.Process, but it's only a candidate for inclusion in the Boost library. Has anyone use this? Does anyone know why it isn't a part of Boost? 回答1: How much management do you need? Just fork/exec? IPC?

How to create a temporary file with portable shell in a secure way?

三世轮回 提交于 2020-01-12 07:33:31
问题 I want to create a temporary file in POSIX shell ( /bin/sh ). I found out that mktemp(1) doens't exist on my AIX box, and according to How portable is mktemp(1)?, it isn't that portable and/or secure anyway. So, what should I use instead ? 回答1: Why not use /dev/random ? It could be neater with perl but od and awk will do, something like: tempfile=XXX-$(od -N4 -tu /dev/random | awk 'NR==1 {print $2} {}') 回答2: You didn't exactly define "secure", but one element of it is probably to clean up

SQL portability gotchas

心已入冬 提交于 2020-01-11 19:53:52
问题 My company has me working on finishing a back end for Oracle for a Python ORM. I'm amazed at how much differently RDBMSes do things even for the simple stuff. I've learned a lot about the differences between Oracle and other RDBMSes. Just out of sheer curiosity, I'd like to learn more. What are some common "gotchas" in terms of porting SQL from one platform to another? Please, only one gotcha per answer. 回答1: Oracle does not seem to have a problem with cursors, they are a huge performance

SQL portability gotchas

北城以北 提交于 2020-01-11 19:53:44
问题 My company has me working on finishing a back end for Oracle for a Python ORM. I'm amazed at how much differently RDBMSes do things even for the simple stuff. I've learned a lot about the differences between Oracle and other RDBMSes. Just out of sheer curiosity, I'd like to learn more. What are some common "gotchas" in terms of porting SQL from one platform to another? Please, only one gotcha per answer. 回答1: Oracle does not seem to have a problem with cursors, they are a huge performance

pygame not working with portable python

房东的猫 提交于 2020-01-11 10:21:51
问题 I'm trying to get pygame working with portable python 3.2.1.1 running off a USB stick, but when I use the following code: import pygame, sys It says: ImportError: No module named pygame My understanding was that pygame came embedded in portable python. Can anyone help? 回答1: Pygame does not come embeded in portable python 3.2. Tho it comes in the 2.7 version. Sources: http://portablepython.com/wiki/PortablePython3.2.1.1 - 3.2 (No pygame here!) http://portablepython.com/wiki/PortablePython2.7.3