Skip to content
Advertisement

Tag: java

Mac OS X and multiple Java versions

How can I install an additional java on MacOS? I installed jdk8 and that works fine. But now I need a jdk7 installation for development purposes. When trying to install the old version via DMG file, i get a warning, that there is already a newer version of java installed and the installer quits. How to install jdk7 in addition

Transposing a matrix from a 2D array

I’m self teaching myself some java and I’m stuck on creating a 2D array that initializes it with random values and then creates the transpose of the array. An example output is: Original matrix Transposed matrix ^ Should be the final output. Some help with the code would appreciated! I would like to code to generate error messages if the

Rmiregistry vs LDAP

I have recently discovered the Java RMI API and I am using the Rmiregistry to store and get the remote objects. Then, I saw that we can use LDAP to do this task. I was interseted by this approach but …

How do I put something on an FX thread?

I’m new to JavaFX (trying to move from Swing), and am trying to make a very basic window first. However, I keep getting the following runtime exception: However, looking at the JFXPanel source code, the constructor calls its initFX() method, which initializes the FX application thread. Why, then, am I getting this error, and how do I fix it? Answer

Login dialog window won’t dispose completely

I’ve got a dialog window for logging in a user to a main program in Java. I’ve recently discovered, however, that if the user clicks the “Cancel” button or the window’s native Close button, the program still runs, even if the login window itself has been disposed of. I have to force quit it. My instincts tell me that it

Not able to dynamically set the setVisibility() parameter

I am trying to set the visibility for a button as follows: But I am getting the error: while calling I don’t know how to get around this. I understand that it’s expecting a given set of values but all I know is to pass an int to it. What can be done here? Answer When you know what you’re

Immutable @ConfigurationProperties

Is it possible to have immutable (final) fields with Spring Boot’s @ConfigurationProperties annotation? Example below Approaches I’ve tried so far: Creating a @Bean of the MyProps class with two constructors Providing two constructors: empty and with neededProperty argument The bean is created with new MyProps() Results in the field being null Using @ComponentScan and @Component to provide the MyProps bean.

Java getResource return null mac

I am very new to StackOverflow and I’ve done my best to fix this problem before posting this question here. I’m faced with the problem of getResource() returning null. I have a hunch that this is because I’m on a mac and the pathing is different here than on a PC (where this code seems to work fine). This is

How to solve warning when using liferay-ui:search-container in JSP?

I’m developing a portlet in Liferay 6.1 using Liferay MVC famework. When I use Eclipse allways shows me the following warning message SearchContainer is a raw type. References to generic type SearhcContainer<R> should be parameterized JSP code fragment: I have searched many examples. I’ve imported them into my workspace. And they also show me the same Warning message when search-container

Advertisement