Application Development for Windows and Linux [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Is it possible to create programs in Java and run on both Linux and Windows?
What i mean is. is it possible "write once and run everywhere" . If not possible , is it possible to convert program from one platform to another by making minimum modification (ie, windows to Linux and vice versa)?
If that not possible,
Is it possible to create programs in a particular style which enables the programmer to convert it into , windows platform or to Linux platform
Even If this not possible is it possible to create new type of virtual machine system or something make it possible
even if none of the idea works , what is the biggest barrier? why it is not possible in a easy manner ?

Of course you can run java programs on windows an linux, and you can make cross platform programs in java as long as your operating system has the java runtime on it, if not... it won't run. You don't need to code different for windows and for linux in java, maybe just some minor adjustments in the program.You really didn't know that?
Anyway, because of your questions i suppose you are a little kid (i hope i'm not wrong) and my advice to you is that you begin by studing the java basics because your question is too basic... and sincerely, change you attitude, it will be good for you.

Related

Can be java virtual machine influenced by missing national languge support in Linux? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I don't have Linux. My program in Java reads an ANSI coded text file created under Windows XP in my national language. It worked properly under Windows XP. I'am interested if pure Linux can process such program. Thanks in advance!
The Java VM is certainly affected by language and locale settings, but just in what ways, if any, your program is affected depends on the program. String literals, for example, are stored in Unicode in the compiled program, so they will remain as compiled under all circumstances.
In your case, you seem to be interested in how InputStreamReaders and the like behave, and that depends on how you create them. If you create an InputStreamReader without any of the charset arguments, it will use the JVM's conception of "the default charset", which depends on the locale settings. If, on the other hand, you pass an explicit charset when creating them, they will behave the same no matter what platform and locale settings you run the program on.
For the record, a FileReader (if that is what you use) always uses the default charset.

How to run java code in HTML [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have a piece of java code I would like to run in my web browser and publish online. How can I do this without using applets? I have tried java vertx but I am not sure how to use it and there are no good tutorials online.
The short answer is you can't. Browsers don't "speak" Java natively, which is why applets required a plugin. As you probably know, Google is in the process of removing support for the plugin technology used by the Java plugin (NPAPI) and so soon Java won't work in Chrome at all (it already doesn't under Linux).
Your only real options are:
Provide a means of running it server-side, like http://ideone.com and various other "online" compilers do.
Translate it from Java to JavaScript (either manually or using a tool), which the browser can then run. But note that Java and JavaScript are not only markedly different languages despite a superficial similarity in syntax, but the standard environment for each is also quite different from the other.
How you do either of those is much too broad a question for SO.

Checking System requirements for the application in java [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am building an application using java and oracle database. I want to confirm all the required software is installed and working properly on each time the user open the application and show the missing software/configuration error to the user and option to close the application.Is there any way.
You probably can't from a pure Java perspective, nor should you. That is really a job for your installation process. Every native platform you deploy to is going to have a different way of installing software and a different place to put it. If you really want to do this because you are doing your instillation with Java (and love writing more complicated code) you will need to leverage something like JNI or JNA to ask the underlying operating system what is installed. This is fairly simple on Windows and OS X, however, it's going to be next to impossible on most Linux's due to the differences in each package manager.

Will I experience problems making a java program on Windows computer but then running it on a linux vps? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
So I am currently working on designing a game that will be multiplayer and to prepare for this I have begun looking at hosting options. Besides hosting from my house on a dedicated server, the best and cheapest option I found was the use of VPS, more specifically Dotblock. Now dotblock has both linux based and windows based VPS but the windows one is a lot more expensive and so my question is whether or not I will run into problems if I code my server program in java on my Windows computer but then eventually host it on a linux based VPS?
As far as I know there should be no problems but if there will be, what are they, and if there are no problems what limitations will I have while coding? I understand I cannot reference anything Windows specific but will things such as time and tracking the mouse using LWJGL should change?
Thank you in advance and I hope you guys can help me out!
Overall it's relatively straightforward- that's one of the advantages of using java over other languages. I will offer you this advice; make sure you handle file paths in an environment-agnostic way. I've seen more than one error log on linux complaining that it can't reach 'c:\some\weird\path'.

What is the hook to detect if a file or a folder was updated? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am looking for the right "Hook" on Mac OS X, Linux and Windows to detect when a folder and/or file gets updated.
I am using JAVA and Object-C for the MAC.
Thanks in advance.
Also if you have any tips to go on doing this, will be truly appreciated.
Thanks in advance.
On Linux you should look at inotify
I'm not aware of any Java library that does this stuff - especially not cross platform.
On Windows the Win32 API offers such functionality though with the ReadDirectoryChanges or FindFirstChangeNotification function.
Writing a small c wrapper that's called per JNI seems not too hard - the problem is probably finding out how to implement the basic featureset that can be supported by all three platforms.

Categories

Resources