Java 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 programs. Use this tag for questions referring to Java ...

learn more… | top users | synonyms (7) | java jobs

0
votes
0answers
2 views

How to avoid unwanted pop up window using selenium webdriver?

When we are trying to open any page, In the middle or when the page is loading> if any unwanted pop up comes how can we avoid that pop up and work further to load the page.
0
votes
0answers
7 views

error:cannot find symbol -variable s of string

import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner sc=new Scanner(System....
-2
votes
1answer
14 views

getting NullPointerException in my project

Currently, I am getting trouble of passing data to the interface, because of NullPointerException:Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a ...
0
votes
0answers
7 views

AlarmManager is triggering before the scheduled time

I am trying to generate a notification after 10 minutes a particular button has been clicked.To do this I used AlarmManager and the NotificationManager classes. Below is my code MainActivity.java ...
0
votes
0answers
8 views

converting Instance type ArrayList to Instances object

I have an ArrayList which it's type is Instance, and I have read the positive instances from a file an add them to the arrayList. Now I want to know how can I convert the type of this arrayList to ...
0
votes
0answers
5 views

After updating android studio and new sdk am getting following error. How can i fix that?

Here is the error am getting when i try to build the app Error:Execution failed for task ':app:processDebugGoogleServices'. Please fix the version conflict either by updating the version of the ...
0
votes
0answers
5 views

Simple Java/Scala file copy that takes buffer/buffer size as parameter

I'm looking for a simple java copy file function that takes a buffer size. I've tried java.nio.Files, whose copy method doesn't take a buffer size, neither does apache commons FileUtils.copyFile. Am I ...
0
votes
0answers
3 views

How can I Generating Dashboard Report in jmeter

I am using to run jmeter2.12 tool in linux-fedora OS and Can i know, the steps to Generating Dashboard Report in jmeter. Kindly replay your answers. Thanks, Vairamuthu
0
votes
1answer
7 views

No qualifying bean of type found for dependency in JPA repository

I am learning spring JPA. I am facing errors in service - vehicleService class while accessing the repository vehicleRepository. Please find the below code snippets. Vehicle.java - Entity class with ...
1
vote
3answers
18 views

What do I need to close when using PrintWriter in Java

When using a PrintWriter like this : PrintWriter fileOut = new PrintWriter(new BufferedWriter(new FileWriter(csvFileIn))); What do I need to close in the finally block ? The PrintWriter, the ...
0
votes
0answers
3 views

ApacheFOP random 1 minute delay

I'm using ApacheFOP to render a massive quantity of documents in PDF, PNG and PS. I have recently updated from version 0.95 to version 2.1. After the update a small percentage of the renderings, less ...
-1
votes
0answers
13 views

How to send an Object within an object from Mobile application to a PHP web-service using Volley library

There is a Product class. A list of objects of product class is formed and that list is encapsulated within an object of Order class. both the classes are given below. Product.java package com....
0
votes
0answers
7 views

JWT token generated with Java JJWT signature fails at jwt.io debugger

I am using the jjwt java library for server side generation of jwt in on servlets, the code snipper below straight from the jjwt github page https://github.com/jwtk/jjwt generates and prints out this ...
0
votes
1answer
11 views

NullPointerException using WebDriverWait Boolean

I have two classes, one that runs the methods to click on buttons etc. On the page, there is a button that is disabled and I have a WebDriverWait to wait for it to be enabled again by checking that ...
0
votes
0answers
7 views

Steps to extract MFCC in Java

I am using the CoMIRVA API to extract the MFCC from an array of double values (already windowed). This values are interpolated to 100Hz (100 values/second) The MFCC-Constructor is expecting a ...
0
votes
1answer
6 views

JDK not found on Debian 8.5

I want to make a python-android-app using this software. I have installed java JDK, when i run java -version i get: java version "1.8.0_91" Java(TM) SE Runtime Environment (build 1.8.0_91-b14) Java ...
0
votes
2answers
28 views

Can static method access non-static instance variable?

So my understanding was that you can't use static method to access non-static variables, but I came across following code. class Laptop { String memory = "1GB"; } class Workshop { public static ...
0
votes
0answers
6 views

unable to access the values of methods in Beanclass

<jsp:useBean id="bc" class="com.go.Credentials" scope="session"/> <% out.println( bc.getUserid()); %> I want to access methods in my bean class Credentials , when i am trying to do ...
0
votes
0answers
6 views

LDAP properties binding fail

I have a bean with LDAP properties for authentication manager. When I'm explicitly putting properties in there it does work, but when I started to use .properties file, it gives me an error. ...
0
votes
0answers
14 views

Hibernate sending null values to database table

I am using Dropwizard java example implemented HERE I only made one change replacing database with SQL server.it is working well by creating table with columns in sql server too. Post request to ...
0
votes
1answer
23 views

How to validate request parameters in Spring REST controller

I am working on a Spring REST application. This application has only REST controllers, no view part. I want to know how can I validate a @RequestParam For example @RequestMapping(value = "", params = ...
3
votes
4answers
35 views

Is Java RoundingMode.HALF_EVEN bug?

When I rounded a double number with HALF_EVEN mode , I found a problem, I don't know whether it is a bug of JDK? Please see the following code: public static void main(String[] args) { ...
0
votes
0answers
9 views

Custom metrics using Java Melody

I am using Java Melody as a monitoring tool for my application. It is giving me a good monitoring data. Now I am thinking of creating my own custom metrics which are specific for my application. I ...
-12
votes
0answers
31 views

Is it possible to write multiple catch blocks for only one try block,If possible what is the hierarchy i have to follow? [on hold]

I want to know about this exceptions perfectly,so please give brief explanation
0
votes
0answers
10 views

How to prevent Jackson from serializing the response from a controller method in spring mvc based rest api

I am developing an angular 2 app that requires to serve a file by making a request for a file at the backend. I am returning the requested file's File object from the backend. But the jackson is ...
0
votes
0answers
13 views

Executable Jar runs GUI only, but not the function

so I' ve created a project for a XML/XSLT transformation, build successfully an executable jar, but on double click it only opens my Frame. I can choose Files from the Filechooser as well, but for ...
-1
votes
1answer
12 views

Angular 2 Application with Spring Security and fetching data from Spring REST Service

I am working on an application architecture which will have independent UI Layer(HTML5 and Angular2) and Service Layer(Spring Boot Project) . Both will be hosted on independent servers. The UI layer ...
2
votes
0answers
39 views

Validating TextView in Android

I am making a reminder app in which the user needs to set date and time from date and time pickers. So I did the following: private TextView mDateDisplay; private TextView mTimeDisplay; ... // ...
2
votes
2answers
61 views

Cannot cast int to long in Java 8

I'm upgrading my project to Java 1.7 to 1.8. When I compile my code, it gives a compile error as int cannot cast to long. Here is the expression which returns a primitive long. returnList != null &...
1
vote
0answers
9 views

Is determinePrimaryKeyJoinColumnName() ever used in Hibernate 5 ImplicitNamingStrategy?

I am working on hibernate 5 and implemented the ImplicitNamingStrategy interface. Among other methods, there are two methods called determinePrimaryKeyJoinColumnName(...) and determineJoinColumnName(.....
0
votes
1answer
3 views

New Line in MapMarkerCircle, JMapViewer

So i am new to JMapViewer (and StackOverFlow). What I am currently trying to do is to develop a real time graphical representation of a network, where the background is a map of the area. So far it's ...
-2
votes
4answers
44 views

Why does Android Studio warn me about a Boolean parameter always being false?

Take a look at my code below: private void implementVisibility(EditText A, EditText B, ImageButton C, boolean visible) { if (visible) { A.setVisibility(View.VISIBLE); ...
0
votes
1answer
19 views

Socket taking too long to read data (BufferedReader)

I am reading ISO messages from a switch and its taking too long to read. its taking even upto two minutes to read the whole stream and the switch timesout the session if it doesnt get a reply in 8 ...
0
votes
1answer
14 views

Spring boot load H2 db file from classpath

I want to package prepopulated h2 db-files with a Spring boot application. The database is only going to be used to read values. How am I able to load the H2 files that are available on the classpath?...
0
votes
0answers
18 views

Longpress on folder to get pop up menu

I have created one folder and now i want to delete that. I want long press on that folder to get pop up menu and then want to select and delete . How can i do that ? I did this to get pop up menu but ...
0
votes
0answers
14 views

PostgreSQL and JPA 2.1 : enum mapping doesn't work

I have a SpringBoot project for REST webservices with a PostgreSQL database. One of my entity has an enumeration which refers to an enumeration in database CREATE TYPE statut_unite_hierarchie AS ...
1
vote
1answer
9 views

ParserXML NumberFormatException

I have NumberFormatException but I don't know why? XML document http://www.nbp.pl/kursy/xml/c073z070413.xml Exception in thread "main" java.lang.NumberFormatException: For input string: "dolar ...
0
votes
0answers
7 views

set speed of View motion move

can i set speed to view moved it by finger so i make view speed less than my finger speed but follow my touch View.setOnTouchListener(new View.OnTouchListener() { private float initialTouchX; ...
-2
votes
2answers
52 views

Problems with contructor

I have this code the final objective is to sort multiple arrays. The problem it's when i try to access ".color" on my color Comparator. Sorry for the silly question but i am new on android. My ...
-4
votes
0answers
27 views

How to reduce 18 months from a particular date [duplicate]

I am working on the report generation project for previous 18 months data in the PDF/excel format . In my sql query , i want to give the particular month and year ,the it should return last 18 months ...
0
votes
0answers
11 views

spring boot hibernate cannot save data into database

I am a beginer to spring boot, and wirte a sample example to save data into mysql with spring boot and hibernate. maybe because of not config @Transactional properly, it cannot save data in to mysql ...
0
votes
0answers
8 views

Spring Session - properly setup when configuring a HeaderHttpSessionStrategy

I'm in trouble trying to configure a scenario where I want that the set of Spring Security / Spring Session propagate a Header instead of a Cookie when using HttpSession. Basically, my configuration ...
0
votes
0answers
8 views

Soap Response and request not work in my jsp application

I am writing application for getting order uploaded response from other site which is built in .asp.I want to get response from that web page using my application jsp page.I am trying get reaponse ...
0
votes
2answers
29 views

How to get the size of an element in array those starts with the “name” followed by a number Eg: name1, name20 etc

I have been asked to find the size of the array which is a keyset of a map params having key starts with "name" followed by the any number. params.keySet() The above code gives the array of keys ...
0
votes
0answers
9 views

Spring listener/master running a single instance

In my spring boot application I have a listener and a scheduler which run as soon as i invoke the jar, i have made it configurable through properties and conditional annotation to run whatever we want ...
0
votes
0answers
8 views

Google GeoCoding always return error

I'm using google Geocoding API to convert adresses to coordinates. I tried using JavaScript and also with JAVA services provided by Google. I've setup a Google project from the developpers console, ...
0
votes
2answers
31 views

No Such Element Exception when trying to input

Alright so this is my first time posting. I'm trying to create a box using another class that creates a rectangle. But when I try to run, I get to input the values for height and width but right ...
-8
votes
1answer
26 views

Download a file from a link or a ftp server | Android Studio

How to download a file from my website and save this on internal storage of device? I use Android Studio version 2.1.2, minimum SDK is Android 4.1 Jelly Bean. Thanks in advance!
0
votes
0answers
7 views

Switching a landing page in JSF based on IP address/Domain name of the client [duplicate]

JSF version 1.2 I have two xhtml pages index.xhtml which is my default landing page and b.xhtml. Now if request coming from xx.xx.xx.xx ip adress or form some domain name then my landing page should ...
0
votes
1answer
13 views

springmvc controller public or default protected

what's different in public protected method? @RequestMapping("/") String home(){ "Hello World!" } @RequestMapping("/") public String home(){ "Hello World!" } ...