Custom DownloadInstaller For JNLP Webstart
Oct 13, 2014
I am writing a custom jnlp installer for downloading our applications. We are having difficulty to specify our own cache directory. The default Download Service is not taking the below property. I was wondering if we need to extend any of the jnlp api classes and write my own. System.setProperty( "deployment. user.cachedir", "C://Users//f355668//AppData//Roaming//WorkBench//" );
View Replies
ADVERTISEMENT
Jun 17, 2014
I have to build a server application. My issue is that it can never shutdown/restart. But I still need to update it.After some research I learned about OSGI where I can add/remove a bundle of code while the application is running. (update to a new version)Can I use JavaWS to update my OSGI application without having to close and restart it? I'm new to OSGI/JavaWS.
View Replies
View Related
Jul 17, 2014
Whether it is possible to force the installation of JRE when trying to open JNLP file. It is quite often case when users try to run JWS application without JRE installed. The best option would be to force the installation or at least display some message with instructions. Perhaps there are different ways to handle this problem.
View Replies
View Related
Dec 19, 2013
When we have a property in the jnlp file that has accented characters (i.e. Mañana), the System.getProperty() call is returning null. This is working fine with Java 7 Update 40, and accented characters in the <information> section of the jnlp file are working fine under Java 7 Update 45, but not in the <resources> section.
Here is an example:
<property name="jnlp.title" value="Mañana"/>
System.getProperty("jnlp.title") returns null
Is there a workaround?
View Replies
View Related
May 8, 2014
Have an issue with deploying our application, which comes in two parts, with javaws . In our installer (which is coded in NSIS) we call javaws twice, each time referencing a different jnlp file. It looks like this:
javaws -wait -shortcut -import -system http://192.168.1.82/launch?[params]
javaws -wait -shortcut -import -system http://192.168.1.82/launch?[slightly different params]
Whichever jnlp file is second gets imported into System Applications. My guess is that it is overwriting the first imported application.
View Replies
View Related
Feb 23, 2015
I am trying to export Solaris Display on Linux and trying to launch JNLP.
I am trying to follow the instruction mention in the following URL.
[URL] .....
I would like use the property mentioned in the above article in JNLP file on client side .
I did following nothing is working.
1. <argument>awt.toolkit=sun.awt.motif.MToolkit </argument>
2. <property name="awt.toolkit" value="sun.awt.motif.MToolkit"/>
3. java-vm-args="-Dawt.toolkit=sun.awt.motif.MToolkit"
4. export AWT_TOOLKIT=MToolkit
How do i check JNLP client is using it?
View Replies
View Related
Jul 13, 2014
I have this arraylist off a custom object that looks like this witch also contains a list off custom objects
package holders;
import java.util.ArrayList;
public class ManufacturingJobHolder {
private String name;
[code]....
View Replies
View Related
Mar 11, 2014
I am new to work on JNLP program. I have created a SWING program, JNLP file when i deploy the ear file i am getting 404 error. Please find the steps in details.
1.Created a dynamic web project JWStartProject in eclipse
2.Create a HelloWorld.java class under default package.
import javax.swing.*;
public class HelloWorld extends JFrame {
private static final long serialVersionUID = 4968624166243565348L;
private JLabel label = new JLabel("Hello Java Web START!");
public HelloWorld() {
super("Jave Web Start Example");
this.setSize(350, 200);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE );
this.setLayout(null);
[Code] ....
Now I exported this project as JWStartProject.war contains following code.
Created Server in Websphere Admin console
Deployed this war file under the server and started.
I have added MIME types also.
I am unable to launch the application. I am getting 404 errors. May I know where I went wrong?
View Replies
View Related
Jun 30, 2014
I am working on a project that uses a custom tag in a JSP file. Here is the tag descriptor
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0.0</tlibversion>
<jspversion>1.1</jspversion>
[code]...
Everything seems working fine except that the custom tag handler does not get called at call. I set breakpoint and it never stops there. The JSP page is displayed fine, only not showing the custom tag content and there is no logged error/warning from the log. The tld is found fine. Like what classes called/validated the tag handler so I can logging those classes at DEBUG level to see what goes wrong.
View Replies
View Related
Apr 22, 2015
I would like to create a custom tag which works similar to <c:forEach/> tag i.e
<c:forEach var = "movie" items = "${collection}>
${movie}
</c:forEach>
I would want to create the similar behaviour(as above) in my own custom Tag.Morever I would like to use the doStartTag() and doEndTag() and doAfterBody() methods while creating custom Tag.
View Replies
View Related
Mar 19, 2014
My jsp page needs to have a dropdown box. on selecting one/more than one values from this list, the same values get populated in another one.. we have a delete button too , it allows to populate the second box again.
The thing is i am to avoid scripts and use custom tags as much as i can...
View Replies
View Related
Nov 5, 2014
I am supposed to implement a custom Map interface and I'm having some trouble with this method:
// 1. From the interface
/**
* Gives an iterator iterating over the key set from the smallest key that is not less than the key provided.
* @param key the key
* @return the iterator
* @throws NullPointerException if key == null
*/
public Iterator<Key> tailIterator(Key key);
[Code] .....
My implementation is wrong according to a JUnit test. Also, to get a full score this method should have a worst case running time of O(log N), which obviously isn't the case now. (My Map implementation is currently based on binary search in an ordered array, keeping a prallel array for the values).
View Replies
View Related
Aug 6, 2014
I'm having trouble creating a highly efficient algorithm for counting within a custom scale. This problem applies to futures trading, specifically treasuries contracts.
One specific treasury contract has 32 units before rolling over to the next whole number. So, the price scale looks something like this ...
1 0
1 1
1 2
...
1 29
1 30
1 31
2 0
2 1
...
2 30
2 31
3 0
...
If I pick a number (price) at random, let's say 1 28, and I want to add 8 units to that value, I should end up with 2 4. I can do this using brute force, calculating remainders, etc, etc....
View Replies
View Related
Dec 24, 2014
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
public class Main
[Code] ....
I cant custom my own icon. There is no error. But the image that I tried to show in the joptionpane is not showing. What should i do?
View Replies
View Related
Jan 23, 2015
I'm running spring MVC on a tomcat server and am fiddling around with beans and annotations.
First, I have a class Library, with a registerBook(<T> Book) method. This one is annotated with @BookRegistry
Next, I have an Interface Book, which basically is a bean with some custom methods.
I will create different types of books that implement my Book interface and annotate them with @LibraryBook
Now, I want to have spring to check for all beans with @LibraryBook at server startup and run registerBook for each and every one.
How do I accomplish this?
View Replies
View Related
Jul 27, 2014
I have a java code that should sort an array of names based on the last name. e.g jane a, jane b, jane z, jane d should be jane a, jane b, jane d, jane z. I have the following code but for some reasons, the s1 in the comparator method is always null.
public class ShuffleName {
public static void sortNames(String[] names){
Arrays.sort( names, new Comparator<String>() {
public int compare( String s1, String s2 ) {
String s1last = s1.split("s+")[1];
String s2last = s2.split("s+")[1];
return s1last.compareTo(s2last);
[code]....
View Replies
View Related
Feb 2, 2015
I am trying to make a custom table for a DB and i am stuck.
I want only the first column to have a checkbox and others not.
Is there a better way to insert the values instead using the getValueAt ?
@Override
public Object getValueAt(int row, int col)
{
if (col == 0)
[Code].....
View Replies
View Related
Jan 12, 2014
my application shows a profile. The profile has various interactors. I'm trying to follow the MVC model, so I neeed to tell my controller that something was selected. But the profile has many elements that can be selected(mostly labels, so not setActionCommand), how do I tell it WHICH one was it?
how do I separate those interactors? I created a HashMap that maps from JLabels to Strings. When a mouse event occurs I loop trough it to search for the event source. If I find it I fire my custom event.
View Replies
View Related
Nov 15, 2014
I woud like to convert a string(which is in an array) to a custom object.
Also, if I have different custom objects, will it be ok if I use
ArrayList<Object> o = new ArrayList<>();?
View Replies
View Related
Nov 2, 2014
I would like to ask about JTree custom renderer. What could be wrong with this. Here's the deal:
I have a Jtree which suppose to view the structure of given folder, so far so good its working. But my problem is that i dont want it to show the full path as name, only folder name and file name. I wrote a custom JTree renderer in hope that this will solve my problem but it didn't.
Here is my custom Jtree renderer:
private static class MyTreeCellRenderer extends DefaultTreeCellRenderer {
@Override
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {
super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
if( value instanceof DefaultMutableTreeNode){
[Code] .....
and here is where I am trying to implement it:
tree.setCellRenderer( new MyTreeCellRenderer());
View Replies
View Related
May 14, 2014
I am not able to pass parameters to custom tag. This is my tag file header.tag under web-in/tags folder
<img ><br>
<b><i>${subTitle}</i></b>
And This is my jsp page that use that tag.
<%@ taglib prefix="myTags" tagdir="/WEB-INF/tags" %>
<html>
<body>
<myTags:header subTitle="We make sure our clients dont have to do that" />
</body>
</html>
It says attribute subTitle invalid for tag header according to TLD.
View Replies
View Related
Jun 12, 2014
I am looking for a solution that will allow me to use a custom background image to replace the JFrame window. I am able to add a background Image, however I am not able to remove the "white" that is supposed to be transparent.
For example; if the image was shaped like a bird with transparent background (.PNG), I would like that to be put on the JFrame. Usually it will be a square with the image in the middle with white background, which I am unable to remove.
View Replies
View Related
Jul 20, 2014
I've been trying to work with custom Exception classes, but I keep running into what I think is an array error. It's in a very monolithic format because I was just trying to bang it out and get it done. Anyway, my issues is I am trying to compare values in the array to the minimum and maximum possible scores for a student (0 and 100) but I have totally forgotten how to do it.
Here is the code, the offending bit is at the very bottom:
package org.CIS407.Lab6;
import java.util.*;
public class TestScore {
public static void main(String[] args) throws ScoreException {
Scanner scan = new Scanner(System.in);
int sz; //holds scanner values
int[] studentArray;
[Code] .....
Right now I'm getting an error when I go to enter the very last student score. It throws an exception.
Here is a sample output of what I'm getting:
Enter number of students
2
Array created successfully. Enter student ID's into array
1
2
Enter number of scores
2
Array created successfully. Enter student scores into the array
50
32
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2
at org.CIS407.Lab6.TestScore.main(TestScore.java:64)
View Replies
View Related
Feb 19, 2015
I would like to implement a custom Logging strategy for my Java project.I have implemented 3 appenders : one console-log, one file-log (errors only) and another (custom) file-log (with the custom parameters).The custom parameters are : loggerName, logPathDir, logFileLevel and layoutPattern.
I have not managed yet to implement a custom layoutPattern strategy for the custom file-log.When I launch my tests : test1 (default logging setting) and test2 (custom logging setting), I have only managed to get a sucessfull status if I switch the custom layoutPattern strategy to the default one for the test2. My implementation extract :
// Layout patterns : default (layout) and custom (patternLayoutCustomBuilt)
Layout<String> layout = PatternLayout.createLayout(PatternLayout.SIMPLE_CO NVERSION_PATTERN, config, null, null, false,
false, null, null)
PatternLayout.Builder patternLayoutCustom = PatternLayout.newBuilder();
PatternLayout patternLayoutCustomBuilt = patternLayoutCustom.withPattern(layoutPattern).wit hConfiguration(config).build();
[code]....
View Replies
View Related
Jun 24, 2014
I have 4 variables: longitude, latitude, accuracy and distance. I need to store these variables in two different servers, one for private data and the other for public data, in the cloud. Before sending those data to the server, filtering is takes place as private and public variables so that the private and public data will be send to the respective urls specified with.
public class LocationTracker{
private longitude;
private latitude;
private accuracy;
private distance;
// other tasks
}
public class Filter{
[Code]...
My intention is to assign those variables the characteristic/properties, public or private, thus, I can easily identify them anywhere in the code whether they are public or private and store them to the respective urls. If the private data attempt to be send to the public url, the rejection should be made. So, How do I do that?
View Replies
View Related
Jan 4, 2015
I am developing shopping cart in which I am storing image in database and retrieving.
When I select any product category from menu. example, I selected Computer then all list of product related to computer will be return i.e productName, Price and image, By using JSON.
this is my json response and output in comment.
success : function(data) {
if (data.length != 0) {
var d = eval(data);
$("#productList").html("");
for ( var key in d) {
[Code] ....
Alternatively I created custom tag to resolve this.Custom tag is working fine in jsp but in java script it saying error raised Unterminated custom tag. I think I used this custom tag in javascript but i am not sure about this error,
custom tag code for image :
imgByte = product.getImage().getBytes(1, (int) product.getImage().length());
String encodeimage = new String(Base64.encodeBase64(imgByte));
out.println("<tr><td><img src="data:image/jpeg;base64," +encodeimage + ""/><tr> <td>");
MY Question
1 - How can I use Custom tag in javascript ? Or
2 - How can we extract image from json object, like I did in custom tag .
View Replies
View Related