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 1 year ago.
Improve this question
I'm learning spring before I learn spring-boot I wish to install spring from Spring.
I have downloaded and unzipped, I need help as to where to place the folder so I can start working using a import org.springframework.stereotype.Component on a Mac. I know this is trivial question but I haven't found an installation of this kind, majority of the tutorials use spring.io to generate a zip file, or use maven to do the installation.
Looks like you need to use a build tool like Maven or Gradle to have the ability to add Spring Core to your project.
otherwise, you need to download the jar file and add it to the classpath.
Firstly let me tell you about CLASSPATH, according to the oracle website The Classpath tells the JDK tool where to find third-party and user defined classes that are not extensions or part of the Java platform.
On a Mac you need to type echo $CLASSPATH to see if you have any CLASSPATH set up, if you have never worked with third party classes this will be blank.
To add to CLASSPATH run the following command in the terminal
export CLASSPATH=/Users/{Path} this will clear all the classpaths , if you want to add to existing classpath run export CLASSPATH={$CLASSPATH}:/Users/{Path}
You can find a detailed article on this topic here
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 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 3 years ago.
Improve this question
I want do program like here: https://www.youtube.com/watch?v=hP2x1fwYP6c&feature=youtu.be&t=359
and I would like to import org.apache.commons.codec.binary.Base64; but java unknown apache
Or do I have to upload a library?
Thank you
You need to add the Apache Commons Codec library to your project. You either need to download the *.jar file and add it to the project folder and project configuration or you let your build processor automatically download it.
See https://mvnrepository.com/artifact/commons-codec/commons-codec/1.9
Latest is version 1.15
This website provides a download link for the *.jar file as well as configuration settings for different build processors (Maven, Gradle, ...)
org.apache.commons.codec.binary.Base64 is not part of the default java language, it is part of a library.
To use it you have to put said library on the classpath.
If you use a build and dependency management tool like maven you can add it as dependency in the pom.xml file.
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 3 years ago.
Improve this question
Is there a way to compile the JDK from sources?
And is there an official download of the source?
I want to compile it for my Smartphone.
The question is completely valid. JDK has multiple repositories (forest), code form only JDK repository will not work to build complete JDK. Also, it's very hard to get a source of an older version.
Please refer to the following document to build OpenJDK.
https://hg.openjdk.java.net/jdk-updates/jdk9u/raw-file/tip/common/doc/building.html
Following is main steps to build code:
Download the code from the root repository. Please check this link for all available repository tree.
Run the get_source.sh script located in the root repository to get
the other needed repositories
Then follow step provided in README file in the root repository
Also if anyone wants to have prebuilt binary then it available via adoptjdk project at the following URL.
https://adoptopenjdk.net/archive.html
Updates: 5 Feb, 2021
As part of Project Skara, openJDK source code is moved from Mercurial to Git. Please refer following new guideline to build JDK11+.
https://openjdk.java.net/groups/build/doc/building.html
The JDK is already the compiled source and has all the source files inside of it. Some are only class files but most of java is open source.
However, you can check out openJDK.
http://openjdk.java.net/
Thats basically the version of java you want to get hacky with.
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 6 years ago.
Improve this question
I'm trying to import an Eclipse project from GitHub into IntelliJ. I'm however having problems figuring out the correct way of doing that.
I'm following this question to do the importing(I'm leaving everything on default and simply click "Next", since the answer doesn't mention anything else and I have no idea what the other stuff does), but it still doesn't work. The configuration/project structure appears to be seriously broken and I have no idea why.
More exactly, I'm currently stuck at the following screen: The "Problems" tag explains in more detail that both the things in red are "invalid". I tried searching for that error, but it seems that people encounter it on all different project models and build tools like Maven, Spring, or Android. None of them concern Eclipse projects and the solutions vary from issuing a bunch of commands that I don't understand somewhere to deleting this project file or another.
Since there are so many unknowns in play here, I decided to ask, rather than waste days crapshooting only to break something in my IDE or Java installation. How do I get this project to work? It's a simple local machine visual app, it shouldn't be this complicated to import it in an IDE.
Basically the issue is how those two libraries are defined. If you select one and then click on the edit button to the right, a dialog will open and show the path to where those libraries are defined. They are likely configured to find the necessary JARs at a specific path on the (original developers) system. For example, for the jfxrt.jar library, maybe it is configured that the classes/binary JAR is at C:\Program Files\Java\JavaFx\jfxrt.jar or C:\Users\Bob\libs\fx\jfxrt.jar. Wherever they are defined, you either need to put the necessary JARs in that directory, or modify the config to point to the location on your system where you have the JARs. This of course may require you to download the necessary JARs.
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 7 years ago.
Improve this question
I am trying to play an audio file in a java program I have written in Eclipse. Processing has a very good library for playing audio files which I would like to use in Eclipse. I have followed and completed the directions in this link:
https://processing.org/tutorials/eclipse/ to be able to write Processing java code in Eclipse. I am unclear how one goes about downloading and using Processing libraries in Eclipse. All ideas and links explaining how to download and use this java library: https://processing.org/reference/libraries/sound/index.html in Eclipse would be much appreciated! Thank you for your help!
You'd follow pretty much the same steps- add the library jar(s) to your classpath, and then use the classes in those jars.
For example, if you want to use the Processing library minim, you would simply download the zip file, and then extract the jars within to whatever directory you want. Then you'd right-click your project in eclipse, go to properties, then Java build path. Go to the libraries tab, then just select the minim jar(s) to add them to your classpath.
Then you can use the minim classes just like you can use any other Java library.