It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
I might possibly be onto something here and it's possible that I could end up using Java to finally be able to do what I want, but I just need a bit of clarification about it:

I have a program that I wrote using .NET, and it looks like it won't be possible to make it compatible with MacOS, so I'm considering translating the program into Java, or rewriting it that way, because I need it to be able to work on pretty much all versions of Windows AND MacOS (and Linux if possible, but that's not a big deal).

But it's NOT a web app or a console app - it's a regular GUI application to run like a normal program. So I was looking into Swing or JavaFX, but basically, I've just spent a LONG time and a LOT of effort trying to get it compatible using .NET because I was misinformed that if I upgraded to at least version 2015 then it would work. Because of that, I'm very annoyed and I would like something that will GUARANTEE that it will be cross-platform and with NO platform dependencies at all (except possibly requiring that an interpreter or runtime libraries or something like that be installed).

Please keep in mind that I don't actually have a Macintosh or MacOS to test the software, which is why I need to be certain that it will run EXACTLY the same on MacOS as on Windows (well, if the interface looks slightly different, I don't care, as long as it's usable, but the way that the program works must be identical). So I can't use any "native" code (like something compiled from C++).

Fortunately, aside from the interface, there's little to nothing in the way of libraries or anything third-party. In fact, it's pretty much just all logic and calculations, except for a single package that I must import, but it's a common one that is included in Java (actually, there may be some other simple ones for math functions and text manipulations, but they'd be REALLY rudimentary packages that also just transform data and do nothing beyond that).

So, would either Swing or JavaFX qualify for my requirements? And if not, then what would? Also, please keep in mind that whatever IDE I use must be able to run on an offline computer. Thank you.

Also, supposedly, Swing is built onto AWT, but AWT is said to be platform-dependent, so how is it that Swing can be platform independent, and how can I trust that it truly is? It seems to me that if one thing is made so that it will only run on one OS rather than all of them, then building anything using that would still have the same restriction, wouldn't it? As for JavaFX, I don't know whether it has the same problem or not, but I haven't seen anything which says that it does. In any case, whatever information anyone can tell me would be appreciated.
No posts in this topic were marked as the solution yet. If you can help, add your reply
avatar
HeresMyAccount: ...
Just giving my 2 cents here.

