Semester 3 Programmierkurs Praktikum
- Herny Küfner
- Raiden Erdmann
To add external classes such as xmpcore.jar
or metadata-extractor-2.16.0.jar
, you have to copy the .jar
files into lib
and create .classpath
manually:
<!-- .classpath -->
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/metadata-extractor-2.16.0.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="lib/xmpcore-6.1.11.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
</classpath>
You may also have to add JavaFX
as a User Library. (via Aufgaben/Praktikum10)
VSCode is difficult to set up, especially when trying to include libraries
Download JDK 15.0.1
Set JAVA_HOME
envoirentment variable:
setx -m JAVA_HOME "D:\java\bin" # Where D:\java... is the path to *your* java
Install VS Code and Java Extension Pack
Sometimes you need to Add folder to Java Source Path
, by right-clicking inside to root folder in VSCode
Uninstall Maven and Java projectmgr extension
clean workspace
The workspace contains two folders by default, where:
src
: the folder to maintain sourceslib
: the folder to maintain dependencies
Meanwhile, the compiled output files will be generated in the bin
folder by default.
If you want to customize the folder structure, open
.vscode/settings.json
and update the related settings there.
The JAVA PROJECTS
view allows you to manage your dependencies. More details can be found here.
You may also want to create .vscode/settings.json
:
// settings.json
// Does not work with JavaFX for whatever reason
{
"java.project.sourcePaths": [
"src",
"lib",
""
],
"java.project.referencedLibraries": [
"lib/**/*.jar"
],
}