Questions tagged [java]

Java (not to be confused with JavaScript or JScript or JS) is a general-purpose object-oriented programming language designed to be used in conjunction with the Java Virtual Machine (JVM). "Java platform" is the name for a computing system that has installed tools for developing and running Java ...

0
votes
0answers
2 views

How can I copy to clipboard (from a ViewHolder)?

I tried to copy the text from the ViewHolder (not onclick) :ClipboardManager clipboard=(ClipboardManager) getSystemService(CLIPBOARD_SERVICE);ClipData clip=...
0
votes
0answers
3 views

How to print Landscape report on custom paper size with Crystal java runtime?

I have my own Java application which uses Crystal java runtime. I print crystal report in following way:reportClientDoc.getPrintOutputController().printReport( printOptions );reportClientDoc is a ...
0
votes
0answers
2 views

How can I view the source of a private class imported in gradle in IntelliJ

I want to view the implementation of org.springframework.context.annotation.internalPersistenceAnnotationProcessor which I suspect is a private class. I've added the intellij plugin to my build.gradle,...
0
votes
0answers
5 views

How to avoid StackOverflow on bidirectional relationship in hibernate/jpa?

I'm thinking how to avoid StackOverflow on my query. I need bidirectional relationship because once I will ask for Happening to get the Place of that, and the other way I will ask for Place to get ...
0
votes
0answers
4 views

Embed Something Like Google Instant Answers in an Android App

I am trying to create an application where a user types information that he wants to find out about probably through an editText. And then it gets the answer to the question from Google search results,...
0
votes
1answer
25 views

How do I convert String of months, such as “January”, “February”, into a integer value?

I have a project called Incidents that have the following variables, value, month, year and postcode. I have opted to write my month variable of type String due to preference but am aware that some ...
0
votes
0answers
7 views

How do I save changes to variables in jpanel?

