Category "java"

Unable to fetch data from test rail using java

I am using the API provided by Test rail to pull info using java. Below is my program. APIClient client = new APIClient("https://test.testrail.net/index.php?/r

Unable to fetch data from test rail using java

I am using the API provided by Test rail to pull info using java. Below is my program. APIClient client = new APIClient("https://test.testrail.net/index.php?/r

Arquillian and TimerService

So I have an EJB that has a @Schedule annotated method, and I want to test it using arquillian, what I can easily do invoking the method directly, but because t

DetachCriteria paginated query returns duplicate values

I've got a paginated detached criteria execution which return rows of an entity. The entity class is as following. @Entity @Table(name="POS_T_HTL_ITEM_GROUP")

DetachCriteria paginated query returns duplicate values

I've got a paginated detached criteria execution which return rows of an entity. The entity class is as following. @Entity @Table(name="POS_T_HTL_ITEM_GROUP")

java URL working on browser but not in client program

Client JAVA Program part : try { String downloadUrl1="https://www......&downloaded=1";

Detecting out of memory errors

I would like to provide my system with a way of detecting whether out of memory exception has occurred or not. The aim for this exercise is to expose this flag

What file extensions can be created/written with Java's Writer write() method?

I have a question about Java streams but I can't seem to find the answer in the documentation: What file formats or extensions can be written with java.io FileW

JetBrains IntelliJ Error launching Intellij Platform - Error invoking main method

I have IntelliJ IDEA and other JetBrains products installed and they worked great (PyCharm, Android Studio, Clion, WebStorm) till today, now I just get opening

Display errors in JUnit failure trace

I use Selenium Web Driver in Eclipse with JUnit. I need create simple checking if some text exists on the page - if it is, than I need generate error. I want th

Spring cloud function in azure throws null pointer exception

I have spring cloud function deployed to azure function app.The API works perfectly fine in the local developer machine. Whereas when deployed to azure, upon ca

JNativeHook Post a native key event

I tried to post a new native key pressing to the system using the java library https://github.com/kwhat/jnativehook. The method GlobalScreen.postNativeEvent()

Getting the list of softwares installed using Java on a computer

How can one get a list of installed software and its version in Java?

ArrayList equality in junit not working although expected and actual are similar

I am using below test method to check whether the Arraylist is sorted as expected. @Test void compareFields() { Assignment14 assignment14 = new Assi

Spring MVC request and response flow explanation

I can't find correct client request flow in below syntax.Could someone please clarify what is happening here? Client(1) --> Dispatcher Servlet(2) --> Han

How can I answer to callback in Java telegram bot?

I'm writing a Java bot with https://github.com/rubenlagus/TelegramBots, and I have a problem, when I click inline keyboard button, this little clock: appears an

Why cant I make an enum's inner class public?

Testing some things out I tried o make an enum in which every one element in a enum have a different class inside. Take for example: public enum MyEnum { f

How to separate range of integers into two equal parts

I have an array of integers like this one int [] num = {5, 8, 1, 1, 2, 3, 2} and I want to divide it into 2 parts, so that the total of 2 sets will be as equ

How to compare the elements of an ArrayList with every element of another ArrayList using Stream API of Java 8?

I have two Sorted ArrayList of same size, namely team_A & team_B, in which comparing every element of team_A with team_B to find the powerDiff > 0. After

Open a JPanel after pressing a button in a JFrame [duplicate]

I know this question has been asked, but I failed to find a solution. I created a JFrame for Login and I want after the button "Cont Nou" is