Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Every time I need to delete the previous files to force the compiler not cache
I compile it using:
javac Main.java
and other imported files are nor compiled, until deleted
Of course you don't want ALL imported classes to be deleted (java.lang?) but only your project. Simple: Delete all .class files in your output folder, recursively, with your shell's tools. If you have a dedicated output folder you can just delete the whole folder.
Best method: Learn a build tool like Maven or Ant and use the integrated ways to clean a project output, e.g. with Maven mvn clean. Or if you use an IDE with a built-in builder (e.g. Eclipse) there might be a clean option for the project.
This is not a "cache" in a strict sense.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 months ago.
Improve this question
We have to do java project like a management system and we have source code but the question is how to run it and where? anyone knows?
Queries
IDE
How to run it?
If you already have the source code,
Open a command prompt window then cd to the directory where you saved the java program.
For example, JavaProgram.java is in C:/
Type 'javac JavaProgram.java' and enter to compile your code.
Now type 'java JavaProgram' to run your program.
You will be able to see the result printed on the window.
Good luck :)
we have source code
You'll need to compile it.
Then you need to execute it. That could involve web containers with WAR or standalone, executable Java JARs, or directly execute a class file. Without seeing your code it's hard to answer that, but you wouldn't use an IDE to actually deploy/run your code outside of individual development.
You'll also need some server to run it on. That's not unique to Java.
Regarding the original question: "Make a project" - you could use Maven Archetypes or Spring and Quarkus have project starter websites, for example...
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
Hello everyone I have downloaded CalendarFX from github and I'm trying to build it to obtain the .JAR files but I haven't been able to make it work someone could help me? It would be very helpful thank you. Here is the link of the github repository: https://github.com/dlemmermann/CalendarFX#building-it
I'm using Eclipse by the way.
The directions on the Github repository are simply telling you to install, but it isn't explicity stated that you are supposed to do it with Maven. The pom.xml file (stands for Project Object Model) is fundamental to Maven projects.
Using command line, change directory to path of this project, then:
mvn install
... assumes you have Maven installed.
Finally, as stated on the repository's readme:
Once completed you will find the installation inside the target folder of the assembly module.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
When do we need to attach source to a jar?
Can we debug without attaching the source code?
Can we see the stacktrace line numbers without the source (AFIAK we can't)?
What is the best practice for local builds? Do we need the source code?
What about CI?
Can we leave the source code only for production release?
Thanks,
Omer
It's good practice to also publish the sources jar along with your binary jar in your internal (or external) Maven repository. It makes life of the developer that is working with your code much easier since they can see your comments / browse the codebase and be able to have all that at debug time. Now as you are saying even if the sources jar is not published, developers have ways around it primarily relying on their IDE. In Eclipse for instance you can install the Java Decompile plugin that would give you access to the code during debug time or on IntelliJ there is something similar without the need of installing a plugin.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I just want to build a opensource program, [program]: https://qupath.github.io
However I barely used Java and maven before, I downloaded the code of itself, but, I don't know how to build or run the code..
I already watched several utube videos, but It doesn't help. I got problem at a below point.
If you need to work with a Maven project (in good shape) with recent versions of IntelliJ, you should just "File -> Open" the folder containing the pom.xml file.
After a bit of pondering, you should be able to right-click on the class you need and choose "Run" or "Debug".
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I use eclipse to run my java code, but I want to make an application that won't use eclipse to run. I want to make it work as a portable stand alone application that only uses the libraries I need.
Right click on Projectfolder (in Eclipse) -> Export -> Java -> runnable JAR -> choose class with main method. Done ;)
I'm going to assume you mean to create a .exe file. for this you'll need a .jar file.
I'm not familiar with Eclipse I know that Netbeans makes the .jar file automatically once the code is compiled.
(For Netbeans)
This .jar file can be found in the dist folder. In case there is none see here to fix that.
In case Eclipse puts into a different folder I'd just look in all the folders related to the project until you find a file with a .jar extension.
Once you have the .jar file you'll need to run an application to change it from .jar to .exe , I would recommend Launch4j.
Here's a handy tutorial to help you with that application if you get stuck.
I know this isn't exactly the answer you're looking for but it's close! Hope this helps!