返回首页
We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [java]

Java (not to be confused with JavaScript, JScript or JS) is a general-purpose, platform-independent, 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.

Filter by
Sorted by
Tagged with
0
votes
0answers
2 views

How to handle server authentication popup in Chrome browser with Selenium using Java

I followed the solution given by @obiwankoban and @SubjectiveReality mentioned at the following link: How to handle authentication popup in Chrome with Selenium WebDriver using Java I performed the ...
0
votes
0answers
2 views

Why BottomNavigationView show only fist item of my menu?

I have a Google Map Activity who track my route, i want to implement login, start and stop buttons in my app and if i try to add a bottom navigation menu it show only the first item of the list, I ...
-2
votes
0answers
9 views

Is it possible to make a phone call when you say a certain word in Java?

I am developing a emergency app. Part of the app is when the user is not currently on their phone but their phone is within a foot from them, and they say a certain word, the phone will automatically ...
0
votes
0answers
3 views

How to package Filebeat with my application

I have a c# application and using Nlog to log. I also have an ELK stack where I want to push my logs too. At this point, I have found that using Filebeat is a more failsafe approach than directly ...
0
votes
0answers
7 views

Android Studio - Why am I not getting an unimplemented method error from the compiler?

I am using the latest version of Android Studio to do some tinkering with Android. I have noticed a strange thing. I have put in implements ActivityCompat.OnRequestPermissionsResultCallback without ...
0
votes
0answers
7 views

action events for buttons in javafx not working

Im making an application in javafx that us an inventory subsystem to allow a user to add to a database or look up a product. The problem I am having is when I click on the next menu, for example if i ...
0
votes
0answers
4 views

Android: Reading UTF8 file with deadline does not stop on LF

