Questions tagged [java]

0 votes
2 replies
Groovy Code- Matching a field using regex and generating blank value if not a match
I have a field that was created based on some parsed and reformatted data. If the final result does not match a specific pattern, I want to repla...
asked 4 months ago
-1 votes
0 replies
Establish a mutual ssl authentication with java and spring boot
i want some explanations on how to do the client authentication in mutual ssl with spring boot .. i am using jhipster and i want to override the...
asked 4 months ago
0 votes
1 replies
Optimize getting parameter values
I would like to know if there's any difference of performance between these two ways of getting the parameter value in Java: Option 1: for(int...
asked 4 months ago
0 votes
0 replies
My code needs to stop from popping up JFrame
In my code, the pop up Jframe keeps popping up when the ball bounces of the wall.I want it to stop from popping up when ever the ball hits the wa...
asked 4 months ago
0 votes
0 replies
Instrument DB and http service call response time
I am building an java-agent which basically instrument to capture the response time of an DB or http call. One way is to write an annotation and...
asked 4 months ago
2 votes
0 replies
Is this a Java generic type inference compiler bug? [duplicate]
This question already has an answer here: String gets assigned to a List without a compilation error [duplicate]...
asked 4 months ago
-1 votes
0 replies
JavaFX: Combobox fails to be populated due to query MYSQL string [closed]
Wrote this method in the DBHandler of my project but the mysql code keeps failing to execute. In the method i passed a string variable as a param...
asked 4 months ago
3 votes
1 replies
Using jfugue, how do I generate random music strings (using player.play) from an array?
I'm using Jfugue in Eclipse, and I have a list of music strings in the code. When I run the code, it plays back all of them, but I want to play b...
asked 4 months ago
0 votes
1 replies
How to get data in this using retrofit
How to GET this type of JSON data using Retrofit? How can I solve this issue? MainActivity.java Api.getClient().getCategoryList(new Callback<...
asked 4 months ago
-2 votes
0 replies
How to use navigation drawer in android application [closed]
I'm having problems with my application. I have a Navigation drawer but I do not know how to make it work with my application; it does work separ...
0 votes
0 replies
hibernate ddl validation smallint vs int2
I have a legacy application that I want to upgrade to JPA. For local development and testing I have configured an H2 in-memory database, on the t...
asked 4 months ago
4 votes
1 replies
Processing: Arc code only creates circles. How to identify start and stop values correctly
I need to create an "arc" in this code. I've been working off some other code which successfully creates a circle, but I cannot understand how to...
1 votes
1 replies
Swagger UI with swagger.yaml in SpringBoot
We have a SpringBoot (version 1.5.12) REST Api with springfox-swagger2 and springfox-swagger-ui (version 2.9.2) @EnableSwagger2 public class App...
asked 4 months ago
2 votes
1 replies
How would i get a specific variable in response body after a POST request [duplicate]
This question already has an answer here: Android REST client, Sample? 6 answers...
asked 4 months ago
4 votes
2 replies
How to modify attributes before passing them to a superclass constructor?
The general question: Given a class like so: public class Super { private String value; public Super(String initialValue) {...
asked 4 months ago
0 votes
0 replies
Where did the outputstream go when no method are set?
So basicly I have some Java code making an HTTPURLConnection on an ip an send json in the output stream and I suppose to catch it on my php serve...
asked 4 months ago
-2 votes
3 replies
integer manipulation by reading its index
I have a integer value like 4590897, what i have to do is i have to shuffle this integer in a way so that i get output 4759980, its like rading f...
asked 4 months ago
0 votes
1 replies
Why is Saxon throwing an error with the CentOS-distributed saxon.jar, but not with the saxon code from sourceforge?
I have an existing CentOS 7 server (setup by someone else, of course) running Saxon. If I run: /usr/bin/java net.sf.saxon.Transform -s:input.xm...
asked 4 months ago
1 votes
0 replies
How to not create beans based on other beans?
I have a configuration class in which it's annotated with @Configuration. 2 beans get created. These beans are used annotated with @Profile hence...
asked 4 months ago
-3 votes
1 replies
How to create a button which will save current HTML page snapshot and save it as PDF [closed]
I am trying to create a 'Download as PDF' button which upon being clicked will download the current snapshot of the current HTML page in PDF form...
asked 4 months ago
1 votes
1 replies
Disable Base64 encoding while Serializing on Jackson ObjectMapper
I am using Jackson 2.2.3. When I serialize an object to JSON, all the byte[] properties are encoded to base64 in generated json. How do I disabl...
asked 4 months ago
0 votes
0 replies
How to add JTable to JTabbedPane in Java
I have a java desktop application that basically reads excels with apache poi (xls,xlsx) and also with BufferedReader for csv,I manage to get the...
asked 4 months ago
2 votes
0 replies
How to fix: "java.lang.RuntimeException: Unable to get provider com.mapbox.android.telemetry.provider.MapboxTelemetryInitProvider
I'm trying to integrate mapbox navigation in my android app and when I am trying to run the code for testing on a mobile phone, I get this error....
asked 4 months ago
0 votes
2 replies
How to place a 1D array into a line of 2d Array [closed]
Please excuse, me I am VERY new to coding. I have an assignment for school where I have to create a game board type of game. I have a 1D array cr...
asked 4 months ago
0 votes
4 replies
Prepend zeros to int java [duplicate]
This question already has an answer here: Right pad with zeros 7 answers...
asked 4 months ago