Questions tagged [eclipse]

50606 questions
1

votes
2

answer
3.4k

Views

How to resolve java.lang.NoSuchMethodError [duplicate]

This question already has an answer here: How do I fix a NoSuchMethodError? 27 answers I have a project that I can run correctly from within Eclipse, but running the standalone jar gives me the java.lang.NoSuchMethodError for a class at runtime. I unpacked the jar file and can see the class file i...
user2777473
1

votes
1

answer
49

Views

runtime.getruntime.exec does not recognize executable file

I am using Runtime.getRuntime().exec() method for running 'optimathsat.exe' file. My code is like public boolean runOptimathSat() throws InterruptedException { boolean runSucceed = false; smtInputFileDirectory = getInputDirectory(); txtOutputFileDirectory = getOutputDirectory(); optimathsatDirectory...
1

votes
1

answer
24

Views

jUnit test doesn't output anything

I am new to jUnit and I am running a test for the output of when the program is run. My jUnit test is: class Tests { private final ByteArrayOutputStream outContent = new ByteArrayOutputStream(); @BeforeEach public void setUpStreams() { System.setOut(new PrintStream(outContent)); } @AfterEach public...
NorthernStars
0

votes
0

answer
5

Views

Error starting Web sphere 8.5 application server

Recently, Websphere 8.5 application server has been corrupted. I receive the below error while starting the server. Have uninstalled the server completely and reinstalled again. Tried to start the server from startServer.bat in IBM\WebSphere\AppServer\bin folder. Thanks for the help in advance Clas...
Gopinathan
1

votes
2

answer
11.3k

Views

Make: *** multiple target patterns. Stop

I'm currently working on an introductory C++ project, using Eclipse Juno, with CDT and Cygwin C++. I'm using an MVC architecture and have just gotten the code to a point where I can run the executable and see some results. When I build the application, the compiler doesn't throw any errors; howeve...
floppsb
0

votes
0

answer
4

Views

Required projects on eclipse keep disappearing after maven clean build

I have a pom as follows. 4.0.0 com.kt.web KT-web 1.0 ktweb Web App org.springframework.boot spring-boot-starter-parent 1.5.9.RELEASE UTF-8 UTF-8 1.8 1.2 2.2.2 4.0.4.RELEASE ... ... org.springframework.boot spring-boot-maven-plugin kt-web com.kts.common kt-common 1.0 Whenever I run maven clean instal...
user826323
1

votes
3

answer
1.7k

Views

Java remote debugging, eclipse can't stay connected

I have an issue when I try to remote debug via eclipse. These are the arguments I use: -Xdebug -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=4044 I also tried setting the address to 0.0.0.0:4044, using this: -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4044 I have tried a...
marko
1

votes
2

answer
5k

Views

How to launch activity from Navigation Drawer?

So I've searched allot about navigation drawers here, and when I was pointed to a tutorial from an answer in another persons question. I did so. I successfully managed to create and style the nav drawer to my liking. But now I've been searching tirelessly on how I can launcher activities from the n...
Robin
0

votes
1

answer
20

Views

Java - Connect Four game wont stack different counters above three

I cannot work out why counters wont stack above 3 when there are different counters in that column. For example, in the image below, you can see that the first 3 counters are placed fine. However, if I try to place a counter in the second column for a fourth consecutive time, nothing is added and th...
Ben Craig
3

votes
0

answer
16

Views

How to build same source code twice with different dependency version, in both Maven and Eclipse?

I would like to build two different versions of a custom SonarQube (SQ) plugin; one for SonarQube 6.7.x LTS release, one for the latest 7.6 release. At the moment, I have a Maven structure similar to the following: parent common: Common code used by both tool and both plugin versions, doesn't use SQ...
rsenden
1

votes
2

answer
1.8k

Views

cursor.next() always returns “java.util.NoSuchElementException”

I am writing a program in java which reads query results from MongoDB. Below is the code (which gives an exception): if(output != null){ BasicDBObject whereQuery = new BasicDBObject(); DBCursor cursor = null; for (DBObject obj : output.results()) { String UserID = obj.get('UserID').toString(); where...
rakemen
-1

votes
2

answer
15

Views

How to simulate specific code part as if previous ones were executed

I'm writing automation code by using selenium web driver in eclipse. as per my assumption, whole case execution time probably will take about five minutes but once my code got error, i have to run it from the beginning after changing the code to see whether changing part is working fine or not. Is t...
santino87
0

votes
0

answer
11

Views

Maven project : IOException error when creating a Jar file

I try to create a jar file with a Maven project but when i run the jar file I have a IOException.Is there something to add to the pom.xml file? I use a Maven project because i have to add jfreechart dependency. Thanks you
Daniel xx
1

votes
1

answer
1.1k

Views

Custom Constraint Validator Annotation

I'm trying to create a custom constraint validator annotation. This is my annotation definition below. Eclipse complains that the 'Target annotation is disallowed for this location.' The same goes for Retention and Constraint. I'm using Java 1.7 package com.test; import static java.lang.annotati...
user994165
1

votes
1

answer
21.1k

Views

bootstrap navbar not working correctly

Im using tomcat 9, java, bootstrap to develop a online forum. Suddenly the navigation is not working, i tried a few things but no luck. In the chrome network inspector tab everything seems fine. Index Toggle navigation Index Profile Logout screenshot: localhost:screenshot
Zozo
1

votes
1

answer
3.4k

Views

java.lang.NoClassDefFoundError: org/apache/poi/xssf/usermodel/XSSFWorkbook

I was getting this exception but I am not able to understand what is happening there. Because on compilation time my class able access apache POI classes but on runtime my classes throws exception that he is not able find org.apache.poi.xssf.usermodel.XSSFWorkbook. Till now whatever solution is pr...
shreeram banne
1

votes
2

answer
1.5k

Views

Remote Debugging with JPDA won't connect to Tomcat through eclipse when using Docker-Compose

I'm very new to Docker so this could be something simple I'm doing wrong. With all the solutions out there I've been able to get remote debugging working with eclipse when using 'Docker run' to launch the Tomcat container. docker run -it --rm -e JPDA_ADDRESS=8000 -e JPDA_TRANSPORT=dt_socket -p 8888:...
Olmstov
1

votes
1

answer
1.2k

Views

how to customize TestNG report result with json format

I am working with TestNG and selenium webdriver java. I want to make a output report in json format, can testng make a report with json format?Please suggest me a example for this issue.
beginerdeveloper
1

votes
2

answer
302

Views

Eclipse: How can I have gradle dependencies deployed to Tomcat

I'm creating a web project using Gradle (buildship) in Eclipse (WTP). I've put the libraries I need as 'implementation' dependencies in my build.gradle, however they are not copied to Tomcat when I try to run the project from within Eclipse. When I build the WAR file (with gradle war), however, all...
niqueco
1

votes
1

answer
32

Views

How to find the minimum width to display the window title completely

I am maintaining some existing Java code so I am not looking to make major changes to the way it is currently done. I removed some items from a dialog, (which is fundamentally an org.eclipse.swt.widgets.Shell) and now the dialog displays much smaller, so small that the title and the menu bar do not...
Tharpa
1

votes
2

answer
43

Views

Eclipse IDE dead code warning with two conditions — how to suppress it?

In the code example below, the code block within the if statement is marked as dead code by Eclipse. This is expected because the code is indeed unreachable, however these final properties are intended to serve as a configuration in my actual codebase and may be edited. I can't get suppresswarnings...
Skere
1

votes
2

answer
70

Views

Liquibase resource found in both Maven target and Maven repository

I have Eclipse Maven GWT project and I added flowable-form-engine dependency that uses Liquibase. Liquibase is searching for changelog file org/flowable/form/db/liquibase/flowable-form-db-changelog.xml but finds two! org.flowable.common.engine.api.FlowableException: Error initialising form data sch...
Piro
1

votes
3

answer
35

Views

How do I restore usual workflow after a breakpoint in Eclipse?

I have a breakpoint for debugging. But let's say, I don't need it on the first occurence, but I want Eclipse to pause the next time the breakpoint is reached. How do I do this? How do I skip it?
Bobby
1

votes
1

answer
28

Views

getting dummy value in C++ code rather than expected value

I am having issue in understanding that why my code is providing me some dummy value. Can someone help me out that where I am at fault and what is the reason ? #include #include class mypair { public: int a,b; public: int print (int first , int second) { a = first; b = second; std::cout
john
1

votes
2

answer
32

Views

Intellij highlight file in Project Explorer

In Eclipse, one can choose a File in Editor, right click and hight-light the file in Project Explorer. That will expand the tree, and one can see the file highlighted. I'm wondering how one can accomplish the same in Intellij IDEA.
Vineel
1

votes
2

answer
55

Views

Large Switch Case (60 different Cases) - how do I reduce? or refine the code

so I have a switch case that takes the input of the length of a side (in CM) and selects how long to spin the robot wheel for (in ms) for example user inputs 25 selects case 25 and sets the time to 2000ms but having 60 different possible cases (twice) I am confused at how to shrink this down? if it...
AliB2512
1

votes
2

answer
41

Views

Cucumber features are not being recognized by Eclipse

I have installed Natural 0.7.6 version plugin from Eclipse Market and the installation was successful. I tried Cucumber feature and Eclipse is not recognising the same. After installing Natural 0.7.6, I created a 'Features' package and added a file called 'login.feature' The keywords like Scenario,...
Chaitanya Maligi
1

votes
3

answer
46

Views

Catching multiple exceptions with Unit Method

I am trying to write a JUnit for my suchAutor() method. The Problem is that I throw two different Exception and I only know how to handle tests that throw one exception. public Buch[] suchAutor(String gesuchterName) throws IllegalArgumentException, FileNotFoundException { if (gesuchterName == '') {...
k1m0j
1

votes
4

answer
1.4k

Views

getting call hierarchy of a method using reflections

i used java reflections to get methods from a class(loaded those classes).Now i want to get the call hierarchy of those methods.How can i use call hierarchy option in eclipse IDE for that?any examples or links????
Steven
0

votes
0

answer
7

Views

Message “calling an undefined procedure lists : ” in running NQueens

when I want to run queens(8) ,Gives this Error calling an undefined procedure lists : middle_out([_281, _299, _317, _335, _353, _371, _389, _407], _7656) in module eclipse :- lib(ic). queens(N, Qs) :- % The model: Qs is a list of column numbers length(Qs, N), Qs :: 1..N, ( fromto(Qs,[Q1|Q2s],Q2s,[])...
ARZ
1

votes
3

answer
8k

Views

Android colour change of button at hover in android in eclipse

I am working on project of android in eclipse.Android version is 2.3.3. I had set my button colour and I can also change colour of button when it is clicked but when my cursor is on button , button colour have to change and as cursor moves away it should have the colour which it had previously , sam...
5extremers
1

votes
3

answer
2.4k

Views

How does one use SWT without eclipse?

I want to use swt to make GUIs but I do not want to use eclipse to program. Is there anyway to do this. Also,are there any GUI designers for swt that are not eclipse plugins.
user1659754
0

votes
0

answer
30

Views

how can i pass an sql query as a parameter to an other sql query in java?

Im writing a code to manage a cafe so in the frame i added a JTable where everytime i choose an item from a JComboBox it should show in the JTable. for this purpose i added a button and for its action i made sure every time i click it, it stores the item clicked from the JComboBox in a database and...
Wiam
1

votes
1

answer
307

Views

Eclipse : Can't import class from another project's test folder

I have two projects, lets call them A and B. B is a dependency in A's pom as my.group.id B 0.0.1-SNAPSHOT now i have some unit tests under src/test/java/ in project A. Here is a test class i have src/test/java/packA/testForA.java Also, in project B, I have src/test/java/packB/configForB.java I need...
AbtPst
1

votes
0

answer
112

Views

Can Java recognize a type parameter, T, as a super type of some class?

Background: I have 3 classes: A, B, C where they all extends 'Super' and implements 'Interface' and I want to write code that only uses only the methods from 'Super' and 'Interface' Unfortunately, I don't have control over the source code of A, B, C, 'Super', 'Interface' to change the inheritance ch...
Sgene9
1

votes
0

answer
27

Views

CTRL+clicking on function not navigates to function definition

Trying to get navigated when ctrl+clicking on function to is definition. I have two C++ projects in my Eclipse workspace. First one - small and it works fine - I do ctrl+click on function and it navigates me to clicked function body. Second project is large and ctrl+click not works. Maybe somehow it...
vico
1

votes
0

answer
60

Views

Maven: Packaging a jar with separated external resources and dependencies (including external dependencies)

Here is what I'm trying to achieve - a dist directory that looks like this: dist/ |-- application-1.0.jar |-- resources/ |-- application.properties |-- testing.config.xml |-- training.config.xml |-- ... |-- lib/ |-- *.jar That is, I want to produce a folder 'dist', that will contain my application-1...
Hussein Dahir
1

votes
0

answer
205

Views

Sbt ( new version 1.0.4) assembly failure

I have been trying to build fat jar for some time now. I got assembly.sbt in project folder and it looks like below addSbtPlugin('com.eed3si9n' % 'sbt-assembly' % '0.14.6') and my build.sbt looks like below name := 'cool' version := '0.1' scalaVersion := '2.11.8' resolvers += 'Hortonworks Repositor...
ram
1

votes
1

answer
180

Views

Vaadin: Problems with Calendar addon - can't compile widgetset

I've wanted to add Calendar (https://vaadin.com/directory/component/calendar-add-on) to my project. So I've added dependency to my pom.xml. When I run project with calendar component I've got error in place, where component was: Widgetset 'com.vaadin.DefaultWidgetSet' does not contain an implement...
Michu4000
1

votes
1

answer
85

Views

How to set PHPTools preferences in Eclipse 4.7.2?

I recently reinstalled my system and Eclipse PDT, now I'm faced with the following problem. I seem unable to open the workspace preferences for CodeSniffer. Via Window / Preferences / PHP Tools / PHP CodeSniffer, I get two error messages: - 'Could not accept changes', 'The currently displayed page c...
Frans-Willem Post

View additional questions