Questions tagged as 'java'

1
answer

Convert string currency to double without knowing the format

I am trying to pass a string with random values with different currency formats: 1,222.50 1.222,50 1222.5 1222,500 1222 To a double to be able to insert it in the database. So far I have the following code: String a1, a2; a1 = "1.100,50";...
asked by 31.01.2017 / 15:24
5
answers

Java Connection Pool

I have successfully made a connection to a connection pool, but I still have the question of how to instantiate the connection class, my question is: Every time the connection class is instantiated, a new one is created or the connection is o...
asked by 30.01.2017 / 16:42
1
answer

How to fill Java Textbox depending on the value of 2 Combobox?

I have created a java form with NetBeans, a JFrame (Main), Dialog (Enrollment), Student Class, Student Manager Class. In Enrollment I have 2 comboboxes one for the cycle and another for the course, depending on that the txtcredito (Credito) and...
asked by 29.11.2016 / 04:02
1
answer

add element within another XML element DOM

this is my code: public class agregar extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { String nombre= request.getParameter(...
asked by 26.11.2016 / 22:35
2
answers

error connecting to a Datasource in weblogic

I have a Datasource created in Weblogic but when I invoke it from a class, it generates the error:    javax.naming.NamingException: Lookup failed for 'jdbc / ConexionFV' in   SerialContext [myEnv = {java.naming.provider.url = t3: //127.0.0.1:...
asked by 10.10.2016 / 19:04
7
answers

Problem to convert JSON to JAVA object

I have the following JSON , it is a response of API : { "ES1800496542831234567890":{ "transactions":[ { "idmovimiento":"714597", "fechaoperacion":"2016-05-27", "fechavalor":...
asked by 10.10.2016 / 21:44
1
answer

how to get the item from a list in java and pass it to a variable?

I have the following code, which sends a query that returns a list, within that list there is an element called getHoraEntrada, which comes in Date format, and I in my view just want to show the time, so what I did was create a variable String...
asked by 22.02.2018 / 00:19
2
answers

"Access can be packetLocal" - JAVA

Most of the methods that I instantiate in several classes ask me to change it to "packetLocal". Example:    public void example (); go to    void example (); So, should the methods be public or not?     
asked by 19.09.2016 / 12:31
1
answer

Error Could Not Find Method (View), Place Picker Google Api

@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_user); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); get_place = (Button)...
asked by 04.08.2016 / 21:06
1
answer

Turn MySQL server on and off

I want to turn on and off the mysql server through java, this is just an exercise, I used the org.apache.common.exec package to run the command, the only problem is that I can only do it through the daemon with sudo launchctl unload -F /Librar...
asked by 01.08.2016 / 04:35