Making Applet Compatible With OSX

Nov 28, 2014

I am trying to run a Java applet (.jnlp) file through OSX. The purpose of the applet is to upload files to an SQL server. When I try to run the applet, I get an "Unable to launch the application" error because "No application resources are specified for this platform" After some digging , we noticed there are only resource instructions for "Windows".

Would there be any way possible to make this compatible in an OSX environment through a few alterations to the code, or would this be an issue that the original developers would have to resolve?

Here is the specific code pointing to the Windows Resources:

<resources os="Windows" arch="amd64">
<j2se version='1.6+' initial-heap-size="64m" max-heap-size="512m"/>
<jar href='http://192.168.1.140:7001/MagicInfo/uploader/uploader.jar' main='true' />
<jar href='http://192.168.1.140:7001/MagicInfo/uploader/lib/jnlp.jar' download="eager" />
<jar href='http://192.168.1.140:7001/MagicInfo/uploader/lib/transform.jar' download="eager" />

[Code] ....

View Replies


ADVERTISEMENT

How To Make Jar File Compatible For All Window Machines

May 5, 2014

I made the program below in java and compiled with javac command in Window7 (64bit machine). It simply post my machine IP and Mac address to my server application.

When i run this script with java as >java Macregister

I get what is expected, the program runs well on my machine.

When I try to run it on other machines (Win8 - 32 Bit) I get error message and nothing works.

My problem is 1) to make it compatible for all machines 2) to convert it into JAR application so that it is self executable on different machines.

I am a new to Java and am struct,

