-
Notifications
You must be signed in to change notification settings - Fork 158
Expand file tree
/
Copy pathFaqPanel.tsx
More file actions
94 lines (86 loc) · 6.81 KB
/
FaqPanel.tsx
File metadata and controls
94 lines (86 loc) · 6.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
import { GenerateHeaderOptions } from "@microsoft/fast-foundation";
import { VSCodeDataGrid, VSCodeDataGridRow, VSCodeDataGridCell } from "@vscode/webview-ui-toolkit/react";
import React from 'react';
const REQUIRED_JDK_VERSION = 17;
export default function FaqPanel() {
const runtimeSampleCode = (
<code>
<span>{"\"java.configuration.runtimes\": [{"}</span><br />
<span> {"\"name\": \"JavaSE-1.8\","}</span><br />
<span> {"\"path\": \"/usr/local/jdk1.8.0_201\""}</span><br />
<span>{"}, {"}</span><br />
<span> {"\"name\": \"JavaSE-11\","}</span><br />
<span> {"\"path\": \"/usr/local/jdk-11.0.3\","}</span><br />
<span> {"\"sources\" : \"/usr/local/jdk-11.0.3/lib/src.zip\","}</span><br />
<span> {"\"javadoc\" : \"https://docs.oracle.com/en/java/javase/11/docs/api\","}</span><br />
<span> {"\"default\": true"}</span><br />
<span>{"}]"}</span><br />
</code>
);
return (
<div className="tab-pane fade" id="faq-panel" role="tabpanel" aria-labelledby="faq-tab">
<blockquote className="card-body">
<h5 className="font-weight-light">Feedback Channels</h5>
<p>
VS Code Java is new, and we are here to help.
</p>
<VSCodeDataGrid generateHeader={GenerateHeaderOptions.none} gridTemplateColumns="1fr 3fr">
<VSCodeDataGridRow key={1}>
<VSCodeDataGridCell className="font-weight-bold" gridColumn="1"><a href="https://gitter.im/redhat-developer/vscode-java">Ask Questions</a></VSCodeDataGridCell>
<VSCodeDataGridCell gridColumn="2"><a href="https://gitter.im/redhat-developer/vscode-java">vscode-java</a> Gitter channel is recommended to ask for help</VSCodeDataGridCell>
</VSCodeDataGridRow>
<VSCodeDataGridRow key={2}>
<VSCodeDataGridCell className="font-weight-bold" gridColumn="1"><a href="https://github.com/microsoft/vscode-java-pack/issues">Open Issues</a></VSCodeDataGridCell>
<VSCodeDataGridCell gridColumn="2"><a href="https://github.com/microsoft/vscode-java-pack/issues">vscode-java-pack</a> GitHub repo is recommended for opening bugs</VSCodeDataGridCell>
</VSCodeDataGridRow>
<VSCodeDataGridRow key={3}>
<VSCodeDataGridCell className="font-weight-bold" gridColumn="1"><a href="https://twitter.com/search?q=vscodejava">Other Feedback</a></VSCodeDataGridCell>
<VSCodeDataGridCell gridColumn="2"><a href="https://twitter.com/VSCodeJava">@VSCodeJava</a> is the handle to mention on twitter</VSCodeDataGridCell>
</VSCodeDataGridRow>
</VSCodeDataGrid>
</blockquote>
<h2 className="font-weight-light">Why do I see the JDK errors?</h2>
<p>
<strong><code>JDK {REQUIRED_JDK_VERSION}+</code> is required</strong> to run the Java language support (redhat.java) extension! You see this error because we failed to find one on your machine. The <a href="command:java.runtime">Configure Java Runtime</a> guide can help you understand how JDK path is searched and provides download links if you need to install one.
</p>
<h2 className="font-weight-light">Can I run my Java 8 project with JDK 1.8?</h2>
<p>
Yes. The JDK {REQUIRED_JDK_VERSION} requirement is just for running the Java language support (redhat.java) extension itself. You can still configure a different runtime <a href="command:java.helper.openUrl?%22https%3A%2F%2Fcode.visualstudio.com%2Fdocs%2Fjava%2Fjava-project%23_jdk-for-projects%22">JDK for your project</a> via the user setting <a href="command:workbench.action.openSettings?%22java.configuration.runtimes%22">"java.configuration.runtimes"</a>. The extension will pick a matching JDK to compile/run your project according to the compiler version specified by the project build file.
</p>
<blockquote className="card-body">
{runtimeSampleCode}
</blockquote>
<h2 className="font-weight-light">Why do I see tons of problems and red squiggles?</h2>
<p>
The problems are from VS Code Java when it tries to compile and build your codebase. If you experience this on your first use, it's possibly because of <strong>missing dependencies</strong>. To fix it, you probably want to start from fixing the project configuration files, e.g. <code>pom.xml</code> and <code>build.gradle</code>. After you make changes to those files, try <a href="command:java.projectConfiguration.update">Update Project Configuration</a> and <a href="command:java.workspace.compile">Force Compilation</a>.
</p>
<p>
It can also happen after you work with one project for a while. Try <a href="command:java.clean.workspace">Clean Workspace</a> to get rid of any intermediate output from the language server.
</p>
<p>
If the problem persists, follow the <a href="https://github.com/redhat-developer/vscode-java/wiki/Troubleshooting">Troubleshooting Guide</a>. For advanced users, the <a href="command:java.open.clientLog">Client Logs</a> and <a href="command:java.open.serverLog">Server Logs</a> will definitely help you understand what is going on.
</p>
<h2 className="font-weight-light">Why can't I see any IntelliSense suggestions?</h2>
<p>
VS Code Java needs to compile your code before it can provide suggestions. When it's working, you should see a spinning 🔄 on the right end of the status bar. And it will show 👍 when it's done. And you should be able to use all the features.
</p>
<p>
It could take longer for the language server to load a project which references lots of dependencies. Those dependencies need to be resolved and downloaded from the internet. So the network connection plays a critical role in the process.
</p>
<h2 className="font-weight-light">Can I use Lombok?</h2>
<p>
Yes. You'll need to install the <a href="https://marketplace.visualstudio.com/items?itemName=GabrielBB.vscode-lombok">Lombok</a> extension, which enables VS Code to process Lombok annotations. To learn more about alternatives and details, visit <a href="https://github.com/redhat-developer/vscode-java/wiki/Lombok-support">this page</a>.
</p>
<h2 className="font-weight-light">Can I develop Android apps using VS Code Java?</h2>
<p>
Sorry, it's not supported now.
</p>
<h2 className="font-weight-light">How to troubleshoot the problems?</h2>
<p className="mb-0">
You could click <b>F1</b> {"->"} <b>Java: Open all log files</b> to get the logs. Also learn more at <a href="https://github.com/redhat-developer/vscode-java/wiki/Troubleshooting">Troubleshooting Guide</a>.
</p>
</div>
);
}