|
Apart from being able to transfer the program to different platforms is there any other reason(s) why people prefer to program in Java?
I noticed that it's has a very high rating in the top 10 preferred programming languages.
Brian
|
|
|
|
|
At a guess: Android.
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
You wrote
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
What does that mean?
Brian
|
|
|
|
|
It's a "Signature" - if you go to your profile (hover your mouse over your name at the top right of the page and select "My Settings") then select the "Forums and QA" tab you can set one near the bottom. That text will then appear at the end of each forum message you post.
Signature block - Wikipedia[^]
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
The same things that attract people to anything.
|
|
|
|
|
That answer does not help me.
I was hoping for replies such as "because it's easy to learn". "It's fast", "it requires less code" etc. I don't know if that's true of Javas as these are just examples.
There would have been a reason why you choose to program in Java and not in C++, C#, Python and the other languages. What was the reason?
Brian
|
|
|
|
|
I used Java, C, C++, Smalltalk, Algol and various assemblers in my professional life. The reason for choosing a specific language varied depending on what other people were using and what interfaces I was working with. Like I said before you make a choice based on your own specific needs or preferences.
|
|
|
|
|
I've tested other popular languages by writing a simple number guessing game. I hope to do the sam in Java.
The main thing I have against Java is that it does not compile into an EXE type program but instead it has the .CLASS extension so I need to type Java and the name of program.class to run my program. This make C# more attractive to me. However I'm going to see if there are programs that can convert a .CLASS Java program into an .EXE file.
I do like the way the main Java program can call other .CLASS files when needed and access variables without any problems.
Brian
|
|
|
|
|
Member 14154627 wrote: I do like the way the main Java program can call other .CLASS files when needed and access variables without any problems. All the other languages are able to do the same. The only difference being how the resulting object files are packaged.
|
|
|
|
|
It seems to work for console type programs but when I try it on a form (platform) program using C# then I have problems in sending text to the text field on the form from a different class.
I have not tried it in Java when creating a Java form (platform) program.
Brian
|
|
|
|
|
Then you should open a proper question in the C# forum.
|
|
|
|
|
All I'm doing at this stage is comparing Java to C# as I have not decided which programming language to program with.
I did research the C# problem and there is no easy solution.
Brian
|
|
|
|
|
There is no problem, apart from the one you appear to have created. Moving data between classes works exactly the same in C# as it does in Java.
|
|
|
|
|
|
Thanks for the links Richard.
Brian
|
|
|
|
|
Member 14154627 wrote: The main thing I have against Java is that it does not compile into an EXE
That isn't a valid reason for making a language choice. There are many, many other factors that go into creating and maintaining software and even with marketing and selling it.
|
|
|
|
|
What I'm seeking is a program language that creates programs that I can run by double clicking on them and also a programming language that is able to create a user interface (a form with buttons).
I know Java and Python can do this but it means using other programs to turn the program into what I want it to me.
With Java you end up with a ProgramName.class or PrograNamem.jar and if I double click on either file my Windows 8.1 computer can't run the program.
It seems to me that Java is popular because you can write programs for tablets and smartphones...then again I could be wrong.
Brian
|
|
|
|
|
Member 14154627 wrote: What I'm seeking is a program language that creates programs that I can run by double clicking on them and also a programming language that is able to create a user interface (a form with buttons).
That is a description of a very trivial aspect of any application.
Member 14154627 wrote: It seems to me that Java is popular because you can write programs for tablets and smartphones...then again I could be wrong.
I have been writing server applications for decades using it. But then those had far more significant functionality than how one started the app itself.
|
|
|
|
|
What, Magnets?
Or is that just me and the surgical steel implants?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
|
It was a big deal for big enterprise before .Net gained traction.
And most thought it had to do with JavaScript, or vise-versa ... which meant something ... or not.
It would be more popular but Sun objected to MS "extending" Java, so MS built .NET and the rest is history.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
But is Java good for writing Window desktop programs which seem to dominate the market?
The problem I have is in finding a way to double click on a Java compiled program when using Windows 8.1 operating system.
Brian
|
|
|
|
|
A mature language and platform. A lot of libraries and good free/open source development tools.
|
|
|
|
|
I'd like to create a program that has an icon I can put on my Windows desktop and click on it to run the program. Is this possible with JAVA? So far I've seen no way to do this.
The only way I know to run a JAVA program is java -cp . programname
Brian
|
|
|
|
|
I have a feeling there is a free utility that can create .exe files from Java programs. Google shoul be able to find it for you.
|
|
|
|