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
votes1
answer1120
viewsHow to inject dependencies with Weblogic 12.x. x?
What is the procedure to be able to inject dependencies using @Inject of javax.inject on the Weblogic 12.x. x server? I need to download Weld and place it on project dependencies? I noticed that…
-
1
votes0
answers103
viewsPrinting several pages
I have a class that she makes the impression of the pages, however, I’m having a hard time breaking the pages. In examples I have seen, they control this by the number of lines per page, but in my…
-
1
votes1
answer618
viewsProblem sending datasource list to sub reports
I’m having trouble opening a report with sub reports passing a datasource. In Ireport I run the report with sub reports normally, but the main report is with a connection to the database and this…
-
1
votes0
answers126
viewsFlush in asynchronous Servlet does not work
I am studying for web certification, and came across a problem while trying to make a chat using long pooling, but precisely in the article:…
-
1
votes1
answer275
viewsFunction for Java
I have the following code: public class Programa{ public static void main(String args[]){ int a = 10; for (int i = 1; i<=2; i++){ for(int j=0; j<=2; j++){ if((i%2 == 0) && (j % 2 ==…
-
1
votes0
answers205
viewsDocumentation of software developed
The file must contain: Explanation of the BD with Model ER Explanation of the Interface, Explanation of property files Use Case Diagram Creation (or other such that exemplifies all software progress…
-
1
votes2
answers898
viewsProblem in database connection class
I’m having problems with my Mysql database connection class in Android Studio. Error: 10-16 15:04:02.872 532-532/com.example.dev.mbstore W/dalvikvm﹕ VFY: unable to find class referenced in signature…
-
1
votes1
answer162
viewsHow to deserialize a geometric polygon with Gson?
I am using Vraptor 4 and the intention is to create a converting class of Polygon that does the deserialization and serializes. My problem is only in deserialize. How to deserialize a geometric…
-
1
votes0
answers58
viewsJava build error (Minicraft by Notch)
I’m having trouble running the game that Markus Person Notch created in 48 hours known as Minicraft (don’t confuse it with Minecraft), I downloaded the source code but it gives the following…
-
1
votes1
answer128
viewsIs it possible to send values of the gyroscope and a seekbar simultaneously via bluetooth?
Hello, everybody! I’m trying to control a Drone (Hubsan X4) via smartphone sensors. But I can’t send the collected values of the gyroscope and a seekbar simultaneously. The seekbar represents speed…
-
1
votes1
answer542
viewsHow do I know if the user clicked outside of Alertdialog?
My doubt is very simple, but I’m not finding anything I can use. In my android project, I check the GPS connection of the user’s device, and if case is not active, I ask in a dialog box for it…
-
1
votes1
answer840
viewsErro em relacionamento Manytomany no Hibernate
I have a problem with @manyToMany. You’re making the mistake: org.hibernate.Multiplebagfetchexception: cannot simultaneously fetch Multiple bags Follows my model: @Entity @Table(name = "sar_evento",…
-
1
votes2
answers561
viewsCreate menu button at the bottom in Google maps v2 android
How to create the Menu button equal to the Maps App. Below is an example in the red square. Someone could set an example ?…
-
1
votes1
answer908
viewsPass JSP value to Action
I have the following jsp below, on it the user chooses the status, by choosing the status my javascript shows in an Alert with the information I want to pass to Action to follow the validations and…
-
1
votes1
answer903
viewsHow to resolve the error Caused by: java.lang.Nullpointerexception in getSessionFactory()
Is popping this error message for me Here are the lines that gave error: public class HibernateUtil { private static final SessionFactory sessionFactory = buildSessionFactory(); private static…
-
1
votes0
answers69
viewsContent control - Java Sax
[Java - Sax Parser] Good afternoon. If anyone can help me I’d be grateful. I need to build an application that works as follows: In case he finds the tag "classname", and this has an attribute…
-
1
votes4
answers1852
viewsOracle11g - Problems SELECT command
I’m making the following mistake: java.sql.Sqlsyntaxerrorexception: ORA-00933: SQL command not properly ended This happens after I run the following line from SQL: /* Listar todas as reuniões do…
-
1
votes1
answer773
viewsHTML - Use Httpurlconnection to log into website
I’m trying to log into a site using Httpurlconnection, as shown in the code below, taken from mkyong’s website: private final static String USER_AGENT = "Mozilla/5.0 (Windows; U; Windows NT 5.1;…
-
1
votes1
answer208
viewsOpencv Error: Assertion failed (ssize.area() > 0)
I am having the following error with the Opencv library in Java: Opencv Error: Assertion failed (ssize.area() > 0) in cv::resize, file ..... opencv modules imgproc src imgwarp.cpp, line 1834…
-
1
votes1
answer134
viewsGet the revision history in Google Drive with Java by Netbeans
I need to get the revision history of Google Drive. I visited the website of Drive Developers and I saw that you can do this with several languages. I want to do Java and use Netbeans and the…
-
1
votes1
answer143
viewsProblems connecting to an RMI server
On the server RMI I have the following settings: Registry r = LocateRegistry.createRegistry(rmiport); r.rebind(rminame, h); System.out.println("Servidor RMI pronto:"); where, rmiport = 7000 and…
-
1
votes0
answers89
viewsjava application applet
import java.awt.*; import java.awt.BorderLayout; import java.awt.GridLayout; import java.awt.FlowLayout; import java.awt.event.*; import java.awt.event.ActionEvent; import…
-
1
votes0
answers112
viewsProblem with Jasperreports and Chrome report
After the last update of Google Chrome some reports from my web application just don’t appear. I enabled the NPAPI in Chrome but the report still didn’t work. Someone is having this same problem?…
-
1
votes2
answers101
viewscheck function always returning true
i have a layout with several edittext (16) and wanted to make a check if it was changed. when I call this layout I load all my edittexts with database data, having the user the option to save/,…
-
1
votes1
answer621
viewsUpdate event in "p:commandLink" component does not render
I have a datatable presented within a Dialog primefaces, when I click on commandLink of the line I desire, I want to take that value and render it within a inputText from my screen, but I’m getting…
-
1
votes1
answer241
viewsI wonder how I use Swing
I am learning Java Eclipse and would like to know how to use Swing. Need to install? How it works?
-
1
votes1
answer597
viewsError 415 when doing json post
I have a CRUD REST application that responded in XML, however, I want to change it and make it respond JSON. I can do GET in restclient, but POST, PUT and DELETE does not, it gives the Unsupported…
-
1
votes1
answer142
viewsJava to Objective-C conversion
I need to convert this small code in Java to Objective-C to run a function in Objective-C, but there is an error that I haven’t been able to find yet. Java code: final char CHR0 = 0; String…
-
1
votes1
answer891
viewsHow to set margin in a Textview in java source code?
When I’m in the xml, only applies the property: android:margin="15" I want to make the application of this same property, only, in the source code of the java, how do I do that?…
-
1
votes1
answer1177
viewsHow to get a value from a list
I need to take the value generated in the ${stores.nmFrameLocator} field and display the value in Alert: lojaMapa() <script> function lojaMapa() { var tc =…
-
1
votes1
answer76
viewsError importing JDOM
Galley, I’m following a tutorial to learn about a distributed Java Calculator. However, I am having an import error from JDOM library, I already imported anyway: - Zipped - Archive by archive - Only…
javaasked 9 years, 7 months ago Cássio Lopes 37 -
1
votes1
answer67
viewsRun unit tests with dependencies that are in the exclusions group
I have a scenario where I need to run a test with Junit in a feature that has an external dependency, but to run this functionality on the application server I need to put this external dependency…
-
1
votes1
answer1864
viewsI have a checkbox set but only wanted one selected
I have a set of checkbox but only wanted a selected one and, if they selected another, the one that was selected. I’ve tried that, but it doesn’t work: if (chkfemenino.isChecked()) { params.add(new…
-
1
votes0
answers394
viewsError 500 when sending android object to web service Rest
I have a problem sending an object from a java class to my web service. Using the Restfull web service on glassfish and android using Volley and gson. I get a 500 error when I try to send the…
-
1
votes1
answer358
viewsGoing to a particular tab
This is my menu: <p:menubar> <p:submenu label="Clientes"> <p:menuitem value="Cadastro" action="#{nomeBean.cadastrar} outcome="funcionario.xhtml" /> <p:menuitem value="Consulta"…
-
1
votes1
answer281
viewsJSF cluster application
What my application (JSF + Primefaces) needs to work with in a cluster? I am doing a test in a cluster 3 Tomcat environment (with session replication) and my test application does not work. At first…
-
1
votes0
answers143
viewsHow to create a Minecraft Style Menu in Ulixava Project?
How I Create a Minecraft Style Menu for My Java Game? I watched the 3 episodes of the series: How to make a 2d Minecraft plataformer in java, and I have the game, but I wanted to create a menu for…
-
1
votes1
answer669
viewsHow to configure a project with Junit to be able to build correctly inject Entitymanager?
I have a legacy JSF/Demoiselle 2.4 application that lacked the good practice of building unit tests. In order to meet new requirements, I have implementations to do and I intend to build them using…
-
1
votes1
answer110
viewsJava project with Oracle and Mysql at the same time?
In view of an Oracle BD and a Mysql BD, and the impossibility of integration of both bases: It would be possible, for example, a class of my application to 'look' at the mysql table and update an…
-
1
votes1
answer422
viewsInsert hyphen ("dash" -) automatically while user type
Is there any way while the user type in a EditText insert hyphen (-) every 4 characters typed? In the same way some licenses work the dash (-) is already inserted automatically.
-
1
votes0
answers52
viewsSave listview state
I have a ListView I bring data from the database. When I search for search of ActionBar the filtered data appears, then I select an item from ListView to see the data. When I go back to ListView by…
-
1
votes1
answer600
viewsSite Republica Virtual off the air
A few days ago the site Republica Virtual that served as a basis for many people perform ZIP code query and receive the data easily, this out of the air, I do not know if anyone knows why to be out…
-
1
votes1
answer523
viewsError in JPQL query
When I am starting my server the following error is happening unexpected token: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IServidorMensalRepositorio':…
-
1
votes1
answer909
viewsSwitch from Jframe to Jdialog
I created a frame of this genre: But, since it was to present that the client was having trouble connecting to a server, it was better to move to Jdialog Problem: I can’t make Jdialog visible Code:…
-
1
votes0
answers223
viewsPause Cycle until Jframe closes
I am going through a cycle with values, and in each iteration I call a Jframe to choose certain values, what happens is that all Jframes are opened without being able to complete the operation. In…
-
1
votes1
answer107
viewsHostings that use JSP
I have a linux web hosting I put all my systems in PHP, and now I need to work with the extension (*.JSP) and I have some doubts What type of host I use to run JSP? Cpanel runs JSP automatically?…
-
1
votes2
answers72
viewsI need you to return your name by clicking on the list
I’m recreating one of my activitys to work with Action Bar, with a lot of help from Mr @Wakin I was able to make it work: protected void onCreate(Bundle savedInstanceState) {…
-
1
votes1
answer46
viewsSimpleadapter Auto complete
The code below is a adapter that I use to create an autocomplete in my application. mAdapter = new SimpleAdapter(this, mPeopleList, R.layout.custcontview ,new String[] { "Name", "Email" }, new int[]…
-
1
votes1
answer280
viewsHow to return a Boolean on the button
I have a button and I want when it’s clicked to return true in a if of another class, but I haven’t found any method of how I do it. Button b = new Button(); Other class: public static…
-
1
votes1
answer1573
viewsWhat is the best way to make an HTTP request on Android?
I’m using DefaultHttpClient to make json requests for a Webservice, but this function is obsolete, which is the best alternative for creating a Webservice client?