I have the following code to read a UTF8 csv file line by line on Android: InputStream fs = new FileInputStream(new File(path)); try(BufferedReader reader = new BufferedReader(new InputStreamReader(...
0
votes
0answers
7 views

Spring rest call JSON response size from JSON generator

As I am new to spring, to I always have seen where every @restcontrollor comes with a return statement. But in my project I can't get direct return statement but via JSON generator I can see some ...
0
votes
0answers
8 views

How to serialize/save a very large hashmap in a file, knowing the position of each key in the file?

I have a large HashMap <String, List<String>> that I want to save in a file. I don't want to serialize it with Java's default methods because they also store a lot of things I don't need, ...
0
votes
0answers
7 views

NetBeans doesn't show .java file (source code)

I am new to programming in Java and reading a book on Java.(Mastering Java by Michael B. White) The intro goes through the basics of getting the JVM and all set up. I have opened NetBeans (11.2) and ...
0
votes
1answer
8 views

Plugin IntelliJ Java automatically create code

In this example increment() is invoked 2 times. Question: does there exist some plugin, say for IntelliJ, where I could just take this line of code with a.increment().increment(); and replace it with ...
-1
votes
1answer
8 views

How do i clear SQLlite in Java

I want to clear sql-lite database in java but not working out! SQLiteDatabase db = getReadableDatabase(); db.beginTransaction(); db.delete(TB_NAME_FINGER, null, null); db....
0
votes
0answers
15 views

Java - floating point calc in functional style

I guess here sm and sm2 are not equal due to floating point limitaitons: double sm = -1.22 + (0.6027852837247973 + 0.8920332205475238); double sm2 = -1.22 + 0.6027852837247973 + 0.8920332205475238; ...
-1
votes
0answers
14 views

Vanilla javascript smooth scroll

Can somebody please explain to me, why the smooth scroll in Javascript only scrolls to the right id when I'm at the top of the website and how I can fix it. When I'm at a different place on the ...
1
vote
0answers
10 views

How to set file name while downloading as zip?

I have a rest api which allows me to pass multiple IDS to a resource to download records from specific table and zips it. MSSQL is the backend mastering messages. So when a ID is passed as param, it ...
1
vote
0answers
5 views

JPA disable execution of ALTER SEQUENCE

I have a Spring Batch with Spring Boot application with an Oracle Wallet to connect and open JPA to handle persistence. I have some entities wich primary keys are managed with sequences in the ...
0
votes
0answers
38 views

Java: Remove Object from List using equals override

Note: I have to use Java 8 I'm trying to remove and add objects from a Java ArrayList like this: private List<Point> points; [...] void addPoint(int x, int y) { Point newpoint = new Point(...
0
votes
0answers
6 views

ojAlgo solve least-squares problem using ExpressionsBasedModel

I am trying to understand how to use the ExpressionsBasedModel class to solve least-squares problems and have constructed a minimal problem but I do not obtain the result that I would expect. My toy ...
0
votes
0answers
10 views

Android: Delay UI updates unless a specific action is performed

I have 2 methods(A and B) which updates UI(should run on UI thread). A displays a popup and B will update UI. How can i delay execution of B unless popup is dismissed(or any other alternative to ...
-2
votes
1answer
16 views

Word Counts From a Hashmap

I have been working on a word count program for my computer science class and I cannot find the error in my code, yet it incorrectly counts words occasionally. I have already looked at previously ...
-1
votes
0answers
13 views

What am I doing wrong when trying to create an object from an array using file input

I'm currently learning Java OOP and having difficulty understanding why I continue get an error. My Boat class is as follows: //Boats public class Boats { String Name; int age; int length; ...
2
votes
1answer
7 views

Start Android App when detecting an incoming call

I want to detect an incoming call. I did this with a broadcast Receiver, this works fine. But when my App is closed, then it says "App has stopped". So how can I start my App to perform actions? Here'...
0
votes
0answers
8 views

Java TLSv1.3 SSLServerSocket “javax.net.ssl.SSLException: Session” has no PSK with Firefox

I'm trying to create a HTTPS Weberver in Java from scratch (with SSLSockets) without any libraries. It works quite well, but for some reason, I sometimes get this error on my Server when I connect to ...
0
votes
0answers
8 views

Permission denied error even after all giving permission [duplicate]

I want to generate a pdf from my android application. I have asked for read and write external storage permission yet I get an error stating permission denied! I have added the required permissions ...
0
votes
0answers
9 views

can not connect postgres in spring boot

I am beginer with java and Spring boot and when i build simple project to connect with postgres but it not work. here my struct of project: enter image description here here my XML file: <?xml ...
0
votes
1answer
17 views

Apache POI - Handling Empty fields

I am new to Apache POI, and I need to write to an excel file based on the contents of my DB. However, when there is an empty/null field in the DB, a Null Pointer Exception is thrown for that ...
0
votes
0answers
8 views

How to Bind Three jComboBoxes and 1 jTextField

Good Day! Im currently having a problem, i have scoured the internet for answer but can't find any. In my system theres a part that needs searching students. I would like to search them by filters by ...
0
votes
2answers
17 views

Mockito Spring Boot gives Null Pointer Exception

I am unable to run a unit test for my spring boot application at the Service Layer as it gives me null pointer exception at line List<Student> expectedList = studentService.findAl();. But if I ...
1
vote
1answer
12 views

How do I give a two dimensional array 2nd slot “unlimited space”? JAVA

If I want to make an array that has different sizes for each inner array, how do I declare it? int[][] arr = new int [X][]; (The x being a certain number) gives me null when I try to use it and put ...
0
votes
0answers
10 views

Android: How to show dynamic HTML string in text view using Java

I have an HTML string like "&lt;p&gt;ABCD xyz alpha beta gamma &lt;a href=\"/abc/efg/STATUS\"&gt; Status&lt;/a&gt; abc. Select \"Track,\" abc efg hij. Select \"yes\" to ...
0
votes
1answer
20 views

How to change string to lower case inside Java Spring @PropertySource annotation

I have a statement `@PropertySource("${env}.properties")` where 'env' is my command line parameter. If env=QA, this would result in my config file being named QA.properties. I want to ensure ...
1
vote
0answers
8 views

Error 503 with my .jar after transfer my website to an other hoster

I created a minecraft launcher with SKCraft and everything was hosted on 000webhost.com. Then I transferred my site to hostinger.com and changed all the links to point to my new host. Except that ...
-1
votes
0answers
17 views

Exception in thread “main” java.lang.NoClassDefFoundError: java/util/HashMap$Entry

When running following java program: http://github.com/agents4its/mobilitytestbed. I stumble upon following error message: Exception in thread "main" java.lang.NoClassDefFoundError: [Ljava/util/...
0
votes
0answers
23 views

SQL injection in an ALTER statement

Apologies if this is a duplicate. Let's say you have a Java app which has a query which can unlock/reset passwords for users like: "ALTER USER " + iD_Of_User.toUpperCase() + " IDENTIFIED BY " + ...
0
votes
1answer
15 views

Eclispe project “locked”

I have been working on a struts project for a month now, with the IDE Eclipse JEE. So far, everything was good, but this afternoon it decided not to update my project anymore. Before that, after ...
0
votes
0answers
9 views

Micrometer gauge never gets updated

I'm trying to build a custom gauge for micrometer which should monitor custom ThreadPoolTaskExecutor. The problem is that the gauge values are stays the same and never get updated since application ...
0
votes
0answers
11 views

How to add a http header to any outgoing response in Spring? [duplicate]

I have some @RestController endpoints and want to add a loggging-uuid to every response that is send back to the client. I'd like to write that id into the http header. Also for error responses like ...
-1
votes
2answers
19 views

How to save username and password from the Register Form by pressing the confirm button? [on hold]

Here the picture of Creating the Account: btnConfirm = new JButton("Confirm"); btnConfirm.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ...
1
vote
0answers
26 views

JWT authentication without database access

I am new to JWT. I create my own microservice and want to introduce JWT authentication. I have one website that issues a token and in the other I want to check the correctness of this token. I want to ...
0
votes
0answers
10 views

Is it better to use WebClient or ReactiveElasticsearchClient?

I had a discussion with my team regarding whether we should use org.springframework.web.reactive.function.client.WebClient or whether org.springframework.data.elasticsearch.client.reactive....
0
votes
0answers
13 views

Visioconferencing with Java

Excuse my poor english, I'm French, I'll do my best to be understood... Since many days, I'm looking for a solution but I don't know how to do it... I took a tutorial to build a text chat with ...
0
votes
1answer
34 views

When I was building a maven unit test, I got the following error

When I was building a maven unit test, I got the following error.But I don't have this appender caller CONSOLE in the project.And all my logback appender are above on the logger. 11:07:59,525 |-INFO ...
0
votes
0answers
32 views

I'm having trouble collecting 5 coins and successfully going to next world

So we recently started coding in college and I'm having trouble with my game in Greenfoot. I should normally be able to collect 5 coins on level 1, go to the door, and progress to level 2 and so on... ...
-3
votes
0answers
13 views

Java for loops for half pyramid triangle? [duplicate]

Hey I' m trying to create a pattern that's suppose to output multiples of 5 in a pattern like this: 5 10 15 20 25 30 40 45 50 55 60 65 70 75 80 but my output is like this ...
0
votes
0answers
14 views

Jasper report not showing data of only one field in detail band

Everything was working fine yesterday. but when I am trying to print the report today, the product name was not visible anymore. But I am able to see in preview mode. [as you can see, I m able to see ...
1
vote
2answers
31 views

How to add key click event in on view?

How can I do key event. I do it, but on button event. I have to change it to key. I have my keyboard from How can you make a custom keyboard in Android? My buttons events: public class MainActivity ...
1
vote
0answers
15 views

Joining Bars within Waterfall chart

I am creating a Waterfall Chart as shown in the below image. public class WaterfallDemo extends ApplicationFrame { public WaterfallDemo(String title) { super(title); JFreeChart ...
0
votes
2answers
26 views

Firebase : Can't convert object of type java.lang.String to type com.example.g.Model.Cart

I had error that said com.google.firebase.database.DatabaseException: Can't convert object of type java.lang.String to type com.example.g.Model.Cart at com.google.firebase.database.core....
1
vote
2answers
31 views

Is there a way to include DOT but not a Double Integer in Java Regex?

I have - String prog = "public class HelloWorld {\n" + "public static void main.(String[] args) int b = 0.5 \n" (Here the dot(.) after main in the string is purposeful) Here I need to separate the ...
0
votes
1answer
27 views

error setContentView(R.layout.activity_main)

I am trying to add recyclerview in app like this <android.support.v7.widget.RecyclerView android:id="@+id/recyclerViewSlider" android:layout_width="match_parent" ...

返回首页
杏彩计划 杏彩官网 杏彩APP 杏彩走势图 杏彩下载 杏彩官方 杏彩网站 杏彩怎么玩 杏彩官方 杏彩靠谱吗 杏彩代理 杏彩骗局 杏彩投注 杏彩倍率 杏彩开奖 杏彩漏洞