Questions tagged [java]

Java (not to be confused with JavaScript or JScript or JS) is a general-purpose, statically typed, 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 programs. Use this tag for questions referring to the Java programming language or Java platform tools.

0
votes
0answers
5 views

Why travis doesn't set correct JDK?

I'm trying to set up travis build with JDK13, using for it two ways - by setting jdk parameter to openjdkea - by downloading jdk and setting env variables (installation tested locally), And still ...
0
votes
1answer
10 views

Cannot read HttpServletRequest payload

I want to create Filter which prints the requests and response payload. I tried this: @Component public class HttpLoggingFilter implements Filter { private static final Logger logger = ...
0
votes
0answers
7 views

How can we configure security response headers in wildfly 10, is it possible to achieve it using servlet filters?

How do we configure security response headers in wildly 10, is it possible to achieve it using servlet filters?
0
votes
0answers
5 views

How do I capture the entire screen in Selenium when page has left and right scrolls

I have a Selenium-Java based Automation testing framework and I need to capture the entire screen when linking screenshots to reports. The page is long and wide and has both horizontal and vertical ...
0
votes
0answers
4 views

Class cast exception when invoking JBPM process through REST API and passing in custom object

I have downloaded JBPM business application templated from http://start.jbpm.org. I have added a custom data model in the model project and gave reference to the same in the kjar and service projects. ...
-1
votes
0answers
10 views

Add headers in apache spark Dataset in JAVA

The following question contains solution to add headers in dataframe in Scala language. I want to add headers in a Dataset in java language. add header and column to dataframe spark I am reading a ...
0
votes
0answers
4 views

How to return a data (image) to browser from activity (camera / image picker activity) which is triggered from browser

I've created simple camera app and launching it from browser() to take picture from multiple camera options if i choose default camera or 3rd party cameras (open camera, youcam..) an getting data back ...
0
votes
0answers
6 views

Common maven repository for GitLab CI

I hope someone can help me with a simple setup of maven CI scripts for GitLab. I tried to search stackoverflow and google, which results in several questions and answers, but either they seem to be ...
1
vote
1answer
8 views

Launch4J Plugin creates an EXE (along with JAR) but EXE cannot find main class

I wrote a plugin to create an EXE and JAR for my project with the help of Launch4J plugin. However, on executing the EXE file, I get the error - Error: Could not find or load main class However, I ...
0
votes
0answers
11 views

Modify @Scheduled fixedDelay at runtime not working

I have 2 schedulers running parallel, at fixed interval of time. I want to modify delay time on runtime. I followed below link, but the solution is not working for me. http://resolved-error.com/a/...
0
votes
1answer
12 views

making variable case insensitive from start.sh file in Java code

I just need to make system variable in jboss server case insensitive. variable is defined in start.sh file as below: cd /opt/logs nohup /opt/jboss/bin/standalone.sh -DmyEnvironment=Release_19.2.2_ST ...
0
votes
0answers
9 views

Data could not upload to firestore and “Couldn't load memtrack module” on Logcat

I am trying to upload some data using android studio to firestore but the data could not update to firestore orderAddBtn.setOnClickListener(new View.OnClickListener() { @Override ...
0
votes
0answers
6 views

Accessing SSL truststore initialized by Spring

We're using SSL handled by Spring Boot 2.0.7 by setting up properties group under server.ssl. Is there any way to inject/access the the stores initialized by Spring from properties server.ssl.key-...
0
votes
0answers
3 views

Where is the Rhino javascript JSR-223-wrapper for use in JDK8?

My purpose is to have a JSR-223 javascript engine available in the AdaptOpenJDK 8 VM. So i thought to use the already familiar Rhino. The OpenJDK wiki document here https://wiki.openjdk.java.net/...
-1
votes
1answer
18 views

How to fix “Expected URL scheme 'http' or 'https' but no colon was found” error?

In my app, I'm trying to connect with API using hashmap from a fragment. The issue seems to be that the async task through which I'm connecting to the API doesn't want to accept my request. The error ...
-4
votes
0answers
18 views

JSP and Java Servlet: Relevant in 2019?

What is 'JSP' and 'Java Serlet'? Is it wise to learn them in 2019? What are the alternatives present for JSP, and is PHP relevant to JSP?
0
votes
0answers
10 views

How can save preferences xml file inside of project directory?

I have some data that dont need to save in database table. when use preferences API i can not save .xml file inside of my project directory. it is possible? or any simple way to read and write data to ...
0
votes
0answers
6 views

Jersey API in Java to stream input data file to another API without storing temp data

I've created an API with Jersey, this API get a file from a client and push it to another API (not a local API but it doesn't matter) I wonder if it's possible to stream received data directly to the ...
0
votes
0answers
4 views

JGit: git log -m --oneline --full-history File.java (Show all commits, incl. merged, for file)

I am trying to retrieve a list of all commits affecting a file, including the commits on another branch, which is merged into the master branch (renames should be ignored, i.e., no --follow). More ...
0
votes
0answers
5 views

Encoding problem with file generated by Java program for a VB application

I have a tiny Java Encryption program that reads in a csv and generates an encrypted csv file to be uploaded to a VB application but the VB application after decrypting is not able to display the ...
0
votes
2answers
13 views

maven.springframework.org/release was cached in the local repository

I have this repository in my pom.xml: <repositories> <repository> <id>spring-maven-release</id> <name>Spring Maven Release Repository</name> ...
0
votes
0answers
14 views

How to map a simple Kotlin data class to/from json with Jackson and spring-boot

I cannot read a simple kotlin data class from a json string. Writing to json works fine, but when reading from json: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot construct ...
1
vote
0answers
15 views

JNDI reference and lookup resource without web.xml

My application has an external dependency where resource class is defined - e.g com.sample.SomeResource. The application server where my application runs on, provide environment resources which I can ...
-1
votes
1answer
54 views

Can't split String [duplicate]

I'd wanted to split string, but for some reason I've received this error java.lang.ArrayIndexOutOfBoundsException: length=1; index=1 Here's my code string value is "88km N of Yelizovo, Russia" ...
0
votes
0answers
16 views

Android Scrolling Activity with circular profile image view

I am creating an android scrolling activity for profile, i want the scrolling activity to include a circular image view for user's profile and make it hide and collapse with the action bar, when the ...
-1
votes
0answers
20 views

Error inserting DateTime values on database

I searched for this online and some posts even here on stackoverflow talk about this but never resolve to my problem. I am having a problem inserting DateTime into database. The first problem is that ...
0
votes
1answer
32 views

How to convert a String AM/PM date to Timestamp in Java? [duplicate]

I want to parse a date that includes AM/PM format from String to Timestamp. Although when I try to parse this date: Dec 31 2017 12:00AM I get a Exception in thread "main" java.text.ParseException: ...
0
votes
1answer
31 views

Adding items into database

I want to add data into my database but i constantly get errors and i cant find a solution for my problem online. package sample; import javafx.event.ActionEvent; import javafx.fxml.FXMLLoader; ...
0
votes
0answers
7 views

Why ant could not find class of listener when I already add jar to lib?

I'm trying to add a listener to ant. ant -lib /*/ParfaitAntTools.jar -listener *.ParfaitBuildListener But it keeps telling me: BUILD FAILED Class not found: *.ParfaitBuildListener I don't ...
0
votes
0answers
29 views

Java - execute a .jarfile on a Linux server

I have a java application with the content " executing a shell script" . I implemented a process builder to load a script (the script is located on my Linux server). But I think there is something ...
0
votes
0answers
21 views

Could not load or find main class

I was working on a Client-Server architecture on Java through Netbeans 8.0.2 . When I try to run the Client file through Powershell terminal while my Server is already working in background on my ...
0
votes
0answers
9 views

Java Web Application is Working fine with apache-tomcat-8.5.34-windows-x86, but not with apache-tomcat-8.5.40-windows-x86

I have a Java web application which is deployed in windows server 2008 r2 32 bit machine and it is working fine with apache-tomcat-8.5.34-windows-x86. The same web application doesn't work with ...
-2
votes
0answers
7 views

Project Managment Web with Activiti BPM

I have a task to do following: A web application where users can create projects Project -> Phase -> Gate -> Task All crud operation with basic information to be saved (what can be the robust and ...
-1
votes
1answer
55 views

How to pass array elements in constructor?

I have an assignment in which I have a constructor having a name and a result array that contains the marks for 5 subjects. I created a constructor and passed Name and Array using a for loop. But when ...
-1
votes
0answers
16 views

How to Encrypt an AES method video file?

How do I encrypt an AES method video file on an SD card? It needs to be in blocks of 512 bytes, and can be decrypted and played using ExoPlayer
0
votes
0answers
7 views

How to refresh the DOM tree in Selenium so newly generated elements are shown?

I want to get a DOM element which is not existent on page load, but is added afterwards using a script. The exact scenario is as follows: I load up https://www.binance.com/de/trade/pro/XRP_BTC I ...
0
votes
0answers
13 views

How to create rows in html table with java

I have to export values from cvs file into arrays and then export it in html table.. I have tried classic for loop, but that made code do not work String csvFile ="/Users/baab/baab/baab/data....
0
votes
1answer
40 views

Handle exceptions in a rest controller in Spring Boot

I create REST web-service with Spring Boot. I would like to know what is a better way to handle exceptions in a controller. I have seen other questions and didn’t found an answer. My controller: @...
-2
votes
0answers
25 views

Can't upload a project in Gitlab

I'm new in Gitlab. I'm trying to upload an existing project in java (IDE eclipse oxygen) to my Gitlab project to be able to share with other people, but it only let me upload independent files and not ...
-2
votes
0answers
24 views

Problem to convert dataframe to a textfile

I have a spark dataframe and I need to write it in a textfile with a specific format. I have tried to convert my dataframe to rdd and than write it as a text file. JavaRDD<Row> a2 =df.rdd()....
-1
votes
0answers
32 views

Getting a null pointer error in android studio when trying to start new activity [duplicate]

I'm getting a null pointer error in android studio when trying to start a new activity, but I cant workout why the reference is null.I have tried everything I can think of and have made no progress in ...
-1
votes
0answers
18 views

getting persistence exception when i am giving request from post man (FROM clause of query has class com.zomant.entity.Student but no alias) [duplicate]

"i am sending two ids(state id and city id) based on that 2 ids i need to get some data from data base " // this is my service class @POST @Produces({MediaType.APPLICATION_JSON}) @Consumes({...
0
votes
0answers
5 views

What is the best mapping.ttl file for converting xml file into RDF by using RML-Mapper library?

I am using RML-Mapper library in order to convert xml file into rdf file. For the following xml file, catalogs.xml, I am having troubles to write the best mapping.ttl. My question is, what is the ...
0
votes
0answers
9 views

Noclassdefffounderror running javafx inside java app [duplicate]

I have a game server which requires java clients to connect with it to play. The client is written in java and works perfectly. Now for music i am using a Javafx mediaplayer which launches after the ...
0
votes
0answers
9 views

How can logout Instagram after got token in java

I read Instagram API doc and i got code , then used code to get access token and user data as show in below code final RestTemplate restTemplate = new RestTemplate(); final HttpHeaders ...
1
vote
1answer
14 views

How can I resolve OnSucceslistener on a TabLayout Fragment

This is the Database[][1] I am trying to populate the layout I made on a tab layout Fragment with data from a Cloud Firestore database and with the following code the error says that: success ...
0
votes
0answers
19 views

How to retrieve multiple data in one column field in db and show it each by each into input field

I want to saved a 2 input field with the same path. I want to display a data, I have two input fields with the same path. But unfortunately when i click update it shows in each field the two ...
2
votes
1answer
38 views

How to continue providing method on array until it's become equal to other array

I have int1[k] array with values equal to it's indexes {0,1,2,3...}. I also have a method1 that takes that array and returns another int2[k] with values shuffled in such manner: initial deck: ...
0
votes
3answers
29 views

How to get cookies from every request in Spring?

I have a Spring REST API. It is a something like a middleware - user send request to this app and this app is sending request to other API. Every time I need to get cookie named Ltpa from request to ...
0
votes
1answer
19 views

Configure .jar to expose its dependencies

I have 3 modules: annotations, annotation_processor and app. annotations/build.gradle apply plugin: 'java-library' dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) } ...

http://mssss.yulina-kosm.ru