I am in no way a Java expert (I'm a C++ kind of person), but from my past experience I believe that Java actually IS cross-platform. The virtual machine it runs on is implemented to run on most (if not all) major OSes so you do not need to write platform-specific code.

On AWT vs Swing: if I remember correctly, Swing was created to replace AWT. Contrary to AWT which is platform-dependent, Swing was implemented completely in Java, so by nature it is also cross-platform.

To anyone more experienced in Java, if I am mistaken in any way please correct my statements above.
All my information is probably outdated but Isn't the Java license quite problematic these days? Unless perhaps you go with OpenJDK but then you probably don't have JavaFX.

In any case, the complexity of just setting up for running Java software puts me off quite a bit.
avatar
Panaias: Just giving my 2 cents here.

I am in no way a Java expert (I'm a C++ kind of person)
I haven't used Java in long time either, and I never used it cross-platform before. I usually use .NET.
avatar
Panaias: but from my past experience I believe that Java actually IS cross-platform. The virtual machine it runs on is implemented to run on most (if not all) major OSes so you do not need to write platform-specific code.
Yeah, I know, but supposedly it can get iffy when using any native code or certain kinds of things which may rely on it. And besides, I'm not sure whether any additional setup may or may not be required when trying to move a Java program from one OS to another.
avatar
Panaias: On AWT vs Swing: if I remember correctly, Swing was created to replace AWT. Contrary to AWT which is platform-dependent, Swing was implemented completely in Java, so by nature it is also cross-platform.
Well thanks for trying, anyway, but honestly I'm not sure you do remember correctly. I only say that because I've recently read that Swing was built using AWT, which is really the whole reason why I'm skeptical about whether Swing actually is cross-platform, or how it even could be.

But if it is then it may possibly be a simpler and more compatible choice than JavaFX, at least for what I'm doing. I might even implement both versions, but first I want to make sure that I'm not going down a wrong path by trying to even use Java in the first place.
avatar
Panaias: To anyone more experienced in Java, if I am mistaken in any way please correct my statements above.
Yes, if necessary then please do, or otherwise just verify that what Panaias said is correct. Either way, I'm just trying to get to the bottom of this mystery.
avatar
Rixasha: All my information is probably outdated but Isn't the Java license quite problematic these days? Unless perhaps you go with OpenJDK but then you probably don't have JavaFX.

In any case, the complexity of just setting up for running Java software puts me off quite a bit.
I'm sorry, but would you mind elaborating on that a bit please?

- In what way is the Java license problematic?

- Why wouldn't OpenJDK have JavaFX?

- Why is it complex to set up and run Java?

I was planning on just using Eclipse, which is free (or at least there's a free version). If you're worried about legalities regarding a license, I'm not going to use it for anything that I'll sell - it's only for personal use. In any case, as I understand it, I thought that it pretty much had a license such that people could do whatever they want, like how it is with Linux stuff, but I may be wrong.
Post edited February 04, 2020 by HeresMyAccount
You can get this information from the official pages. Java is cross platform. As for other components, see the relevant websites.

Python is also cross platform and free and you can use the inbuilt tkinter ui.

JavaScript is cross platform and with electron can be used to build apps as that uses chromium (web browser to display ui).

Mono (c#) is cross platform (just from the official pages)
https://www.mono-project.com/docs/getting-started/install/mac/

There are others:
https://en.m.wikipedia.org/wiki/Cross-platform_software
avatar
nightcraw1er.488: You can get this information from the official pages. Java is cross platform. As for other components, see the relevant websites.

Python is also cross platform and free and you can use the inbuilt tkinter ui.

JavaScript is cross platform and with electron can be used to build apps as that uses chromium (web browser to display ui).

Mono (c#) is cross platform (just from the official pages)
https://www.mono-project.com/docs/getting-started/install/mac/

There are others:
https://en.m.wikipedia.org/wiki/Cross-platform_software
That's good, but most of that stuff doesn't have anything to do with Java. As for JavaScript, that won't work because I can't have it be open-source, which I believe Python is also. I've already looked into Mono, but it seems that to even be able to compile it so that it will run on MacOS, I'd need a Macintosh computer (why don't they have a compiler that runs on Windows to make programs that will run on MacOS?).

And in any case, I'm not sure whether I'd trust its reliability enough to be sure that it will run on MacOS, while ONLY being able to test it on Windows, which is the amount of reliability that I'm hoping to be able to get from Java.
avatar
nightcraw1er.488: You can get this information from the official pages. Java is cross platform. As for other components, see the relevant websites.

Python is also cross platform and free and you can use the inbuilt tkinter ui.

JavaScript is cross platform and with electron can be used to build apps as that uses chromium (web browser to display ui).

Mono (c#) is cross platform (just from the official pages)
https://www.mono-project.com/docs/getting-started/install/mac/

There are others:
https://en.m.wikipedia.org/wiki/Cross-platform_software
avatar
HeresMyAccount: That's good, but most of that stuff doesn't have anything to do with Java. As for JavaScript, that won't work because I can't have it be open-source, which I believe Python is also. I've already looked into Mono, but it seems that to even be able to compile it so that it will run on MacOS, I'd need a Macintosh computer (why don't they have a compiler that runs on Windows to make programs that will run on MacOS?).

And in any case, I'm not sure whether I'd trust its reliability enough to be sure that it will run on MacOS, while ONLY being able to test it on Windows, which is the amount of reliability that I'm hoping to be able to get from Java.
Python compiles to byte code just like .net and java.

There really isn’t much more to be said however, everything that has been posted here and the other threads, there is some highly specific “problem” with. You are either a google AI learning bot, or have some ideal which does not exist. Something has to give somewhere.
No, I have problems making it run on my Amiga
avatar
nightcraw1er.488: There really isn’t much more to be said however, everything that has been posted here and the other threads, there is some highly specific “problem” with. You are either a google AI learning bot, or have some ideal which does not exist. Something has to give somewhere.
I'm not a bot. I may be a cyborg but not a bot. Anyway, it's not that specific. I simply want something that:

- Is free, anonymous, closed-source (basically, private)

- Is cross-platform between Windows and MacOS

- Can give me a reasonable guarantee that it will run the same on MacOS even though I can only test it on Windows

Really, that's about it.
If you discount complicate edge cases – like using one of the services that automatically builds open source projects on Github or violating Apple's EULA to set up a cross compiler that might not work – you cannot compile anything for MacOS without owning a Mac. And even if you own a Mac, Apple uses a lot of energy to make developing anything for their ecosystem a nightmare.

Edited for grammar. I guess listening to a soccer radio conference in German at the same time is a bad idea. ;-)
Post edited February 04, 2020 by mk47at
avatar
mk47at: If you discount complicate edge cases – like using one of the services that automatically builds open source projects on Github or violate Apple's EULA to set up a cross compiler that might not work – you cannot compile anything for MacOS without owning a Mac. And even if you own a Mac, Apple using a lot of energy to make developing anything for their ecosystem a nightmare.
Yeah.... this is true. Even doing the renewals for certificates required to have an app on the app store requires having a Mac if I remember correctly. It's been a while, but the process wasn't fun.
avatar
HeresMyAccount: I'm not a bot. I may be a cyborg but not a bot. Anyway, it's not that specific. I simply want something that:

- Is free, anonymous, closed-source (basically, private)

- Is cross-platform between Windows and MacOS

- Can give me a reasonable guarantee that it will run the same on MacOS even though I can only test it on Windows

Really, that's about it.
I'm curious about the closed source requirement. How is closed source more private?

Otherwise, my recommendation would be python + tkinter. Easy to code, easy to run, very portable.
avatar
hummer010: I'm curious about the closed source requirement. How is closed source more private?

Otherwise, my recommendation would be python + tkinter. Easy to code, easy to run, very portable.
It's more private because I don't want anyone reading my source code! Also, someone above said that Python compiles, so why would that be open-source? And is it more portable (if by that you mean cross-platform) than java?
avatar
nightcraw1er.488: JavaScript is cross platform and with electron can be used to build apps as that uses chromium (web browser to display ui).
Ever recommending that to anyone for any reason earns you a special place in the deepest parts of hell. Just no.
Java and .net are trivial to decompile, so you really can't stop anyone reading your source code. There's no such thing as "private" as long as an app runs locally.