Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making Java Application for Windows & Mac

Just started coding in Java, I have a lot of experience in VB. I really really would appreciate if someone can point me towards the right direction !

I am developing a simple application which should be able to run in Windows (xp, Vista, 7.. 32 & 64 bit) and on mac too.

Here are a few question I have :-

  1. Do I need to make multiple versions for each windows(xp, Vista, 7.. 32 & 64 bit ) & Mac?
  2. How do we make changes to registry any inbuilt in java ?
  3. Make the application auto Updating

Any help resource links is highly appreciated so that I can hopefully do the same for someone else someday !

like image 742
Jeebus Avatar asked Mar 08 '11 23:03

Jeebus


1 Answers

  1. No. Java has the principle "compile once, run everywhere." - meaning, everywhere where you have a suitable JRE.

    This holds as long as your application doesn't need to do platform-specific things (and even then it often is possible to either do these things with a platform switch in Java, or deliver a native library for each platform). If your application is "simple", you have a good chance that you don't.

  2. If you only need registry changes for your own configuration, you should use java.util.prefs.* (Which may, depending on the system, store them in the registry). There is no build-in way to access the registry, since not each system has a registry (nor needs it).

  3. There is no build-in way to do this, but there are additional frameworks for this.

like image 113
Paŭlo Ebermann Avatar answered Sep 23 '22 23:09

Paŭlo Ebermann