Questions tagged as 'java'

1
answer

How to integrate CDI-Unit with Jersey Test Framework?

Hello. I'm working on a ws rest with CDI and Jersey. I want to create a unit of tests with JUnit and due to the CDI I ended up using the CDI-Unit Runner. I found the CDI-Unit simpler than WeldJUnit4Runner. Now, I need to add the Jersey Tes...
asked by 27.05.2017 / 08:12
1
answer

How to share an audio from the internal raw directory?

I have several audios stored in the raw directory of the app and I would like to share it with other applications, like whatsapp for example, but I found the documentation on configuring the File provider very confusing. AndroidManifest.xml...
asked by 27.05.2017 / 17:53
0
answers

Position of the first element in a Heap object

I'm in doubt about the heap priority queue, regarding inserting elements in this list. Does each heap start by inserting the element vetor[1] ? Or should you enter from vetor[0] ? Because I have a heap that inserts into vet...
asked by 27.05.2017 / 16:59
1
answer

Display specific error! java.sql.SQLException '

Hello I'm like the following code: <c:set var="exception" value="${requestScope['java.sql.SQLException']}"/> <p class="alert alert-danger"><b>Ops!</b> Erro: <br><br> <!-- Stack trace --> &...
asked by 17.05.2017 / 14:48
1
answer

How to run a task in the background

I'm new to android programming and I've been doing an application for myself so far. In this app I want when it goes into the background, that is, when I exit the application without calling the onDestroy () method, a task will start to run....
asked by 17.05.2017 / 16:22
1
answer

Problem with Classes and Variables in java

I created a class, inside it I want to call some methods but it has to be what is typed inside the JTextPanel, does anyone know how to do it? This is my Choice class: public class Escolha { public static String hey; //NAO EXISTE NO CÓDI...
asked by 28.05.2017 / 01:24
1
answer

Have more options in the action_send dialog

I'm using action_send , but it does not give me options for WhatsApp, Facebook, and other social networks. Only Gmail and Message. Code I'm using is: Intent share = new Intent(android.content.Intent.ACTION_SEND); share.setType...
asked by 25.05.2017 / 22:43
1
answer

Mount List mapped with @ManyToOne only with some objects

Is it possible to assemble a list in a class with only a few objects? @NamedQuery(name = "Curso.Aprovados", query = "select cur from Classificacao cl JOIN cl.candidato ca JOIN ca.curso cur") public class Curso { @Id @Co...
asked by 25.05.2017 / 20:57
1
answer

Application Stopped Webview

I have an application with a WebView , after inserting a code so that it could go back to WebView when pressed the close button of the phone has an error, but this error ("The application *** stopped) only appears when clicked back....
asked by 08.06.2017 / 17:57
0
answers

Problem with Tabs and Adapter

I have a problem here. I have this code Home screen: publicclassInicialextendsAppCompatActivity{privateImageButtonbutton,button2;protectedvoidonCreate(BundlesavedInstanceState){super.onCreate(savedInstanceState);setContentView(R.layout.ac...
asked by 08.06.2017 / 14:29