As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Intro
One of the coolest things about Java is that the JRE has a very small footprint as well as being highly portable, so I can run my application on nearly any platform with ease, and without having to integrate into the operating system linked libraries or C:\Windows\System etc - that is, the JRE can be run from within a folder.
.NET struggles in this regard - especially with size. Mono is becoming an ever popular choice but there seems to be too many dependencies that the Operating System needs to have.
Question
Are their any other RUNTIMES/languages (Perl, Ruby) that have this similar functionality that I mentioned above?
Again (1) Portability (2) Multiple OS support (AIX, Solaris, Linux) (3) Size for re-distribution over a network (4) Easy to Install and Deploy.
AIM
I'm looking for a light-weight run time or language that can be deployed on a server as easily as the JRE is.
For example: If I had to use Python, that would require added libraries to be installed on OS etc. Perl would be a good example, found on most Linux but endless hassle of for version and getting a third-party library.
ANSWER!!!!
This was CLOSED because it was thought to not be RELEVANT.
But FYI for those who this may help; outside of JRE, LUA is probably the most portable not requiring dependencies and compiles or system integration.
Ruby is not quite there, although it's default on most Linux (not on BSD)
BSD comes with Lua though :)
Lastly, Jruby is not practical, as it may use the JRE (20MB) and then JRuby itself (16MB).
Some thoughts for someone considering a deploy across multifarious "OS's" and being portable enough to distribute without consuming excessive bandwidth.
Thanks
JVM and .NET are only virtual machines, that interpret bytecode. There are a lot of language on top of them.
JVM
Java
Groovy
Scala
JRuby
Jython
JavaScript (Rhino)
Clojure
etc.
.NET
C#
VB.NET
Nemerle
J#
Boo
IronRuby
IronPython
etc.
There are another VM and script languages that can be run across the platform, i.e. Parrot that is Perl 6 VM or Lua that is X-platform script language (i.e. WoW use it). There are also project like LLVM (Low Level Virtual Machine) but this is still a little bit platform dependent.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Edit:
English is not my native language. Maybe I am not expressing myself clearly enough. How about this:
The BCL for Oracle's JRE clearly states that the license is not applicable for java programs running on single purpose systems, such as TV set boxes or kiosks.
My guess is that there are some commercial kiosks and other types of single purpose systems that are running java programs, and I wonder what JRE's those programs are running on. I mean, statements like 'Amazon are using blablabla operating systems on their super big servers, with millions of users' makes me quite convinced that the blablabla OS is a good and reliable OS. In the same way, I would take comfort in hearing that 'Acme transport company are using IcedTea VM in are there ticket vending machines, and there are hundreds of them spread out all over the world'.
After searching and reading a lot, I am still having a hard time in understanding how well established the use of OpenJDK or some other completely free incarnation of the Java development kit and runtime really is.
Many developers do not seem to regard it a big issue if they run into problems compiling their software with OpenJDK, because they feel they can always switch to Oracle JDK/JRE if they have to.
But what if you really, really do want to build a commercial system based entirely upon free code?
Are there any critical systems out there that use nothing but IcedTea or whatever they are named, along with the usual bunch of third party libraries from Apache and others, that could help to convince me that using OpenJDK would not (edit) lead to a dead end?
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am working on Java for few years but most of the time I work on Windows OS as it is my DEV environment. Now I want to work on Java+Linux environment.
I have installed Ubuntu 12.04, installed Oracle JDK, Eclipse, Netbeans...so far good.
But I am looking for resources/websites/blogs focusing on Java Development On Linux to learn more about how resolve common issues for newbies(like me), any profiling/debugging tools for java apps, tips on log files searching, identifying how many java processes are running, killing a particular java process etc.
By googling I am able to get these details individually... want to know if any websites/blogs exclusively focusing on above mentioned areas?
The good news: Once you are running inside the JVM, Java works in a very similar way on both Windows and Linux - to some degree that is the whole point of a cross-platform language and runtime! So most of your Java experience will be entirely portable.
If you find yourself doing something Linux or Windows specific then you might want to stop and think.... is there a cross-platform way of doing this? In Java there usually is.
As a result the Linux and Windows specific things that you need to know are basically just the stuff that happens outside the JVM, e.g.:
Starting and stopping JVMs
How native libaries are handled
Non-Java-specific stuff like managing the filesystem etc.
Don't have any specific resources for you to follow up, but general Linux sites should help you with most of the above.
The things you are looking for a general purpose UNIX commands and are not specific to Java or even Linux. All the Java command are the same under Windows and Linux and if you use an IDE you don't need to worry about them
any profiling/debugging tools for java apps
Same as Windows. Use the debug button in your IDE for debugging and jvisualvm for profiling or a commercial profiler like YourKit.
tips on log files searching
Use less or grep or both. ;) You can use these in Windows using Cygwin.
identifying how many java processes are running
Use jps -lvm just like in Windows.
killing a particular java process
Use kill {pid}
want to know if any websites/blogs exclusively focusing on above mentioned areas?
I wouldn't imagine there is. Look for common UNIX commands instead.
Actually, There is a lot of tools to debugging java apps on linux.
I have a blog post listing the java related tools that I used for last several years.
http://hunmr.blogspot.com/2012/08/java-performance-tunning.html
and some handy commands:
http://hunmr.blogspot.com/2012/08/handy-commands-for-development.html
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I have a Delphi background, also C++ background. But last several years, I involved in web projects, and worked primarily with PHP. Now I am looking for a platform to develop simple desktop applications (interacts with server). I was thinking of Java as I am used with Eclipse IDE, and have C++ background. But I see Lazarus became a mature environment. its applications even work on Java Virtual Machine. In the past I have seen that some Amateur looking technologies have became popular than professional ones like PHP, Flash even Object Pascal. So should I choose Java, or lazarus for desktop application development.
If you have a C++ background, try the Nokia Qt framework which has everything you want to develop desktop application. the Qt SDK is shipped with its own IDE (which's really great) and rich APIs.
Enjoy :)
Of the two options, I would certainly choose Java (larger support base, more stable, more 3rd party libraries, etc).
You mention that you come from a C++ background. Why not just use C++ (theoretically easier than picking up a new language).
If Lazarus runs on the JVM, it should have access to the same libraries as every other JVM language, so you'd be learning swing, etc.
If you are going to do desktop apps and you want a decent GUI toolkit you really have two choices as far as I know, either go with a JVM language or .net
If you go with a JVM, why in specific Lazurus? There are dozens (well technically hundreds--possibly thousands) of JVM languages to choose from. Go with anything stable that helps you get the job done.
Hmm, that is UNLESS you don't work alone. If you work with others, I suggest Java (or C#) period (Maybe Scala). Otherwise you will have a heck of a time hiring and training.
There are also probably C++ GUI frameworks, even cross-platform sometimes but none will be as rich as everything that is available on the JVM or .net platforms.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I'm going to start building operating system and I don't know which programming language to choose for kernel. My favorite language is Java but I know that all major operating systems (Windows, Linux, Mac OS) is programmed in C, moreover Java requires virtual machine. Does it would be much harder to program than Java-based OS than C-based OS? What are the advantages and disadvantages of each of these languages?
http://wiki.osdev.org is an extremely useful site on that matter. It tells you how to build your toolchains, which language options that are available, and has some great example code.
Yvan
I would humbly suggest that you truly learn a programming language before trying to build an operating system, after which you would realize in which languages you can or cannot write kernels in yourself.
Programming languages such as Java simply does not offer the low-level routines necessary to create an os. You can implement your OS in c or c++. Unless you master bootstrapping code (read assembler) and a programming language such as c, it would be a good idea to reconsider a perhaps easier task.
You could however emulate an OS by running it as a program in another OS, in which case you may experiment with any language of your choise.
Does it would be much harder to program than Java-based OS than C-based OS?
How would you write the hardware-level programming to handle interrupts in Java?
There seem to be several Java-based OSs already out there. I don't know a lot about OS-programming, but there seems to be quite an extensive literature (altough a lot of it in German) about a Java-based OS called JX, from the University of Erlangen: http://www4.informatik.uni-erlangen.de/Projects/JX/publications.html
Maybe there is something there to help.
Writing a C-based OS should be the easiest, though, simply due to there being so much more information about it.
You won't be able to program an OS kernel in Java unless you have access to a compiler that will compile Java into machine language. Java requires a virtual machine which interprets the byte code and executes native instructions (that rely on the kernel). You must be able to interact directly with the hardware in order to program an OS which is something you simply can't do with Java. Your only option, really, is C mixed with assembly.
The JVM provides an awful lot of OS-like capabilities, and it can't be written in Java -- so either way, you're going to end up writing an awful lot of the code in C (or something that can produce code that doesn't require a virtual machine).
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
I am just revisiting C++ and I'm already missing all the java libraries like hibernate and JAXB.
So why are there not a lot of open source libraries as there are in java?
Well, there are, but maybe not the same. That's maybe because C++ programmers have different needs from Java programmers. And sometimes similar libraries exist, but are named differently. There are plenty of XML parsers for C++ too, but of course they are not called Java Architecture for XML Binding.
There are lots of C++ open source libraries. Even only boost in enough, to be proud of being C++ programmer.
There is quite a lot of opensource C++ libraries.
Two examples that you mentioned, have a generic names - one is called ORM - object-relational mapping (of which hibernate is a decent Java example), and the other one is just an XML binder.
C++ tools I use for that purpose:
QxORM (http://www.qxorm.com), based on QtSQL, Boost and works marvellous
boost::serialize for XML serialization
As others have mentioned there are loads of libraries for C++ to do lots of different things but philosophically C (and to a lesser extent c++) are different to Java. The difference is that C (and C++) are a platform enabler. They enable you to program a platform without having to resort to low level assembly but at the same time they give you virtually full access to the said platform. This platform may be some low-level embedded device that does not have a filesystem or even a screen. This will require a very different set of APIs than a normal desktop machine.
It is for this reason that K&R C had NO libraries ISO C has minimal libraries; and it is only relatively recently that projects like Boost are trying to standardize some of the C++ libraries. And even so, some of these "standard" libraries may not be suitable for certain platforms (like kernel development)
Java, however IS the platform. It was written based on the concept of write once run everywhere. This was done by SUN to ensure that Windows x86 did not become the only platform out there. One could write software on Windows x86 and then run it on a SUN SPARC. This required total abstraction from the underlying which in itself requires extensive API support. So even basic J2SE has extensive library support and extensive specifications on how the platform should behave.
So see C and C++ as a platform enabler and Java as a platform.
boost is the equivalent of the java libraries, with lots of different things in it. I don't like the usability of C++ libraries quite as much sometimes, but then, they are way more efficient and you don't get code bloat like you do in java (just running a program a few lines long means loading that 20Mb rt.jar).
Oddly, apache has the leading XML parser, and it has it in both java and C++
The disadvantage of C++ is that there is no single, consistent feel to the libraries like in Java. The disadvantage of Java is jar bloat (admittedly fixable with GenJar if you want to do it manually).
I would say that it's Java that is missing the code. Where is the OpenGL kind of libraries? They exist (JOGL), but they don't stay current with OpenGL, and since you have to get them yourself, that means you can't deploy without requiring the end user to get them as well.