import java.net.*;
import java.io.*;
public class Macregister{
public static void main(String[] args) throws Exception {
InetAddress add=InetAddress.getLocalHost();
NetworkInterface network = NetworkInterface.getByInetAddress(add);
byte[] mac = network.getHardwareAddress();
StringBuilder sb = new StringBuilder();

[Code]...

View Replies View Related

JSP :: Making Sessions To Not Expire?

May 30, 2006

how this is done using session.setMaxInactiveInterval(); at first, i did not set anything but it expires anyway.so i'm trying not to let the session expire.session.setMaxInactiveInterval(0) does not work.

View Replies View Related

Making Import / Export Of XML

Sep 17, 2014

I'm making an import/export of xml - I have the import of xml sorted I'm just trying to finish off the export. My export class is called XmlWriter.java. Inside the class I have an updateFile method to update an xml file as such:

public void updateFile(Environment environment,Document doc)
{
// code
}

I then in my main method have

public static void main(String argv[]){
 //declare new object of class
XmlWriter xmlWriter = new XmlWriter();
//test testUpdate method
// xmlWriter.testUpdate();
 Environment environment = ;

[code]....

I don't know what to make my variables equal to - eclipse keeps trying to use null but obviously that won't work. The Environment is another class that just contains getters and setters for the 3 different databases (that are in the xml file) and the getter/setter for the environment ID (also in xml file).

View Replies View Related

Making Exe File With IntelliJ

Jan 10, 2014

How can I make an .exe file for my java project that will work on every computer?

I have a jar file, but the project can not work without installed IntellyJ or other development environment on that computer, i.e. it doesn't work only with installed java runtime.

What can I do to make an .exe file for my java project?

View Replies View Related

JSP :: Making A Request To A Servlet More Than Once

Sep 29, 2014

I have a jsp with an img tag whose src is set to request a servlet to display a chart. This is called from another jsp form where user can select various filters. The first time the request is made all works great. but if the user changes the filter settings and and makes the servlet request a second time the chart stays the same. I have verified the new filter values are being set but the servlet is only being called on the initial request.at the head or called servlet I have(I also call a jquery empty on the div that holds the chart between requests. at the moment it just displays the former chart). It is like it is using cache:

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
response.setHeader( "Pragma", "no-cache" );
response.setHeader( "Cache-Control", "no-cache" );
response.setDateHeader( "Expires", 0 );

View Replies View Related

Making Pie Chart For Values That The Row Contain

Mar 9, 2014

I use JTable and JScrollpane in my java application, and I would like for every selected row in the scroll pane, the pie chart to be made for the values in % that the row contain.

View Replies View Related

Making Window Not Resizable

Oct 9, 2014

How would i go about making this NOT resizable?

If I do try to do ChatFrame.setResizable(false); it gives me this error:

Exception in thread "AWT-EventQueue-0" java.lang.Error: Unresolved compilation problem:
Cannot make a static reference to the non-static method setResizable(boolean) from the type Frame

at com.ui.ChatFrame.<init>(ChatFrame.java:37)
at com.ui.ChatFrame$5.run(ChatFrame.java:403)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)

[Code] ....

Here is the code:

package com.ui;
import com.socket.History;
import com.socket.Message;
import com.socket.SocketClient;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

[Code] ....

View Replies View Related

Making Home Inventory

Jan 22, 2014

I'm going to make Dekstop Based Home Inventory, do you have a tutorial for it ?

View Replies View Related

Making A Rain Histogram

Mar 10, 2014

I prompted the user to enter inches of rainfall for seven days and stored them in an array. Now, I am trying to display a histogram of this data using a nested loop, but for each inch, I have to display a * like this:

Rainfall Histogram:
****
***
**
******
********
**********
**

The only way I know how to display a number of *s according to user input is by an if statement. I copied and pasted from a similar class assignment I did, so what I have so far is pretty messy and nonsensical:

static char DetermineRainfall(int inches)

System.out.println("Histogram");
//char inches;
for(inches = 0; inches < 7; inches++)
{
for(int j = 0; j < 1; j++)
{
if (rainamount > .9 && rainamount <= 1)
inches = '*';
return inches;
}
}

View Replies View Related

Making Counter AI For Connect 4 Game?

Apr 28, 2015

I am a student in an intro to computer science class working on my final project. This is essentially a game of connect 4, but only requiring 3-in-a-row for victory. We were given the base game and a sample file to work with to make an AI that beats our professor's ai in the base game. Here is the base game

package cs110.project3;
 import javafx.application.Application;
import javafx.application.Platform;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;

[code].....

View Replies View Related

Making Squares Of Numbers Without Multiplication?

Oct 22, 2014

so for my computer science class, we have the following problem:

In your documentation be sure to say which loop you thought was easier to implement for this program and why Write a program that produces the following outputs. The first line of output must be written using a For-Loop. The second, using a While-Loop and the third using a Do-Loop.

You look at the program and smile because you see that the series is just the numbers 1-10 squared...just one line is in reverse order. No problem! As you start typing you discover that the number 8 key on your keyboard is not working. For this program you are unable to use the multiplication key

So, back to the drawing board. By staring at the sequence a light comes on and you are able to quickly finish this program WITHOUT using mulitiplication (or the Math class/ solve with arithmetic operators +, - or / ) .

Sample output:

For Loop
1 4 9 16 25 36 49 64 81 100

While Loop
100 81 64 49 36 25 16 9 4 1

Do While Loop
1 4 9 16 25 36 49 64 81 100

I have the "for" done, but I did it with a "for" in the beginning but then had a multitude of nested "if" loops so that I could do 7*7=7+7+7+7+7+7+7

View Replies View Related

Making Integers Have Limited Numbers?

Aug 14, 2014

I want users to input their phone Number But I want to make sure it is a phone number so they don't just do 1 and then leave it.

public static void main(String[] args) {
// Create the Scanner
Scanner in = new Scanner(System.in);
// Create the Variables
int phone;
if(phone > 100000000000 || phone < 100000000000) {
System.err.println("Error");
}

By the Way there are 12 digits in the if statement so that is 11 0's. Because all phone numbers are 12 digits.But when I run it, it comes up with an error saying The literal 100000000000000000000 of type int is out of range.I don't know how to make it so that the int has a limited number.

View Replies View Related

Making A Loop Go A Certain Amount Of Times?

Jun 14, 2014

I am having is not being able to print out the diamond the amount of times the user enters (for example, when it asks how many diamonds, I enter a 2 and only one diamond comes out.)

import java.util.Scanner;
public class Pattern5
{
public static void main(String[] args)
{
// For this pattern program, ask the user how many diamonds
// she would like to print to the screen. The following pattern is one diamond.

[code]...

View Replies View Related

Making Plus Sign To Add Two Numbers In Java

Mar 7, 2015

I am having a bit of trouble making the '+' add two numbers in java. For example:

When the user enters " + 4 5 " I want it to come out as " 4.00e+00 + 5.00e+00 = 9.00e+00 "

Here is what I have so far:
 
public static void main(String[] args) {
 Scanner in = new Scanner(System.in);
 while (in.hasNextDouble()) {
 double num1 = in.nextDouble();
double num2 = in.nextDouble();
String s = "";
 
[Code] .....

View Replies View Related

Making Object And Adding To Array

Oct 2, 2014

I need to be able to call this method and it should take the object and, add it to my list of items, but I am having trouble getting it to work. I know the numbers and stuff aren't correct eventually it will add one to the array length when i call add item, but I am just trying to go one step at a time

//creates new MediaItem object and add it to items[]
void addNewItem(String title){
MediaItem object = new MediaItem(title);
MediaItem[] items = new MediaItem[1];
items[0] = ("object.getTitle()");
numberOfItems = numberOfItems + 1;
System.out.println(items[0]);

View Replies View Related

Making Coin Star Simulator

Oct 13, 2014

I have been tasked with creating a coin Star simulator. This accomplishes which accomplishes the following tasks:

Prompts the user to enter coins:

(example inputs): (Note, these can't be like a numerical input followed by a word input, it needs to be one line)

4 quarters
3 dimes
0 pennies

All of which would be allowed inputs.

If an incorrect format is used it should tell the user to use the correct format of number space cointype

After every new input it should give a running total of the current money the system has stored.

this loop should continue until the user enters the phrase "finish"

Then, this system should output the money (minus 9.1% fee) in the largest denominations possible (up to $20)

So if the total came to $ 131.33 (after fee)

It should output:

6 twenties 1 tens 0 fives 1 singles 1 quarter 0 dimes 1 nickle 3 pennies.

and then maybe some cheeky text about how the machine stole your money.

The actual coding for me however is very difficult as I really don't know how to convert the string input from the user into usable numerical and substrings for the calculations.

I have some basic skeleton code worked out, but its only designed to run once.
 
import java.util.Scanner;
 public class CoinStar {
Scanner input = new Scanner(System.in);
public static void main(String[] args) {
/** this first section is supposed to take the string from the user and separate it into two substrings,
* one integer, one word string
*

[Code] ....

View Replies View Related

Making Dynamic Website In Java

Jul 23, 2014

This might make me look pretty silly but I was curious if there was a way to make a dynamic web page in java. Basically only using pure Java, with only HTML5, CSS and mySQL.

View Replies View Related

Making Integers Have Limited Numbers

Aug 14, 2014

I want users to input their phone Number But I want to make sure it is a phone number so they don't just do 1 and then leave it.

public static void main(String[] args) {
// Create the Scanner
Scanner in = new Scanner(System.in);
// Create the Variables
int phone;
if(phone > 100000000000 || phone < 100000000000) {
System.err.println("Error");
}

By the Way there are 12 digits in the if statement so that is 11 0's. Because all phone numbers are 12 digits.But when I run it, it comes up with an error saying The literal 100000000000000000000 of type int is out of range.I don't know how to make it so that the int has a limited number.

View Replies View Related

JMenuItems - Making ActionListener For Each Button

Jul 13, 2014

So I have this issue with ActionListener, I have created JMenuItems in a loop and applied them to JMenu's. But now when I want to make an action listener for each button, I'm not sure how to select them individually as in the loop it's 1 object looped through different names.

Here is the way I made the menu.

package com.simbaorka101.te.gui;

import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import com.simbaorka101.te.reference.Reference;
public class Menu extends JMenuBar{
private static final long serialVersionUID = 3601135828398064405L;

[Code] ....

View Replies View Related

Making Graph Work Correctly

Nov 9, 2014

I'm working on a homeowork assignment here URL... and I can't get the graph to work correctly. I'm not really sure how to print the string of names, gender and rank at the point on the graph. Also I'm just wondering if I set up the scanner to find names right.

import java.util.*;
import java.io.*;
import java.awt.*;
public class Names {
public static final int year = 1880;
public static final int decades = 14;
public static final int decadeWidth = 70;

[code]....

View Replies View Related

Swing/AWT/SWT :: AffineTransform Making Image To Move

Aug 5, 2009

I've been trying to make an image rotate in a panel. I did it. But also i want the image to make a translation.

Here is the code i tryed at paintComponent() :

//////////////////////////

Graphics2D g2 = (Graphics2D) g ;
AffineTransform at = new AffineTransform() ;
// at.rotate ( angle in radians ) ;
at.rotate( this.getAngulo(1, 1) ) ;
g2.drawImage(imgemFlecha, at, this);
/////////////////////////////

I cant change image x,y doing this drawImage(). I want to make that change.

View Replies View Related

Servlets :: Making JSP Page To Display On First Request

Jan 7, 2015

my Servlet as I would like my Servlet to run first and to create a session var then forward the value to the JSP (the GUI ) and have the JSP able to send a var back to the Servlet for reprocessing and update the session var to again be sent to the JSP and so on . - The Servlet contains logic to handle incorrect input types and directly out puts a HTML error page..

Below I will add the code I have so far and a link to the question in my Text Book.

My code:

JSP Page:

bank.JSP :

<%
//Starts outputting the HTML Form
%>
<html>
<head>

[Code].....

View Replies View Related

Swing/AWT/SWT :: Alternative To Making Static JList?

Sep 16, 2014

I am currently writing a chess application in Java swing. For the GUI part, I have one MainWindow class, and one ChessBoard class. The MainWindow has a main panel, in which is contained 1) a panel containing the chessboard from the chessboard class (a grid layout array of 64 JLabels), 2) a JLabel status bar, and 3) a JList to hold the moves of the game. I have a movePiece method in the chessboard class, which I would like to add the move and question to the moves list, which is contained in the main window class.

However, since JList is some special type, I can't make it static ( that gives me an error ). I also tried creating a method in the main window class to add a move to the list, which I would then access via the chessboard class. However, I can't make the method static, because it is referencing a non-static variable ( the JList ), and since the Main window class already has an object of the chessboard class, trying to create a main window object in the chessboard class creates a stack overflow error.

View Replies View Related

Making J2me List Generate Program

Apr 6, 2014

I have to make a program on J2Me which I don't have a clue, the question is :

-------------
"Initial display is a text box, with a command button "Generate". When the user enters the list type and clicks on the Generate button, the application asks count of elements and gets the elements and finally displays the list."
--------------

View Replies View Related

How To Add Database To NetBeans Project When Making Setup

Aug 21, 2014

I have completed an assignment for my university in which I had to make a Java NetBeans project. My project is now completed but now I have to make a setup of my NetBeans project and give the university the setup file, only.

My question is, the software I made has a database attached to it, meaning the purpose of the software is to be used with the database. Values must be saved in the database, deleted from the database etc.. I have used MySQL database connections with the JDBC driver

I have used exe4j to make the .exe file and Setup Factory to make the exe file and setup file respectively. Once I make the setup and run the setup, the application works, ON MY COMPUTER. The computer which made the software. But once I take it to a computer in which MySQL was not installed, the setup installed, but the software did not work.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved