eclipse

Eclipe LUNA - “The import java.sql cannot be resolved”

天大地大妈咪最大 提交于 2021-01-28 12:45:40
问题 I have Eclipse LUNA and JDK 8 installed on my computer. I get the message "The import java.sql cannot be resolved" on the import lines. i checked the jre definition (windows -> reference -> java -> installed JREs and it is setup there to the folder of the jre on my computer. what is the problem? 回答1: Right click on project - >BuildPath - >Configure BuildPath - >Libraries tab - > Double click on JRE SYSTEM LIBRARY - >Then select alternate JRE Try this.. After that once clean your project too..

Eclipse RCP: check if a job has finished

孤街浪徒 提交于 2021-01-28 11:53:49
问题 I want to check if a Job has finished. Currently I do this: if ( traceJob.getState() != Job.WAITING && traceJob.getState() != Job.RUNNING){ But I think there should be a better way to check. Anyone has any good idea ? 回答1: You can use Job.addJobChangeListener to add a listener to a Job. The done method of the listener is called when the job finishes. There is a JobChangeAdapter class with default implementations of all the IJobChangeListener methods so that you don't need to implement all of

Checkout issue in tfs

依然范特西╮ 提交于 2021-01-28 11:32:39
问题 i have added a workspace(c:/users/aparna/workspace)and checked out the codes there. Due a mapping issue i changed the workspace, that is i created a new one (d:/noscript). When i tried to check out the project modules to this new workspcae from tfs, it is already mapped to the old workspace. When i open new workspace folde, .metadata and remotesystemTempFiles are seen. Projects modules still resides in old workspace. When i open eclipse by selecting new workspace, i got all project modules

How to use JavaCompiler from tools.jar without JDK

帅比萌擦擦* 提交于 2021-01-28 08:52:15
问题 I am trying to create an application that can compile a provided .java file during runtime. I understand that there is a programmatical compiler available within the tools.jar of the JDK. However, I cannot guarantee that the user of the application has JDK. I have attempted to package tools.jar within the application and reference it as a library. This seems to work within the Eclipse IDE when I have tools.jar added into the Bootstrap Entries of the classpath. When exporting the application

How do I change the working directory for an Eclipse run configuration?

南笙酒味 提交于 2021-01-28 08:45:06
问题 I have a single Eclipse run configuration for which I want to set the working directory. How do I do this? I glanced through the different tabs for a run configuration, including the Environment tab, but didn't see anything obvious. 回答1: This is on Kepler SR1. Arguments tab. 回答2: In a Java Application run config on the tab "Arguments" on the bottom where it says "Working directory". 来源: https://stackoverflow.com/questions/21028690/how-do-i-change-the-working-directory-for-an-eclipse-run

javadoc @value annotation issue in Eclipse

こ雲淡風輕ζ 提交于 2021-01-28 07:53:53
问题 I've read a lot here but didn't find the answer. I faced a problem with a @value Javadoc annotation. IDE: Eclipse Oxygen.1a Release (4.7.1a) If I place it on the String variable it is ok and works properly, but if the variable is Integer then everything is bad. Here is a code where variables stand side by side: /** * Default delimiter. {@value #DEFAULT_LIST_SEPARATOR} */ public final static String DEFAULT_LIST_SEPARATOR = ","; /** * Default int value. {@value #START_VALUE} */ public final

Cannot access 'java.io.Serializable' which is a supertype of 'kotlin.String'. Check your module classpath for missing or conflicting dependencies

房东的猫 提交于 2021-01-28 07:40:22
问题 I have a new Kotlin project in Eclipse (I installed the kotlin plugin). However this code: val a: Int = 10000 println("Your Int Value is "+a); causes this error: ERROR: Cannot access 'java.io.Serializable' which is a supertype of 'kotlin.String'. Check your module classpath for missing or conflicting dependencies. What is the source of this error? How can I fix it? I have seen the other posts on stackoverflow but they all talk about intellij and not Eclipse. 回答1: I got this error while using

How can i add images in source folder of a Maven Java Project?

為{幸葍}努か 提交于 2021-01-28 07:34:32
问题 I have images in source folder of a maven java project. you can see it in the below image. if i run install command of maven, when i see generated jar file , i could not see the images in sources in the jar file. My maven configuration is like below. <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.6.1</version> <configuration> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.4<

Ctrl-S moves the cursor near the top of the document in Eclipse

杀马特。学长 韩版系。学妹 提交于 2021-01-28 07:30:54
问题 Why is it that every time I save my file in Eclipse with Ctrl-S it moves the cursor to the top of the page I'm working on? Coincidentally, it moves the cursor to the top of the JavaScript section of an HTML page I am editing. It's really annoying. How do I stop it? 回答1: Yep, was plagued by the same annoyance. In the eclipse preferences, select javascript then editor. On the editor preferences page there is a box, checked by default, called "Smart caret positioning in JavaScript names

Eclipse on Linux some fonts are too small (git staging, dialog, outline, problems etc)

我的未来我决定 提交于 2021-01-28 07:12:23
问题 Well, I am using Spring Tools Suite 4.12 (based on Eclipse 4.11) one Deepin OS (which is debian based). My screen is 3K, (2880x1620). Deepin allows me to scale the screen, so my display is set to native resolution, and in Deepin, I set the scale to 1.5 so after scale it should be similar to 1080p. It works for most applications, except STS (Eclipse 4.11). Most views in STS looks good similar to 1080p, but there are still some views with tiny fonts, such as git staging, problem: Any way to fix