Questions tagged [javax]

Pointless catch-all tag. Do not use. For removal.

Pointless catch-all tag. Do not use. For removal.

176 questions
0
votes
2 answers

javax validation OneOf constraint

Is there an annotation in javax validation, so it should constraint that value is one of predefined values. Example @OneOf(values = "12-14m, 16m, 18m") private String size;
Romper
  • 2,009
  • 3
  • 24
  • 43
0
votes
0 answers

Java play background music(.wav) using javax.sound

I am trying to play background music for my game using javax.sound. The problem is that only the first half second of the song is playing before stopping. I want the entire song to play. I would attach the .wav file on this post but StackOverflow…
akarshkumar0101
  • 367
  • 2
  • 10
0
votes
1 answer

Having trouble Unmarshalling XML in Java

Here's the xml I receive
Aubanis
  • 23
  • 5
0
votes
0 answers

Send mail from username.noreply@domail.com without actual mailbox

I need a javax setup where I will receive mails at username@domain.com and acknowledge/reply users from username.noreply@domain.com. Can I achieve this using username.noreply@domain.com not being an actual mailbox, but just like an alias address to…
Amresh
  • 315
  • 1
  • 5
  • 14
0
votes
0 answers

Why does my Java program not recognise a static variable in a particular class?

I am doing some test code for an inventory system (I plan to work on a game later on) using Javax components. I was making a class called 'Cursor' which extends 'ItemStack' so that you can "pick up" items you click on in an inventory screen. The…
0
votes
0 answers

how convert a string into a multiple lambda function using java

I saw this example How to convert a string to a lambda expression? expression of how to convert a string into a java function using this code snippet: import java.util.function.Function; import javax.script.*; public class ScriptFunction { …
john
  • 3
  • 3
0
votes
1 answer

JAVAX RS WS Client Exceotion NoClassDefFoundError

We are migrating CXF version 2.7.7 to 3.1.8 and facing the belows issue. And also updated javax.rs.ws 2.0-m10 to 2.0.1 Exception in thread "main" java.lang.NoClassDefFoundError: javax/ws/rs/client/ClientException If we are using the same …
0
votes
3 answers

Doc4j: Compare two documents fails due to different Element-types

I try to write some JUnit tests for a Docx4J generator I have written. I want to compare the output node of my generator with an expected node that I want to load from a string. So, I create my "actual" node (generator output) like so: Node…
0
votes
0 answers

To avoid that an imported Library override a specific Java method

Hypotesis: I import inside my project, in Netbeans, the external library "Tritonus_remaining_0.3.6" (I import the compiled .jar file) I need to use the mehod "javax.sound.sampled.AudioSystem.getAudioInputStream(MY_AudioFormat__Target,…
Fausto70
  • 541
  • 5
  • 20
0
votes
1 answer

PowerMock test fails to initialize with PrintServiceLookup

I am attempting to use powermock to mock javax.print.PrintServiceLookup however the below tests fails to start up. I am able to successfully mock other static classes with this setup, just not with PrintServiceLookup @RunWith( PowerMockRunner.class…
DynaWeb
  • 605
  • 1
  • 7
  • 15
0
votes
2 answers

Javax / Hibernate native query ArrayIndexOutOfBoundsException crosstab query

Tying to figure out why this query is not working... Any suggestions / help? Postgres with a javax native query. Query query = em.createNativeQuery("select avg(period_01), avg(period_02), avg(period_03), avg(period_04), avg(period_05)…
Daryn
  • 1,551
  • 1
  • 15
  • 21
0
votes
1 answer

Accessing JTextField using a private class

I'm trying to store output from user inputed text, this is simply a template for it but I can't seem to figure out a way to properly access the JTextArea, all the examples I've found are doing it in a different way then I'm trying to accomplish it,…
Sentinel
  • 98
  • 1
  • 11
0
votes
1 answer

Custom annotation for Confidential data

I am creating an application where I am planning to take confidential data of the user. But for debugging issues I am planning to log the values like for which username there is an issue. But dont want to log their passwords. I have this sample…
Shubham
  • 33
  • 12
0
votes
0 answers

Read email type of text/html

How to read email type of "text/html" ? This is how I get emails: try { store = emailSession.getStore(mailStoreType); store.connect(host, username, password); Message[] messages = getMessages(folder); Message…
Nael Marwan
  • 1,030
  • 1
  • 13
  • 32
0
votes
1 answer

Intellij Idea not finding jar

I have a single java file to compile. It uses javax.servlet-api-3.1.0.jar. I added it to maven with mvn-install and it says it built successfully. However, in Intellij it still throws errors during compilation saying: package javax.servlet does not…
user8160918