Most voted "java" questions
Use this tag when the question refers to some resource, information, or problem relating exclusively to the Java programming language. Java is a class-based, statically typed, reflective, and execution environment (JRE) language. Java programs are compiled to bytecode and run on a virtual machine (JVM), allowing a "write Once, run Anywhere" philosophy (WORA).
Learn more…14,468 questions
Sort by count of
-
1
votes0
answers384
viewsApply NDVI to images with Opencv and Java
Everybody, good afternoon, everybody. I am in need of an image processing help using the Opencv library. Basically I need to take a satellite image and apply the NDVI (vegetation index by normalized…
-
1
votes1
answer5993
viewsHow to read an Excel 2013 spreadsheet and write to a Postgresql database?
I’m having trouble recording information in the database. This information I extract from an Excel file. For example, I have 3 fields and do not know how to take the first cell and record in the…
-
1
votes1
answer50
viewsRemove 'header' from Android Tabhost
Hi, guys. I’m developing an android app using Tabhost. The problem is that I didn’t want the top of the tab because it takes up so much space. I’ve searched a lot on the internet and I haven’t found…
-
1
votes1
answer3729
viewsjava.lang.Noclassdeffounderror in Java WEB with JSF
Hello I’m getting the following error message when running the project: java.lang.NoClassDefFoundError: javax/enterprise/context/spi/Contextual at java.lang.Class.forName0(Native Method) at…
-
1
votes1
answer917
viewsConvert Bufferedimage to File?
I need to convert a BufferedImage for a File. I tried it this way, but it didn’t work: File file = null; ImageIO.write(image, "jpg", file); image is the type BufferedImage. That was the mistake:…
-
1
votes1
answer140
viewsHow to use an array within getView on an Adapter?
Here’s my problem, I’m passing a sequence of arrays to an Adapter that should be placed inside a listview, among these I have a two-dimensional array called materials : public View…
-
1
votes1
answer252
viewsHow to create Parameters for Ireport
I am developing a Java Software where the user registers. Each registered product can be printed. Each product may have several images and these images should be printed together with the data of…
-
1
votes1
answer889
viewsInsert values from an array of bytes into an int array without converting them
I have this vector int: int[] vetor = new int [dataRegCodeToCompare.length]; and that byte vector : (which receives the "Digest" of another byte array) byte[] dataRegCodeToCompare =…
-
1
votes1
answer79
viewsClient Server error sending messages
I have the following code however when I run the Server and client and try to send messages from the client (Frame window) of me error! Can anyone help me? The error is supposed to be the class…
-
1
votes0
answers501
viewsFill out web page form using Java application
There’s a site I need to use frequently. On this site I need to repeat a sequence of steps. I want to write a program that automates this process (I have more practice with Java, but can be in any…
javaasked 8 years, 11 months ago Rafael Paixão 11 -
1
votes1
answer7212
viewsReturn two values using Return
About splitting a program into methods, in a case of a method that runs two functions at the same time (value and total size) how do I use Return at both values? Both must be executed together, I…
-
1
votes1
answer912
viewsHow to rotate imageView 90º?
Hello, I’m making an Image editing app and I need to know how to rotate 90º of an imageView and replace the original with the image that has rotted I searched the sites and found this way to do, but…
-
1
votes3
answers825
viewsMethod parameter with abstract class
Hello. I believe my doubt is very simple, but I really did not find any solution, after much research. In Java, I have two concrete classes that extend an abstract class, as the example: public…
-
1
votes2
answers854
viewspackage does not exist (Maven)
Let’s contextualize the problem: I have a project that consumes some Web Services, in this project I have separate source folders as suggested by Maven ex:(main/java test/java), the classes…
-
1
votes1
answer136
viewsConvert Java + Windowbuilder project to Android or Web
Good afternoon, Would it be possible to convert my Java + Windowbuilder project to Android devices or to the web? I saw that it is possible to convert Java to Maven plus another doubt is... What…
-
1
votes1
answer108
viewsHelp to Compare ID to String
Good people, I’m developing a simple application that when started is displaying random images and text on the screen just for learning and what I have so far is this: package br.com.appteste;…
-
1
votes1
answer641
viewsImport error br.gov.frameworkdemoiselle.security.User
Error importing the interface User: import br.gov.frameworkdemoiselle.security.User; Version of Demoiselle used: 2.5.0-RC1 According to Grepcode, in version 2.5.0-BETA2, this interface existed…
-
1
votes1
answer385
viewsRead file when it exists in directory
I am building an application that reads a file in a certain directory, however this file will be generated in this directory at different times from another application, after the application…
-
1
votes0
answers138
viewsError Wrong number of Arguments in production environment
I have an application in development and production, and only in the production mode this presenting the following error: [0m[31m13:11:45,758 ERROR [io.undertow.request] (default task-118) UT005023:…
-
1
votes1
answer271
viewsBigdecimal does not allow 3 boxes after comma
Guys, I’m making a division between 2 Bigdecimal and I need the system to not allow 3 houses after the comma. I have a full amount and I need to divide it by the amount informed by the user. if you…
javaasked 8 years, 11 months ago HimorriveL 143 -
1
votes1
answer521
viewsCheck if object is part of class that implements certain interface
I need to create a condition to know if a given object is part of a class that implements a certain interface. How can I do this?
-
1
votes2
answers143
viewsError placing image on Imagebutton
When there was only one drawable folder this error was not happening, only that the app was distorted in other resolutions, so I created the drawable folders with different resolutions(ldpi,…
-
1
votes1
answer821
viewsZip more than 1 file
How can I zip more than one file? I’m only getting one. That’s my code: public static void compactarParaZip(String arqSaida, String arqEntrada) throws IOException { int cont; byte[] dados = new…
-
1
votes1
answer190
viewsError while moving File . rar from one folder to another
Guys I have a method that takes the files I want . rar from one folder and saved in another, however when I open the file it is corrupted. try { //Origem File arquivoOrigem = new File(path);…
-
1
votes2
answers2880
viewsHow do I popup a new Jframe?
How can I do for when to press one JMenuItem it show a window where I would have to enter, for example, a date and select from a couple of checkboxes? Briefly, as I do a "popup" a new JFrame? Thanks…
-
1
votes1
answer43
viewsStarting second activity with result on Android
I have two editText that I enter with an in and a calculate button. I would like to present the result in a second activity as soon as I press the calculate button. Could someone help me with this?…
-
1
votes1
answer57
viewsJSP: Item page not found
I am programming a page to inform you that the searched item has not been found. I wanted to know what I’m doing wrong and what would be a solution. <c:forEach items="${proposta}"…
-
1
votes1
answer314
viewsSave entity and all its daughter entities
I have problems with the updates of my entity Mdfe, before explaining what happens, I would like you to look at the image below, from it I can explain better. We can verify that The Mdfe has a…
-
1
votes2
answers1590
viewsWildfly error: [org.jboss.remoting.remote.Connection] (XNIO-1 I/O-2) JBREM000200: Remote Connection failed
When trying to run a project by Eclipse Mars using Wildfly 9 on Windows 10 the following error occurs: 11:25:08,167 ERROR [org.jboss.remoting.remote.connection] (XNIO-1 I/O-2) JBREM000200: Remote…
-
1
votes0
answers198
viewsHow to send a message via Facebook Messenger?
I’m making an Android application that needs to send a message through Messenger Facebook. My application is already integrated to Whatsapp... by Whats I always check if there is the application…
-
1
votes1
answer105
viewsComplementary error function in java?
How to calculate complementary error function in java ?…
-
1
votes1
answer123
viewsProblem returning a method’s value
I am studying the book of Deitel Java how to program and I came across an exercise that asks to make a wage increase of 10%, my doubt is in the method of adjustment, my goal is to show on the…
javaasked 9 years, 7 months ago Marcelo T. Cortes 804 -
1
votes0
answers70
viewsHelp with logic of a system that writes data to Excel columns
Guys I have an application and I can pass the data to excel, the problem came up now because I have to make a loop and I’m not finding the best way to do it. I have several lots, for example,…
-
1
votes2
answers988
viewsMessage when user is exiting application
I know I can use the AlertDialog for this, but without creating button, only when the user is pressing the back to exit have appear an alert? Like, when it comes out (it involves the Android system…
-
1
votes0
answers87
viewsJavafx takes time to open the first time
I have a relatively complex GUI class that I inherit from Tab. When I create an instance of it, it builds the menus and GUI in direct code, without fxml. It uses icons in external png, but the…
-
1
votes1
answer1251
views(Eclipse) Jboss never starts
I’m having trouble trying to get Jboss to run on the Eclipse self. I installed Jbossastools, downloaded the latest version of Jboss, and did the standard installation procedure of new server in…
-
1
votes0
answers218
viewsConsume Webservice asmx with Android
I am trying to get SOAP provided from an asmx local webservice on my android emulator. On my PC the result is as follows: In the emulator however, I tried to open in your browser in two ways: Using…
-
1
votes1
answer365
viewsproblems inserting html into a Json Java object
When inserting an html content into an obj Json He is inserting a \ next to all closing tags bars. example: input: obj.put("html","< head>< / head>"): output: "< head>< \/…
-
1
votes1
answer651
viewsAndroid App Closes Unexpectedly
I followed the steps and just copied the programming from the google website. I made a button, that it checks the connection with my network, through the IP and Port, when clicking the button, if it…
-
1
votes1
answer162
viewsUse of Swing in Java EE
Good Afternoon, when the programmer works with Java WEB, he generates graphical interface using the javax.swing class as in Desktop?
-
1
votes1
answer1279
viewsHow to copy a file inside the jar to a folder outside of it?
I put images inside a package on the project. I need at runtime to display this image in an external program (in the case of linux notify-send), this program needs the exact path of the image, so I…
-
1
votes0
answers62
viewsNullpointerexception error
I have a program that does biometric authentication in two versions: 1) User selects binary file via javax.swing as follows: public class Busca extends javax.swing.JFrame { ...…
-
1
votes0
answers42
viewsOfficial Architecture -> Meta
The question I have is totally architectural. I will expose a case just below to further illustrate the doubt that I am tapping directly into my system. I have a feature that aims to register an…
-
1
votes2
answers603
viewsWebservice returns an Array, and I’m unable to insert it into an Array<Minhaclasse>
{ "cemaden":[ { "codestacao":"520310401A", "latitude":-16.196, "longitude":-52.546, "cidade":"BALIZA", "nome":"Setor Central", "tipo":"Pluviom\u00E9trica", "uf":"GO", "chuva":0.0, "nivel":null,…
-
1
votes1
answer1164
viewsPrint failure with Zebra GC420T printer
Good morning, I’m having a little problem printing labels on a Zebra GC420T printer from a Java Viewer. The fact is that the printing comes out correct, but the printer keeps releasing the roll of…
javaasked 8 years, 10 months ago Álesson David 35 -
1
votes1
answer758
viewsFormatting dates in Java
Good afternoon, I have a date attribute of an object that persists as a string, because I need it in the format ddMMyyyy at a certain location and also compare with an earlier date. But at another…
-
1
votes0
answers85
viewsBytebuffer byteBuffer = Bytebuffer.NEW();
I have a problem with Bytebuffer byteBuffer = Bytebuffer.NEW(); I can’t understand why I don’t have access to it. NEW, it simply doesn’t exist, I don’t think and I don’t find it... I need it to…
-
1
votes0
answers278
viewsProblem with properties Spring MVC 4
Well the error happens in the second message from the file "properties" the first ok message when I try to put the second the message in the file happens this error Caused by:…
-
1
votes0
answers35
viewsHow to relate all Workspace Javascript as Java?
I want to turn on all the javascript files in my IDE, like we do with Java in Eclipse. I’m trying to do this in Atom or Vscode. Some things I need: I want to link my variables and global functions,…
-
1
votes2
answers127
viewsCan I use tools.jar in the Classpath of my Java project?
I’d like to know if there’s a problem, since he’s part of the JDK, or even if it’s necessary.