|
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
|
|
|
|
|
What I said was more of an example, I haven't reached the point of using the DB yet.
Quote: 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.
Also this will help me when I get there. Thanks!
|
|
|
|
|
Should note however that doing that is dependent on the network setup and NOT on code.
|
|
|
|
|
Yeah, I know how to do that, it just didn't crossed my mind until now, as I said, didn't made any projects that used DB so far, but really soon I'll need it. Thanks anyway!
|
|
|
|
|
I have to make some sort of app where you need to put grades and stats for students so I have a problem here I need to have at least 5 classes and I don't know how to organize it.
Interface will be in swing and we need to use all basic OOP techniques. I need help with what classes would you make if you were to make this project. ( first time making a project..)
|
|
|
|
|
|
Member 14133670 wrote: Interface will be in swing
Presumably a class assignment.
Just noting that you probably should put more effort into the back end and spend as little time on this swing part as possible. Any use of swing is going to be very limited in the business space.
Member 14133670 wrote: I need help with what classes
I think you should do this yourself. It is like using a hammer for the first time - watching a video of someone using a hammer is not going to help you when you swing the first time. Even though you are going to hit your thumb you just need to do it.
|
|
|
|
|
Hello. Please what can I do to continue coding java ide when after running it says code too large. the codes are well above 1000 and I still need to code more.
|
|
|
|
|
Please provide some more details, your question is not clear.
|
|
|
|
|
The program is to create an excel sheet after some computations and tabulations through a designed interface.The codes is about 6000. when I continue to add more codes for further task, it displayed an error message that, code too large, after running it. Is their any way to make it run after more codes. Alternatively can you show me how to access text field from a different class to minimize the codes. thank you
|
|
|
|
|
I am sorry, but that does not make anything clearer. What do you mean by "The codes is about 6000", and where does the error message occur, and what is the exact text?
|
|
|
|
|
Ok. Can you assist me on how to access textfield from a different class in the same package (i.e to reference a JTextField from a diffrent class). Thank you.
|
|
|
|