Questions tagged [platform-independence]

14 questions
33
votes
2 answers

Can I find out what variable java.library.path maps to on the current platform?

So far I've learned the following about the java.library.path property: It's used when loading native libraries, as opposed to java classes Its default value depends on the operating system: On Windows, it maps to PATH On Linux, it maps to…
Charlie
  • 819
  • 3
  • 12
  • 17
29
votes
3 answers

Passing environment variables to a JVM, in a platform-independent manner

I'm developing a J2EE application that runs in JBoss on a Windows Vista machine, but the application will end up on a Linux machine. Is there a way to pass in the value of an environment variable in a platform independent way? I think (but I'm not…
Matt Ball
  • 354,903
  • 100
  • 647
  • 710
27
votes
9 answers

How does program execute? Where does the Operating Systems come into play?

A program is compiled from some language to ASM --> Machine Code (directly executable). When people say that this is platform dependent, the mean that the binaries formed will run (correctly) only on the CPUs with same Instruction Set Architecture…
5
votes
1 answer

vs code consistent keybindings for Mac and windows with settings sync

I use a windows computer for work and have painstakingly set up many keybindings for common tasks, as well as many other personalizations I really would like to have transferred to my personal computer, which is a Mac. I recently found out about and…
2
votes
1 answer

How to include a text file along with a crate installation

My program works as expected with my local machine. It prints random lines from a text file in the vein of the Emacs "Spook" amusement (M-x spook). The text file is located in src/spook.lines. C:\Users\datan>spooks domestic Eiffel Tower Euzkadi Ta…
Niklas Rosencrantz
  • 25,640
  • 75
  • 229
  • 424
2
votes
1 answer

OS independent method to find a file fast with Python

With Python, how do I search for a file in a directory (including subdirectories) fast? The standard answers here utilize os.walk(), which is slow compared to just calling find /path -iname "*string*", if working under Linux. Is there a clean…
viuser
  • 953
  • 6
  • 19
2
votes
2 answers

Platform independent way to fire off external applications/helpers by file type?

For example, one application that I'm working on stores PDF files into a database, then can pull them back out for display. I've got a call in there using Runtime.exec to do a "cmd /c start " plus the PDF filename. Works great for Windows. Would…
Brian Knoblauch
  • 20,639
  • 15
  • 57
  • 92
1
vote
1 answer

Platform independent parallelization without changing the framework?

I hope the title did not mislead you. My problem is the following: Currently I try to speed up a raytracer and this is done with the help of the graphics card. It works fine despite the fact that it got slower by this. :) This is caused by the fact,…
1
vote
1 answer

How is Python platform independent?

I know that Python is platform independent, but I don't understand how that works for CPython. If the interpreter and some of the modules are written in C, aren't those going to be platform dependent?
Bee
  • 195
  • 1
  • 3
  • 12
1
vote
1 answer

Relevance of the term 'Platform Independent' in context of programming languages

Maybe I am asking a very obvious and stupid question here, but I couldn't get anything on Google so here I go: Why there is so much gung-ho about the fact that Java is Platform Independent and some other languages aren't. I mean, the total…
0
votes
3 answers

System-independent machine shutdown in Java

Possible Duplicate: Shutting down a computer using Java I am making a personal program that will shut down my computer after a certain amount of time or at a certain time/date. However, I am running multiple operating systems and want to do this…
Ky -
  • 30,724
  • 51
  • 192
  • 308
0
votes
1 answer

Native methods and platform independency

Here's a comment extracted from source code of Java's public static native long currentTimeMillis() method of java.lang.System class. * Returns the current time in milliseconds. Note that * while the unit of time of the return value is a…
JSN
  • 2,035
  • 13
  • 27
0
votes
0 answers

Platform independent delay timer

Problem I originally posted this question which was apparently something that did not meet my customer spec. Hence I am redefining the problem: To understand the problem a bit more, the timing diagram on the original post can be used. The delayer…
ha9u63a7
  • 6,233
  • 16
  • 73
  • 108
0
votes
1 answer

How many java supported platforms are there?

I am designing a library that is going to use native code, but i plan on making it cross platform. I was wondering how many different versions i would have to write to support each native implementations such as windows, linux, mac osx.
Popgalop
  • 737
  • 2
  • 9
  • 26