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
answer202
viewsUsing Newrelic to monitor Java applications on Tomcat7
As well as monitoring PHP and Django, I would like to monitor the "Browser page load time" of applications java. I installed the "Java agent self-installer" as described in the New Relic documents.…
-
1
votes1
answer818
viewsPass updated information from subreport to parent report
I am making a report that contains all service providers, and has the following hierarchy: City -> Specialty -> Provider. In the ireport stood the main report containing a city subreport,…
-
1
votes1
answer160
viewsWidget layout is not working
I wonder why this layout is not displayed in my widget: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"…
-
1
votes1
answer109
views"Noinitialcontextexception" error while boosting GWT application via Eclipse
I’m trying to upload an application made in GWT 2.4 in Eclipse Kepler (4.3), using Google Plugin for Eclipse. When using the option Run As > Web Application, I immediately receive in the log the…
-
1
votes3
answers2188
viewsHow to implement the fixed Actionbar below, android version 2.x or higher?
I’m implementing Action Bar on android version 2.x or higher, however, I’m having difficulties with the way of displaying the elements. In version 2.x the bar appears below, but without menu names,…
-
1
votes1
answer822
viewsError while trying to consume an Axis Web Service
When I try to consume web service functionality, the following exception occurs: org.apache.axis2.AxisFault: Stream write error at…
-
1
votes2
answers8798
viewsHow to install Java EE perspective in Eclipse?
I want to start studying Java for the web (Servlets, JSP, EJB, Servlets and JSP). I have already installed Tomcat, JRE, JDK 7 and Eclipse Kepler Standard. How do I set up Eclipse to add JEE…
-
1
votes2
answers1632
viewsRegex to pick numbers between the second and third "/"
Let’s say I have the following string /product/976935/ How would I make a regex to return only the numbers between the second and third bar? The amount of numbers varies so it’s no use just…
-
1
votes1
answer203
viewsEclipse update error: "Unable to connect to Repository"
When I try to install a new Eclipse update in "Available Software" the following error appears: Unable to connect to Repository http://download.eclipse.org/releases/kepler/content.xml Connection to…
-
1
votes1
answer2919
viewsTake data from BD Sqlite without using Listview
My code needs to take the data from the database, in short only the following commands are missing: if (cursor.moveToNext()) { Contato contato = new Contato();…
-
1
votes1
answer709
viewsHow to take data from two different txt, Java
Talk personal, I have a problem here, I have two . txt and I want to create a new txt joining some data of these two . txt, follows below how I get the data from . txt, can anyone give me a way to…
-
1
votes1
answer587
viewsTwo Asynctask running parallel with Httpclient request
I have two classes extending Asynctask, in which they return me a JSON from a server. I am using the following code to run them simultaneously: if (Build.VERSION.SDK_INT >=…
-
1
votes1
answer1413
viewsError - in such column
03-21 07:25:47.740: E/SQLiteLog(796): (1) no such column: name1 03-21 07:25:47.750: E/data(796): Error while searching contacts: android.database.sqlite.SQLiteException: no such column: name1 (code…
-
1
votes1
answer79
viewsProblem with Portuguese in ADT
I’m working on a Android App, and a friend of mine sent me the app that he worked, but had a problem, all characters in our language like "ç" became things like c'@%, evidencing problem in…
-
1
votes2
answers222
viewsProblem of cursor positioning
Logcat is accusing a problem of NullPointerException, but I can’t identify it. From my point of view, it’s right. I know there’s a problem in lines 34 and 39 of ContactRegister that lead to…
-
1
votes1
answer591
viewsHow to get the parameters of a Url on Android
In the android I have the following URL String url = "http://domain.com/page?parameter1=value1¶meter2=value2"; I’d like to take the parameters of this URL how do I do it in a simple way?…
-
1
votes1
answer698
viewsSession is closed! Spring + JPA (Hibernate)
I’m trying to make an example of JPA + Spring. But I’m having trouble managing transactions. persistence.xml: <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0"…
-
1
votes1
answer1189
viewsHow to get Paramentro in a C# sent from Android web service
I’m consuming a web service developed in C#, from an application on Android. By sending simple types per parameter such as string, int or long, I can usually get the information just by placing the…
-
1
votes1
answer418
viewsSimple settings menu with Checkboxpreference Android
I have a simple settings menu where I have a CheckBoxPreference. I want to set silent mode when the checkbox is checked and normal mode when it is not checked. The sound code I already have, but I’m…
-
1
votes1
answer1702
viewsProblem when trying to upload files using primefaces 4.0
I have a simple application that allows me to upload text files. To make these uploads, I’m using File Upload from Primefaces, but I’m having problems. I have tried several solutions and I can not…
-
1
votes1
answer663
viewsJSF rendering
How do I render the components of Richfaces. I have a combobox and when I click on an item I want it to render my form according to my item. Examples please.…
-
1
votes1
answer755
viewsHow to resolve "Array required, but (Class) found." error?
Also create a test class where you should instantiate an object of the class "Letter" and then the objects that should be stored in the array of that class. Carta teste = new Carta(); for (int i =…
-
1
votes2
answers1091
viewsI made a client/server socket application but only works by emulator
I made a client/server socket application, where the client is an android device and the server is made in java. At first this all ok, in the emulator it runs correctly, but when I install the apk…
-
1
votes2
answers3604
viewsPassing parameters from one Activity to another
I need to pass the name of a product selected in a ListView to be presented in a EditText. I am currently on the screen that the user informs the customer and then opens the screen of new order, on…
-
1
votes2
answers67
viewsPlacing two attributes in a cell
Have some structure, List, LinkedList, etc., that allows me to put two attributes in the cell? For example, an integer and a string in each cell.
-
1
votes2
answers233
viewsOutofmemoryerror: Java heap space
I have the following code: class Main { public static void main(String[] args) { Lista chamar = new Lista(); String[] vetor = {"Palavra", "Letra"}; chamar.adicionar(vetor); } } class Lista {…
-
1
votes1
answer216
viewsJava permeability
I’m having some difficulty solving a recursive problem, which I explain below. Given an array of n rows and columns, check for permeability, i.e., having the following matrix (where '*' - represents…
-
1
votes1
answer164
views -
1
votes1
answer979
viewsJPQL to view bank date/time with Hibernate without query
There is a way to query the database date/time without using activate query? On the Oracle I do this: SQLQuery qry = session.createSQLQuery("SELECT SYSDATE FROM dual"); But I would like a general…
-
1
votes1
answer1873
viewsProblem when inserting data into postgresql with jpa implemented by Hibernate
Good afternoon I would like to know why this error is happening, the project is with all the jars in the lib and in the path but when I will insert is returning me an error. Apr 19, 2014 4:49:27 PM…
-
1
votes4
answers10133
viewsDevelop iOS apps using Java
I am developing my TCC and it is based on the multiplatform concept of Java. But now I ran into a problem Xcode IDE Apple does not understand the Java packages. Is there a tool or extension that…
-
1
votes1
answer445
viewsGenerating tables in sql-server with Hibernate
I am migrating a Java system to work with 2 or more databases. I created the tables for Firebird using Hibernate without many problems. The second database was not successful. SQL-Server. Because…
-
1
votes1
answer5979
viewsTake client ip on request
I have a REST service in my application and in it I want to pick up the IP of the client who is making the call, use Spring-mvc in this project, here is the source of the service /** *…
-
1
votes1
answer174
viewsDevelopment with Codename One
I’m starting development with Codename One and finally I have a question about the support of this API with development using sockets. This by what I could perceive has only support for development…
-
1
votes1
answer120
viewsHow to keep a check box true after an error message is displayed?
How can I keep a checkbox true when I display error message? Every time I display a errorMessage my checkbox turns into false. How can I solve this problem? I am using jsf2.0 and primefaces. This is…
-
1
votes3
answers923
viewsError ""AWT-Eventqueue-0" java.lang.Stringindexoutofboundsexception: String index out of range: 0" in Java when trying to do IF
I am making a condition in the execution of a search in Java, what happens is that I cannot have blank space, asterisk(*) or question mark(?) as the first character of the search. However Java is…
-
1
votes1
answer272
viewsHow to open link contained in Javadoc by Eclipse?
Can I open a file in Eclipse from a link contained in a Javadoc snippet? In case that file would be an XML.
-
1
votes2
answers1309
viewsError calling method on fragment
My code below was to do a simple task, when clicking the button change to another screen, but is giving error: Cannot make a Static Reference to the non-static method chamaCadastro() from the type…
-
1
votes1
answer263
viewsRun JSF on Jetty 9
I am having problems running JSF on Jetty 9. Some specific jar is required within the application or some configuration in Jetty?
-
1
votes2
answers1966
viewsReturn of select objects (Combobox) with Hibernate + JSP + Vraptor. Does not fill relationship between tables
I have an object TabelaPrecoItem with all the structure formed and almost everything working, follows the model of the model. @Entity @Table(name = "fov_tabela_preco_itens") public class…
-
1
votes1
answer746
viewsObserver Design Pattern on Android
Someone would have how to show me an Observer structure within android? I was trying to build one like the java, but I was unsuccessful. My test was done as follows: I created a class Banco and a…
-
1
votes1
answer110
viewsDisplaying Flash Video on Android 2.3?
Good already tried of all ways to run flash video on android 2.3 of 4.0 forward will easy from a webview. Searching Google and in some forums I saw people riding through Videoview. For me it did not…
-
1
votes1
answer674
viewsHow do I get the name of a button in Mouselistener?
How do I get the name of a button in a class that implements Mouselistener: public class Viewer extends javax.swing.JFrame{ public Viewer() { initComponents(); } public void init(){ MouseListener…
-
1
votes2
answers1332
viewsTransfer files. class to the /web-inf folder in Eclipse
I’m developing a web project for a final college job. When creating . jsp files for the application, it gives error because it does not find the class of Servlet. The classes and the files . class…
-
1
votes1
answer768
viewsCoding in Eclipse EE
I have the following problem: I have a web service in Java using Jetty, the same works normally if I request other applications to the server, but my unit tests are returning the encoding all wrong.…
-
1
votes2
answers2022
viewsSimple authentication example with level without Hibernate and spring
I would like a simple example of user authentication. I already have the table in the database, which contains the user data and level (Administrator, common user). As I have no time to mess with…
-
1
votes1
answer1218
viewsProblem importing new libraries into Java
I am trying to create an application that can interact with a MIDI device, for this I am using the Jmusic library, but after putting the file . jar in my Workspace and have it added to the project,…
-
1
votes2
answers209
viewsIs there a way to filter contacts by "organization" in the agenda of Android contacts, when triggered through other activity?
In one app for Android, I intend to open the contacts agenda from another Activity via Intent, but I would like to see only contacts that bring a specific value in the "Organization" field. There is…
-
1
votes2
answers263
viewsHibernate Warning HHH000444 using Oracle 10g with Wildfly 8.0.0 - follow-on Locking
When making some queries in a view using JPA (2.1) with hibernate, I’m having this Warning. Though it’s working and it’s only one Warning, It bothers me a little bit. WARN…
-
1
votes2
answers4866
viewsJava.lang.String cannot be cast to error , when capturing data in Jcomobox to save
I have the event button saved, when I click to save, the following appears : Java.lang.String cannot be cast to org.nomedopacote.modelo.Funcionario cbNomeUsuario - It’s Jcomobox’s name that they’re…