eclipse

Eclipse jumping to function name on Ctrl-S

不打扰是莪最后的温柔 提交于 2021-01-27 13:40:45
问题 When I press Ctrl-S to save my Java file in Eclipse it's jumping to the function name. This is very annoying. Someone know what to do about this? 回答1: Go to Window->Preferences->General->Keys (you can also search for Keys in the main Preferences window). You most likely have added a binding which makes eclipse jump to the function name when you press ctrl + s . Another place to look is Window->Preferences->Java->Code Style->Clean Up and Window->Preferences->Java->Editor->Save Actions. That is

how to fix “The import org.junit.jupiter”?

狂风中的少年 提交于 2021-01-27 13:00:26
问题 I'm working on MMU project and I don't know how to fix this error on @Test annotation. How I can fix it? I have added JUnit library but that's not working. 回答1: JUnit Jupiter is part of JUnit 5. Chances are you've added an older version of JUnit (especially judging by the junit3 tag in your question). You need to add JUnit's Jupiter's engine and api jars: org.junit.jupiter:junit-jupiter-api:5.2.0 - https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api/5.2.0 org.junit.jupiter

How do I embed external .wav files in my JAR?

倖福魔咒の 提交于 2021-01-27 12:44:19
问题 I want to have one JAR and nothing else, I want all external resources to be contained in it. How do I do that? 回答1: What you are trying to do with the media will make it into what is typically called an 'embedded resource'. For that scenario, simply put the WAV files in the Jar and access them by URL. See this info. page for how to form the URL. 来源: https://stackoverflow.com/questions/12033089/how-do-i-embed-external-wav-files-in-my-jar

Manipulate the java class path of an Eclipse plugin?

我的未来我决定 提交于 2021-01-27 12:25:11
问题 I am working on a plugin that consist of a homemade view to Eclipse. When I run the plugin and display the classpath using System.getProperty("java.class.path") I get this as output : D:\Programs\eclipse\plugins\org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar I would like to add some .jar files for the proper functioning of my view, but I can't figure out how... I guess you can do it by adding some specifications to the MANIFEST.MF of the plugin but I don't know how to do it propely.

Dependency hierarchy view for maven in Eclipse Indigo

雨燕双飞 提交于 2021-01-27 10:45:58
问题 Can't seem to get the dependency hierarchy view with the latest version of eclipse (Indigo SR2). This post from almost a year ago indicates that the dependency graph is no longer supported but that the dependency hierarchy should be working Thanks sfk 回答1: Make sure to open the pom.xml file using the Maven POM Editor . Right-click the file, then select Open With > Maven POM Editor . This should give you the expected editor with the option to view the dependencies and the dependency hierarchy.

Dependency hierarchy view for maven in Eclipse Indigo

a 夏天 提交于 2021-01-27 10:44:28
问题 Can't seem to get the dependency hierarchy view with the latest version of eclipse (Indigo SR2). This post from almost a year ago indicates that the dependency graph is no longer supported but that the dependency hierarchy should be working Thanks sfk 回答1: Make sure to open the pom.xml file using the Maven POM Editor . Right-click the file, then select Open With > Maven POM Editor . This should give you the expected editor with the option to view the dependencies and the dependency hierarchy.

Dependency hierarchy view for maven in Eclipse Indigo

爷,独闯天下 提交于 2021-01-27 10:44:05
问题 Can't seem to get the dependency hierarchy view with the latest version of eclipse (Indigo SR2). This post from almost a year ago indicates that the dependency graph is no longer supported but that the dependency hierarchy should be working Thanks sfk 回答1: Make sure to open the pom.xml file using the Maven POM Editor . Right-click the file, then select Open With > Maven POM Editor . This should give you the expected editor with the option to view the dependencies and the dependency hierarchy.

后浪,谈谈你对jvm性能调优的理解

人走茶凉 提交于 2021-01-27 09:47:01
在我们日常的研发工作中, 经常会遇到系统的性能问题,这时我们必须进行系统的性能调优。系统调优分好多种,比如架构和代码优化、jvm调优、操作系统调优、数据库调优、tomcat调优、网络调优等。架构和代码优化是效率最高的调优手段,但是并不能解决所有的性能问题。今天我们要回顾的是一个老生常谈的话题,jvm调优。 本文主要包括以下内容 Java内存模型回顾 什么时候需要JVM调优 常见的OOM异常及案例 JVM自带监控工具 JVM常用调优参数 JVM第三方监控工具 调优案例 Java内存模型回顾 首先,我们以HotSpot回顾一下JVM的内存模型,见下图: HotSpot内存模型分为3个部分: 类加载器 类加载器用于加载java编译后的.class文件,提取其中的类信息以某种数据结构存放在方法区。 运行时数据区 线程栈和本地方法栈用于存放线程运行时方法调用等相关信息,程序计数器记录字节码指令在主内存中的地址,这3个模块都是线程私有的。 堆中存放程序运行时创建的对象。 对于jvm规范中的方法区,java8以前,HotSpot对方法区的实现是在永久代。从java7开始,HotSpot开始移除永久代,符号引用迁移到native heap,字面量和类静态变量移动到java堆。Java8中HotSpot彻底废弃了永久代,用元空间来取代永久代实现jvm规范中的方法区。元空间用来专门存储类的元数据

Maven project with PI4J library - error in opening zip file

前提是你 提交于 2021-01-27 07:36:49
问题 I've got quite strange problem with pi4j library to Raspberry Pi. I have Maven project in Eclipse and just added repository and dependency for pi4j like this: <repository> <id>oss-snapshots-repo</id> <name>Sonatype OSS Maven Repository</name> <url>https://oss.sonatype.org/content/groups/public</url> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> </repository> <dependency> <groupId>com.pi4j</groupId> <artifactId>pi4j-core</artifactId> <version>1.0-SNAPSHOT

Maven project with PI4J library - error in opening zip file

心已入冬 提交于 2021-01-27 07:36:29
问题 I've got quite strange problem with pi4j library to Raspberry Pi. I have Maven project in Eclipse and just added repository and dependency for pi4j like this: <repository> <id>oss-snapshots-repo</id> <name>Sonatype OSS Maven Repository</name> <url>https://oss.sonatype.org/content/groups/public</url> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> </repository> <dependency> <groupId>com.pi4j</groupId> <artifactId>pi4j-core</artifactId> <version>1.0-SNAPSHOT