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
-
0
votes0
answers360
viewsHow to capture website content and store in a database
Here the site that has the vacancies If you could just get in there and see how it works. I need to get the vacancy titles and the descriptions that contain in them as the: Company, Practice Area…
-
0
votes1
answer603
viewsProblems implementing an email sending method
import java.util.Properties; import java.util.logging.Level; import java.util.logging.Logger; import org.apache.commons.mail.DefaultAuthenticator; import org.apache.commons.mail.EmailException;…
-
0
votes0
answers66
viewsAdapt code to Fragment
Good morning I had posted the doubt but now I tried to simplify to be simpler the help I hope you can help me. I’m using googleplaces and when I write in an editText I get suggestions of places in…
-
0
votes1
answer99
viewsHow can I turn a bootstrap(html,css,javasript ) template into a . Zul (Views of the Zk framework)
I am programming in Zk, I would like to take a Bootstrap template and turn to a ZK Views.
-
0
votes1
answer227
viewsp:selectOneMenu does not update value within ui:repeat
The context is the following, I have a list of objects AvaliaProjeto, containing: Project Discretion Stopover Valor The project is selected from the outside, the criteria are listed so that their…
-
0
votes1
answer66
viewsNullpointerexception on a non-null object
I’m doing a small project for graduation, in it I want to create a new character that has name, sex and class, I’m testing the program and it’s giving a very strange error. Here’s the code: //…
-
0
votes1
answer187
viewsCalendarview Action Forward and Back button
I’m working with the Calendarview library https://github.com/prolificinteractive/material-calendarview And the guys there are kind of out of communication, so I’m gonna ask here. I would like to do…
-
0
votes2
answers223
viewsJSP information for another JSP
Example: I have a JSP A, which has some information and a button. When you press this button, JSP A sends variables to B (such as id, name...). B would use this information and update the page…
-
0
votes1
answer35
viewsAdd widget on start screen
I’m using the library https://github.com/prolificinteractive/material-calendarview And I’m almost at the end of the project, but now I have the need to insert the calendar widget option, but the…
-
0
votes0
answers60
viewsJava interface
I’m beginner in Java and I’m having some questions about interfaces, I wonder if someone can explain to me the theoretical part of interfaces, if someone has a simple example Interface, I thank you.…
-
0
votes1
answer89
viewsCan I see the implementation of the Java API codes?
I’m starting in Java, and I think it’s super cool the vast Java library, with many classes and methods that make our work easier. Even in the book of Deitel recommends use for various reasons. I use…
javaasked 9 years, 3 months ago Renan Carvalho 23 -
0
votes0
answers425
viewsJava error: javax.servlet.Servletexception: javax/Enterprise/context/spi/Contextual
I’m new to Java and I’m having trouble showing on the page a grid with data from a database table. I am using java + Hibernate + JSF 2 + Tomcat 8. When I run my xhtml page it presents the error…
-
0
votes3
answers75
viewsIn a String separates with data separated by ";" how to take the 2nd data?
I have the string x = "Alberto;Jose;Felipe;Ana". I needed to take the 2nd dice, how do I do that? I thank you already. Obs: The string x is inside an array of strings.
javaasked 9 years, 3 months ago daniel12345smith 2,120 -
0
votes0
answers438
viewsCertify PDF with Java
I am developing a GED (Electronic Document Management) system in Java Web. In this system I need to have a PDF certification feature, in which the A3 model certificate will be used. I have no idea…
-
0
votes1
answer1311
viewsEnable and disable Jbutton
I have two JButton in my window, btnCalcular and btnConfirmar. The btnCalcular calculates some window values, and the btnConfirmar take these values and store them elsewhere. The point is that…
-
0
votes1
answer64
viewsHow to Return the statement of an attribute on a Jlabel?
I am beginner in programming, my question is the following: - I created an attribute public static final double Preco_Gasolina = 3.85, in an A class. - I want to return the value of Preco_Gasolina =…
-
0
votes1
answer596
viewsGoogle drive api integration doesn’t work. how do I fix it?
i want to integrate the google drive api into my app. it runs but does not connect, as if it did not receive the information that was sent. How do I fix this? The code is the google itself that…
-
0
votes0
answers122
viewsOnboard HSQLDB
Hello. I’m developing a Java application with HSQLDB. When I access the database with absolute path, everything works ok: String txtCon =…
-
0
votes1
answer47
viewsApp Engine - version problems
I’m trying to run a patch with the Google App Engine. But I get the following mistake: Description Resource Path Location Type Java Compiler level does not match the version of the installed Java…
-
0
votes1
answer309
viewsHow to save Cookies permanently and retrieve them later? [Android]
I have an app Android that makes a request to a Web server and later saves three Cookies in one CookieStore. In the meantime, I’d like to store these Cookies so that when the application is…
-
0
votes1
answer123
viewssave an object list
I have an object called message and another one called frames.. That is, in my application I can have a list of frames related to the same message. I already have this list in my ManagedBean, now I…
-
0
votes1
answer1485
viewsRun an application without eclipse but using Tomcat. How do I?
I’m used to running the project in the eclipse ide but now I’ve created an html page in Notepad++ and need to put this page to run with the Tomcat web server. I was doing two clicks on my html page…
-
0
votes1
answer188
viewsWhat good is Runnable?
I was thinking of creating thread one in my software, but I saw through the forums that the Runnable help in a certain way in creating a thread, and wanted to understand how it works.…
-
0
votes1
answer108
viewsCapture exceptions in swingworker execution
I’m using SwingWorker to execute a method that can throw exceptions. Even forcing, the exception is not captured by Try-catch. How can I solve this case? try { (new SwingWorker < Void, Void >…
java swing exception swingworker event-dispatch-threadasked 9 years, 2 months ago Lucas Alcântara 411 -
0
votes1
answer34
viewsParameterizing value to be Encrypted in Query SQL
Currently, the query query that returns results is as follows: SELECT nome, email, senha FROM Professor WHERE email = ? AND senha = HASHBYTES('SHA1','" + senha + "') p.setString(1, email); When…
-
0
votes1
answer221
viewsScrollbar in a Jtable
I added a JTable that updates the data as the customer type in a field JTextField. However, when the client search returns multiple lines, I would like the JTable had a scroll so that the customer…
-
0
votes1
answer249
viewsHow to set a timeout for a particular action in Java?
I would like to set a timeout for a particular action on JSP pages, which should work with the following conditions below: When I click a button for example "Travel", the page should somehow save…
-
0
votes1
answer131
viewsConnect to Sqlserver using Windows 10?
I am using Windows 10 and have to connect to a Sqlserver 2000 database using the command line in a java application. However, I am receiving an error. run: ClassNotFoundException:…
-
0
votes0
answers202
viewsRTSP protocol with primefaces?
I am trying to implement with primefaces to accept the RTSP protocol: <p:media value="rtsp://myUrl" width="190" height="250"> <f:param name="autoPlay" value="false" /> </p:media>…
-
0
votes1
answer3707
viewsHow to get the result of a Junit assertEquals test and put it into a String variable?
I have a Junit test case to test a single class. The class to be tested contains only one "sum" method that sums two numbers. To test if it is correct, I use the following method:…
-
0
votes1
answer436
viewsFormat date to Brazilian format using webservices
How to format a data timestamp for timestamp br. ex. 2015-02-03 15:37:00 para 03/02/2015 15:37:00 Obs: the date is a text
-
0
votes1
answer858
viewsAssign selected item to Jcombobox
I have a problem where my jComboBox values are not being returned but the values in the bank are correct. I have a vehicle registration jFrame, which when triggered the search button, calls the…
-
0
votes0
answers58
viewsOpen android studio app in phonegap? t
I developed an application in Android Studio and would like to export it to phonegap in order to be able to use it for cross-platform. How can I enjoy my project in android studio in phonegap ja…
-
0
votes2
answers345
viewsAndroid sqlite order by com case
I need to sort a query like the example below, where, the searched text is 'un', it first brings the items that start with 'un'. This is exactly what I need, to order the output of the query, so…
-
0
votes0
answers77
viewsError while opening android studio
When I open my android studio it loads the Gradle and then shows the message: `Error:Execution failed for task ':app:processDebugGoogleServices'. > File google-services.json is missing from…
-
0
votes1
answer445
viewsChange the background color of a JTEXTAREA text
I am a beginner in Java and I am trying to create a function that changes the background of words, I took a print of the example as I would like it to be. What is expected is for a table to be…
-
0
votes1
answer2602
viewsMove File in Java
How do I manage to change the directory of a java file? I’ve done a lot of research and I couldn’t find a functional way to move files to another java directory.
-
0
votes0
answers970
viewsFill double zero left in java
I would like to know how to format a doouble with two boxes to the left of the dot and two to the right of the dot. Example: I have double 1.1 I want it formatted to 01.10; input: 10.1 / 1.05 output…
-
0
votes2
answers4580
viewsPrimefaces JSF - <p:commandButton that serves the update and oncomplete
I am trying to make an orderList and I am having trouble configuring the attributes in the tag commandButton update and oncomplete. I also don’t know what their function is, but I know it doesn’t…
-
0
votes1
answer134
viewsHow to set a jcombobox in a Preparedstatement?
How do I make a jcombobox in this method? The Combobox would be the type the user is supposed to choose, I tried to make one but it didn’t work out very well. And this method is in my main class and…
-
0
votes1
answer77
viewsMany lines in a csv file
The scenario of my doubt is the following: I have a system that reads a file that has around 3 million lines, each line has a separator, I identify each item on the line, I do the proper treatment…
-
0
votes1
answer34
viewsI am trying to list data from my database, more precisely from the Cpf column, but I can only bring a data
List < VarUnica > list = new ArrayList < VarUnica > (); String queri = "select cpf from funcionario"; VarUnica alt = new VarUnica(); Statement ttpa; try { ttpa =…
-
0
votes1
answer75
viewsPassing J2ME application for mobile accessoriesMotorola i465 and i418
Guys, I’m developing an application in j2me for two old Nextel cell phones, but I can’t pass the application to any of the cell phones. Apparently it has software to perform this task, Iden Java…
-
0
votes0
answers55
viewsgrab xml files in a Java application
Hi, I’m new to programming, I’m interning at an IT company and I need to make a java application that takes files. xml generated in a php system of medical consultations and make them available in a…
-
0
votes1
answer1182
viewsException <p:ajax> Unable to attach behavior to non-ClientBehaviorHolder Parent
I am using JSF, Primefaces in my Java EE project. When I use the Primefaces component orderlist, returns me an exception on the screen and I don’t know what exactly it is, it happens the moment I…
-
0
votes1
answer219
viewsHow to simulate p:commandLink click effect?
On the buttons on the primefaces there is an effect, the user sees it being clicked (sink), the same does not occur when I click on commandLink: <p:commandLink id="logs" immediate="true"…
-
0
votes1
answer245
viewsRecover items from Listview
I’m trying to create a sales app, where in the order I select the product to be sold and click on an add button, and the selected product is played into a listview, when the seller has finished…
-
0
votes1
answer654
views -
0
votes0
answers55
viewsiReport report on server
Good morning guys. I have a problem here, that I found nothing on the net similar. I have a jsf project that generates a report in ireport, which works locally perfectly. I simulated a local server…
-
0
votes1
answer4099
viewsHow to list data from a Mysql database using the Java List (jdbc) method?
I’m having trouble trying to list the data. Exception in thread "main" java.lang.Nullpointerexception at modelo.Dao.getLista(Dao.java:111) at principal.Main.listarViagem(Main.java:161) at…