String user=user;if("disable".equals(e.getActionCommand())) {user=JOptionPane.showInputDialog(null, "Please enter your name.");int conf=JOptionPane.showConfirmDialog(null, user+"...
0
votes
0answers
5 views

Image get corrupted while storing and retrieving it from database using Spring MVC

I am getting problem while storing and retrieving image from MySQL database. I am able to save the image in MySQL database in following manner.JSP Page(Multipart Object) -> byte[] in Service class ->...
0
votes
0answers
4 views

EJB Module cannot find interface from dependency

I'm having trouble with starting a Java EE application.For starters, I have a maven module (let's call it A), with couple of interfaces, some of them marked as @Remote.I have a module (named B), ...
0
votes
0answers
25 views

Recursive issue

I'm coding an algorithm that solves a puzzle, the puzzle is this Image puzzle the puzzle is solved when the green dots are making a triangle between the three circlesI got three arrays, each one ...
0
votes
0answers
14 views

Java - sendAsync() null pointer exception

I am trying to send messages between two processes in Java, using Atomix. I have a program called Starter that is responsible to send a Message to all the running processes that are waiting for that ...
0
votes
2answers
25 views

Why can a Java generic class implement a method of a generic interface with Object parameter?

Here's the Java code:public interface myInterface<T> {void doSomething(T yes);}private static class myInterfaceImpl<T> implements myInterface<T>{@Overridepublic ...
0
votes
0answers
7 views

Can Apache OfBiz be installed with an existing version of Tomcat

I installed Tomcat last year with mod_jk for Dashbuilder. I'd like to install OfBiz which also uses Tomcat but it appears that Tomcat is included in the OfBiz files. How can I run Tomcat with ...
0
votes
1answer
10 views

using scanner input escape sequence not working

Below is the code in which i ask user to enter string and also i give a value to another string .public static void main(String[] args) throws Exception {Scanner sc=new Scanner(System.in);String ...
-3
votes
2answers
25 views

Can't Clear ArrayList everytime the method runs

public void incorrectlive() {ArrayList<String> Wor=new ArrayList<>();ArrayList<String> Def=new ArrayList<>();LinearLayout layout=(LinearLayout) findViewById(R.id....
-2
votes
0answers
21 views

Is it possible to call a double from a action listener

so im making a simple bank account program and im having trouble calling the value after it has been converted to a double `package banksssssssssssssssssssssssssssssssssssssssss;/** this is a ...
0
votes
0answers
16 views

How to read a value from properties file in a javascript file

I have a spring-boot project which serves angularjs. Both the front-end and back-end code are in the same project.In my angularjs service.js files I am calling the back-end service.I have different ...
0
votes
0answers
18 views

When I run The Junit Test Case in Eclispe I am getting The errr

Error occurred during initialization of VMjava/lang/NoClassDefFoundError: java/lang/ObjectThis is the error I received while running the test Case.This is the file.package com.shanu.shopbackend....
0
votes
0answers
6 views

JMS 2 MDB listen to multiple queue

I use JavaEE 8 on Liberty 18.0.0.2 .I setup jms activation config like this (server.xml): <messagingEngine><queue id="application" /></messagingEngine><...
0
votes
0answers
7 views

How to create a PDF from a free marker template in spring boot using maven project

Could you please check how to create the PDF data using the free marker in spring-boot using Maven Project
0
votes
0answers
11 views

Convert List of ProtoObject to Json

I have defined a proto like this ...Message AuditEventDTO {optional int64 timestamp=1;optional string ipAddress=2;optional string userName=3;optional string entity=4;repeated string ...
-3
votes
0answers
18 views

How to add a String array into JTable

I have a String array.This array have only c[0] element, it`s a formatting datas from parsed site.How i can add this data in JTable.JTable can have a 14 rows and 1 column, or if u can, just advice me ...
0
votes
0answers
8 views

Showing a .swf file in a WebView

can somebody help me please to show a .swf file into a WebView, I tried to do, but it shows a white windows instead of WebView. Also I tried to show a simple website and it shows also a empty window....
1
vote
4answers
37 views

How do I display the frequency of each letter in a string?

I want my code to display each letters frequency but instead, I'm getting an ArrayIndexOutOfBoundsException. I'm having trouble spotting what I did wrong. How can I rectify this? Here's my code:...
0
votes
0answers
41 views

Spring Boot RequestMapping not working on Linux Fedora 26

I recently started using Linux Fedora 26 and wanted to start a Spring Boot Application but it won't recognize @Controller and @RestController annotations with Thymeleaf. My HomeController class's ...
0
votes
3answers
50 views

convert array of numbers to array of words

I'm trying to convert array of numbers to array of words for example:{1,2} will converted to {"one","two"}so this is the code that I write in java:public static void main(String[] args) {...
0
votes
0answers
11 views

java soap web service how to get a list from a xml request

I work with a SOAP web service. I want to recover the list productOrder from a java. My problem is that the list productOrder recovered from the java class is zero.I dont't know how to recover this ...
0
votes
1answer
14 views

Spring boot returns 400 missing constructor no stacktrace

I have a post call with a public Test postTest(@RequestBody Test test) {}public class Test {@JsonProperty("EMAIL_ADDRESS")@NotNull(message="EMAIL_ADDRESS_NOT_NULL")@Size(min=1, ...
0
votes
0answers
11 views

Can I tell Jackson to simply set values of matching types when converting a Map to a POJO, rather than deserialising and reserialising?

Say I have the following class:public class MyPojo {public ZonedDateTime now;}To convert a Map<String, Object> into this POJO, according to http://stackoverflow.com.mevn.net/a/16430704/1225328,...
0
votes
0answers
12 views

Button is auto clicked if I select one button in recyclerview item

In my RecyclerView item, there is a button along with other views. I am hiding the button when it is clicked. Problem is, if I click the button on 1st item, the button on 8th item is auto clicked, if ...
0
votes
0answers
11 views

Custom JSON conversion List <->Map with Jackson

My Question is about JSON serialization/ Deserialization with JacksonFor some reason we need to serialize List of Objects as a Map, where the key is a field annotated with @MyID. We need to be able ...
0
votes
1answer
6 views

Add 'application.errorChannel' to config in Spring Integration

I have written a program to read messages from a Solace queue. I am getting the below error.Can you please help?Code given below:My main config is given below:public class ReadFromQueueConfig {...
0
votes
1answer
10 views

Selecting an element based on input type using Selenium (Java) in a dropdown

I have the following element:<input type="hidden" data-dojo-attach-point="vn" value="adrija" aria- hidden="true">The above element is an element of dropdown. private WebElement internal=...
0
votes
0answers
2 views

While sending one image file from JSP to JSP page, how can I read it?

I have used the code shown below in JSP file to take input files in png, jpeg and jpg format.Citizenship: <input type="file" name="citizen" value="Citizenship" accept="image/png, image/jpeg, ...
-7
votes
2answers
51 views

Java: Finding duplicate in array

I need to implement a duplicate search method in my program, but getting errors. If I comment out the duplicate search part, the program runs fine. Prompt: The program takes a bunch of numbers ...
0
votes
0answers
13 views

JAVA 11 and JavaFX in IntelliJ IDEA

I created JavaFX project in IntelliJ IDEA 2018. I have installed Java JDK 11 and my project (Maven) includes all needed dependencies:<dependencies><dependency><groupId&...
0
votes
0answers
6 views

no such algorithm: RSA-SHA256 for provider Cavium

Iam get next error no such algorithm: RSA-SHA256 for provider CaviumThe provider has already been added to the java.security fileAdd my codeString algorithm="RSA/None/...
1
vote
1answer
15 views

How to Sign multiple Jars with Maven JarSigner

I have a program that generates two JAR files from the maven-assembly-plugin. I want to use the maven-jarsigner-plugin to sign both jars. When I apply the the basic jarsigner, it only signs one of the ...
0
votes
2answers
23 views

Storing Data on a Local Database

Thanks to contributors from Stackoverflow, I was able to develop my first Android app using Android Studio without any prior knowledge of Java.It's an unique-interface barcode scanning app (using ...
-3
votes
0answers
9 views

i am trying to manually convert this as3 to html5

hello im trying to convert this as3 code to html5 can some one please help me here's the codehello im trying to convert this as3 code to html5 can some one please help me here's the code...
0
votes
0answers
12 views

Spring Boot application: Hibernate dialect issue when implementing dependency injection in Filter

I have a Spring Boot application connected to a Phoenix database. To communicate with the database, I'm using Hibernate dialect: com.ruesga.phoenix.dialect.PhoenixDialect.This was working fine....
0
votes
1answer
53 views

How can you tell if a JDK class is implemented natively instead of in java code?

For example, when exploring source classes in IntelliJ, and you find a class like Constructor in java.lang.reflect...The parameters to all the methods are var0,var1,var2,...varN. But other than that, ...
0
votes
1answer
12 views

Have multiple repositories for the same class in spring data mongodb

So I have a data class x that I want to have 2 repositories for. Both repos Y and Z should be capable of storing Documents of type X.The problem is that when I use MongoRepository in both repos .. ...
0
votes
1answer
13 views

JTable appearing blank

I will only post the part that matters.I have created a JFrame with a JPanel in it, that contains some JTextFields, JTextAreas and a JList. I know want to add a JTable to show some results, but it ...
-1
votes
0answers
17 views

Tokenizer that splits on whitespace and lowercases tokens in java

I wanto to create a tokenizer that splits on whitespace, lowercases tokens and I'm using Netbeans. I'm having trouble in finding a expression that works for both whitespace and lowercases. I'm using ...
0
votes
0answers
10 views

Jhipster/spring boot static resources pdf file not bundled

I have created jhipster monolithic application (signupApp) "jhipsterVersion": "5.2.0",I have added a "doc" directory under \src\main\webapp\content\doc with a pdf filethen added an entry in ...
-2
votes
0answers
12 views

Given a string str containing both lowercase and uppercase English alphabets

Given a string str containing both lowercase and uppercase English alphabets. Write a program to find out a character whose both uppercase and lowercase value occurs in the string at least once. If ...
-1
votes
0answers
12 views

Redirect a word to an URL in tomcat

Hi I'm using Apache Tomcat/8.5.11 and I want to know how to redirect a word to my web-application, in example if I write in my browser "sales/" I want that automatically redirect to "servername:8080/...
-1
votes
0answers
5 views

Get online predictions using android from model on google cloud machine learning platform?

How can i use android to make an online prediction call to model stores on google machine learning platform and get the result of the prediction in the android application using java?Any tutorials or ...
-1
votes
0answers
6 views

Reactor 3, cannot find reactor.Environment

I'm following this tutorial:https://github.com/eugenp/tutorials/tree/master/spring-reactorbut it uses the reactor.Environment class, but I can't compile it because java does not find it.Does ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,