|
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.
|
|
|
|
|
So far I've found Launch4j, Exe4j and JET.
I'm not certain which is the better program to use on JAVA.
|
|
|
|
|
There is only one way to find out.
|
|
|
|
|
I've just discovered NetBeans. Maybe that's what I'm looking for.
|
|
|
|
|
Netbeans is simply an IDE which automates a lot of processes to create your application. Whatever it does I don't think it will produce what you think. To be honest you are largely wasting your time following this route. Just accept that Java has its own system and work with that. If you want true executable applications then switch to C++ or C#.
|
|
|
|
|
Maybe you should go for Intelij rather than NetBeans or Eclipse!
And yeah you can develop Windows applications with java.
But I don't get you do you want to create an exe file or do want to create windows just like
chrome or some other apps do have!
If yes then you can use JavaFX or swing awt to create windows Form:thumbsup:
|
|
|
|
|
Thanks for the information Dhananjay.
My reason for creating an exe from a Java program is for an easy way to run the Java program. All I would need to do is to double click on the EXE file or create an icon for the EXE file and put it on the desktop of my windows desktop computer so bI can double click on the icon like I do for other programs.
Also rather than having a number of compiled class files that calls each other I'd like to have one file. I think you can do this as a JAR file but then can the Jar file be created as a EXE file so I can double click on it to run the program.
Is stand alone programs possible in Java so that the Java library parts are contained in a file or is it necessary to create an install file so the user has the Java libraries installed on his computer to run the Java program I have written?
|
|
|
|
|
Member 14154627 wrote: Is stand alone programs possible in Java Broadly speaking, no. What you are trying to achieve is not easy with Java. As I mentioned earlier there are a couple of applications on the internet that can package things up to make it look like an ordinary executable, but it is still a bodge. If you want true clickable exe files then you will have to switch to a language that supports it: C, C++, C# etc., C# being probably the best choice.
|
|
|
|
|
I get the feeling that what I want to do can't be achieved in any language.
I have tried C++, C#, Visual Basic, and Python.
However I have not given up on Java yet even when it seems to be more of a language suited for the web.
I read that it's possible to create a jar program with Eclipse that can be double clicked to run from the desktop and it does not need the full Java installed.
You can do the same with Python but Python still runs slow compared to other languages.
Brian
|
|
|
|
|
Member 14154627 wrote: I get the feeling that what I want to do can't be achieved in any language. Sorry, but you are totally wrong. C, C++, VB.NET and C# can all be used to create executable Windows Forms type application that can be run entirely independently, just by double-clicking their icons. As I mentioned earlier, for a newcomer, C# is probably the best choice, and a copy of Visual Studio 17 (free from Microsoft) will get you started very quickly.
Member 14154627 wrote: I read that it's possible to create a jar program with Eclipse that can be double clicked to run from the desktop and it does not need the full Java installed. I suspect that is not very likely. The chances of you getting a solution to your problem in Java are extremely low, and the more time you spend on it the more frustrated you are likely to become.
|
|
|
|
|
At this stage I'm trying to find the strengths and weaknesses in programming languages. In a way it's good to find any blocks when trying various languages. What attracted me to Java was that it was the number one language in the charts but that might be due to being able to write code for tablets and smartphones.
I'm also trying C# as well as Java. The problem with the visual studio (C#) is that it needs to be installed on the C drive and with every version it's getting bigger. I have a SSD 250GB drive for my C drive so I'm limited to how much I can put on this drive.
Brian
|
|
|
|
|
Member 14154627 wrote: 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.
Ok.
Member 14154627 wrote: Is this possible with JAVA?
I doubt it.
Mainly because of the way windows locks down installing anything on windows. But easy enough to try.
1. Create java app
2. Have it create folder in "Program Files"
3. Have it create a shortcut and put it into desktop folder. The shortcut is just a simple file and you do not even need to create one, just copy one from somewhere else.
4. Run it as ADMIN (very important.)
If that works then yes. If not then you would probably need to do some JNI work which isn't really Java.
Member 14154627 wrote: The only way I know to run a JAVA program is java -cp . programname
You can package a java jar such that it is 'clickable'.
HOWEVER, to do any of the above java must already be on the windows box. At least at one point java was coming with windows but I am not sure about that any more. Installing java itself cannot be done within java (chicken and egg.)
|
|
|
|
|
How i can integrate my developed stemmer with Terrier Information retrieval system on window 10
|
|
|
|
|
|
Is the code from a Servlet "safe" from being viewed by an user? To make this more clear, let say that in a Servlet, you'll add a connection to a database, and because of this, from Connection object you can get the IP, port, user, password, kinda all you need to access the DB at a certain level, which is bad.
So, that being said, can a user see the code from a Servlet? Or the Servlet is just being run on the server side, and only sending out a "result" to client side, and so, the user is unable to see the actual code of a Servlet?
modified 13-Feb-19 7:48am.
|
|
|
|
|
Quote: A servlet is similar to a proprietary server extension, except that it runs inside a Java Virtual Machine (JVM) on the server . So the client user cannot access it. For full details see Java Servlet Technology[^].
|
|
|
|
|
|
Servlets run on the server. Unless there's something wrong with your server's configuration, the Java code will never leave the server.
Java Servlets - A Tutorial[^]
Also, your database server is not supposed to be accessible from the outside world. The firewall should be configured to prevent access from machines other than your server. So even if someone did manage to get the connection details, they shouldn't be able to connect to your database.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|