I'm trying to install JDK & Java IDE, I have dual boot (Windows 10 + Ubuntu 18.04), can I make use of the same binary packages in both of my systems?
2 Answers
It depends what the "binary package" consists of.
If it consists of just .class files and other machine independent resources, then yes the same binary can be used on multiple operating systems and even different hardware architectures.
If it also includes native libraries, and the like, then those libraries will be operating system and hardware architecture specific.
If your application "package" is a self-contained JAR file, then it is possible to include native libraries compiled for multiple platforms in the JAR; see How to bundle a native library and a JNI library inside a JAR?
If the package is actually installable package as understood by the host system's package manager (e.g. a Linux RPM, DEB) or a native installer executable, then these are also platform specific.
It also depends on how you handle platform specific things in the application; e.g. running different external commands on different platforms, talking to the Windows Registry, LDAP vs Active Directory, different file system properties and behaviors, etc.

- 698,415
- 94
- 811
- 1,216
No you can't easily have a single package. I don't know about NetBeans but Eclipse and Java are specific to the operating system because they use many APIs which are different in each OS.

- 109,219
- 232
- 102
- 145
-
Take a look at this: https://netbeans.apache.org/download/nb113/nb113.html . . . same binary file for both Operating System. It's Apache Netbeans official webpage – SevenSea Apr 04 '20 at 12:35
-
So NetBeans is OK, Eclipse and Java itself definitely are not OK. – greg-449 Apr 04 '20 at 12:41
-
1@greg-449 I don't see "same binary file for both Operating System" in the Netbeans package. Instead I see three "binaries": one `sh` shell script and two Windows binaries (32/64bit). Hence it is just a multi-platform archive. – Robert Apr 08 '20 at 15:46