Sms Sending Using Sitesms In Desktop Application
Apr 20, 2015package javaanpr.gui.windows;
import java.net.*;
import java.io.*;
import java.util.Scanner;
[Code].....
package javaanpr.gui.windows;
import java.net.*;
import java.io.*;
import java.util.Scanner;
[Code].....
I have a project requirement, where I need a desktop java application to interact with web pages. I am currently working in java, so I decided to go with jsp and other java related web technologies. The project requirement is that, there is desktop java application and I need it to interact with web pages. I have zero idea about jsp, jsf etc. Is it possible to make my desktop app to interact with jsp or should I proceed with servlets. If I need to go with servlets, can the front end be designed as an attractive page?
View Replies View RelatedI have a web app using spring MVC + hibernate on the server side and jquery, ajax, javascript on the client side.
What I wish to do is to convert it into an exe file to make it standalone app.
Is there a software out there that can accomplish it? I don't want to recreate it from the scratch and I only know how to do web apps.
I want to develop desktop application with mysql . How to connect mysql . Any sample project or examples to learn .
View Replies View RelatedI try to create Java Swing Desktop application which show Road map of some area in JFrame. But pc not connected to internet it will be in LAN. Map should be like if we scroll the mouse we go down from height in map. Like zooming the area.
I try to find out by google i get lots of forum links but each showing me.
1. I have to do web application.
2. Google not support 'without internet' map facility.
3. I should use lots of jpgs which store in folder for showing map from various height so it look like when we see any map in Google Earth application.
I found goworldwind.org but not clear understanding right now.
The explanation is a bit lengthy because I just tried to explain everything in one shot.
Link to the question
java - Show a System Tray notification or Desktop notification from the web application
I have two programs that I'll post below, one is a Server and the other is a Client. The ChatServer runs once and many clients can run ChatClient from separate computers and talk together in their GUI's. The the client program comes with two buttons, one that's simulates the sending of a message to a single user ; "Send Message To User", and one that just generally sends a message ; "Send Message To All". Although now the Clients on the server seem to be able to selectively send messages to an individual by giving the recipient name, all the clients can see that message, which is not exact what I am aiming for. What I am going for is having the "Send Message To User" button click to send a message to the named user without all other users seeing the message.
The Server Program Code
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
[Code] ....
Now I have tried thing like having various input output streams and trying to connect those, but no luck. Tried fiddling with having the names arraylist directing the messages to one client versus all but that did not work out either. How I what I would need to do to go about doing this?
I got a requirement like to get Desktop Notifications using JEE ( In a web based application).For example, if someone logs into skype then it will show at the end (below part of the screen where system displays time)Is that possible to show popup on desktop through the webapplications? I'm using Tomcat (Web server ) for my web based applications.
I've researched for it and came to know about the JNLP (Java network layer protocal) file which is deployed into client system.JNLP is displaying a desktop notification but I'm not sure how far this can be useful.Is there any API to make it possible?
import javax.swing.*;
public class LoopFrame extends JFrame {
public LoopFrame() {
super("My loop Frames");
JDesktopPane desktop = new JDesktopPane(); //a specialized layered pane
JInternalFrame innerframe = new JInternalFrame("My loop Windows");
[Code] .....
I want to add 5 internal frames to a desktop panel it compiles but i get this error
//***********************************************err or******************************
this shows in the cmd when i run the program
Exception in thread "main" java.lang.IllegalArgumentException: illegal component
position
at java.awt.Container.addImpl(Container.java:1093)
at javax.swing.JLayeredPane.addImpl(JLayeredPane.java :230)
at javax.swing.JDesktopPane.addImpl(JDesktopPane.java :483)
at java.awt.Container.add(Container.java:410)
at LoopFrame.<init>(LoopFrame.java:27)
at LoopFrame.main(LoopFrame.java:44)
Press any key to continue . . .
************************************************** ***************************************
how do you get from launching some java code in eclipse to launching a java program from your desktop.Does one somehow wrap the code in C+ to make it a .exe? take for example Mine-Craft.Its build in Java however launches as a .exe.
View Replies View Relatedfor a project im doing i need to create a java app with an embedded database so that the datbase is part of the application instead of run on a server that the app talks to.
the problem im having is finding the documentation for this, ive found the following 2 tutorials that almost do what i need:
NetBeans Platform CRUD Application Tutorial Working with the Java DB (Derby) Database.
how i can accomplish embedding a database into a java app.
I have coded to create jPanel as image and save to desktop but the image is saved only in my src folder in My Documents. Here is my code-
public static BufferedImage getScreenShot(Component component){
BufferedImage image= new BufferedImage(component.getWidth(),component.getHeight(),BufferedImage.TYPE_INT_RGB);
component.paint(image.getGraphics());
[Code] ....
I am a student, who are doing a software project. The last step will be deploying the software as desktop exe for both windows and unix.
Question1 : my project has a folder structure like this:
+ Input file folder
+ configuration file folder
+ Output file folder
+ my project codes
So my class in project codes should have proper access to the other three folders(input,output,config). Then what can I do to feed the function a relative path?How would that looks like?
Question2:
Is that true, for windows and unix I have to write two versions of codes on system-dependant path?
When we place the mouse cursor over an desktop icon it will get highlighted. How can I achieve this through java swings?
View Replies View Relatedconvert or move standalone java thread application into Tomcat server container for accessing its JNDI services? Also is it possible to schedule this thread application in Tomcat server? is it possible to keep this app in tomcat as web application and schedule in window's scheduler.
View Replies View RelatedI have a server with a handful of php services. I communicate with these services by creating connections from java code. The services currently respond with XML, but that can be changed if an alternative way can improve performance.
One of the things I need to do is send varying sized payload (some large) to one of the services. My current plan is to create an xml file in java and perform a POST request with the XML as the payload. I am using an XML because the data is very structured.
From a performance point of view, would it be better to send the XML as a file or just as text? Also, is there a better way to send this data? These services will eventually be used by an android app, where performance and minimizing the size of the data packages will be extremely important.
I did this using ArrayList<String> and my tests worked. Meaning I was able to read the strings in a different class through my constructor. However I want to use a string array because it will be easier to handle when I finish the program. I will send each players poker hand in and figure out who is the winner instead of putting it all onto a ArrayList and having to iterate through it. However whenever I did my check I am just printing null.
PokerFile class
void separateHands(String cards) {
//ArrayList<String>playerOne = new ArrayList<String>();
//ArrayList<String>playerTwo = new ArrayList<String>();
String[] playerOne = new String[10];
String[] playerTwo = new String[10];
[Code] .....
ignore the boolean methods I was just building the structure of the program. The print file is what is outputting this:
null
null
null
null
null
null
public class WinningHand extends PokerFile {
//ArrayList<String> p1 = new ArrayList<String>();
//ArrayList<String> p2 = new ArrayList<String>();
String[] p1 = new String[6];
String[] p2 = new String[6];
WinningHand(String[] p1,String[] p2)
[Code] ....
New to SMSLib. I checked some samples and docs but did not get any ref/poc wherein I can send SMS with following set-up.
1. I want to send SMS from PC which is connected to internet in office network, where I am using proxy settings to connect to internet.(Basically office PC used in LAN environment)
2. I am not sure how to set the Modem settings in this scenario.
3. What i want - want to test SMS functionality in office environment and would like to send SMS to android based mobile using SMSLib library.
4. I have done SMSLib set-up on my PC and have all the required jars/dlls placed at proper location. So no issues related with set-up. Set-up is on windows platform.
5. I have written sample POC by referring some blogs/SMSLib docs. But as mentioned in points 1 and 2 above, am not getting how to write the code.
I am trying send email .So I have downloaded javaEE and javamail jar files and added buildpath.And wrote this code below .But I am getting this exception.
Exception in thread "main" java.lang.RuntimeException: javax.mail.AuthenticationFailedException: 534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbskV
534-5.7.14 ggcPi6MBZ4h8CCyCk2TG9EhiTGyE5MVBv7B3k7DsCldqjCuFvMTQG6aAbatrAWggH29muG
534-5.7.14 dzVh1kUYgMgNHAN558QRCnTjrNtUGv34Ul4pzUaansBuBfB0Kpz6_q7JTbrUuAmlZplouA
534-5.7.14 AHDXpFtuCkd-W17tHrZS5mqgVVxAcuKc-7TkhCDGShnfRBWU2R8v-gfvIQShszqsZmCl0i
[Code] .....
What am i missing here.
public static void main(String[] args) {
final String username = "mymail@gmail.com";
final String password = "mypass";
Properties props = new Properties();
props.put("mail.smtp.auth", "true");
[Code] .....
I am new to java (been Reading for 2 days now), and have almost no knowledge on programming (I am a Mechanical Engineer).The problem I have is that I have to upload 5,000 files to a web page (each one is name B001400XXXX.pdf in consecutive order).I have managed to access the web page and select a few form elements using watij, but I am having a hard time sending my pdf file to the server. This is what I have so far:
Java Code:
import org.watij.webspec.dsl.WebSpec;
public class NewClass {
public static void main(String[] args) {
[code]....
I need to send a byte array across a network. I know how to do this. (server->client)
byte[] myArray = new byte[]{0,1,2,3,4,5,6,7,8,9};
DataOutputStream.write(myArray);
... and I know how to receive it.
byte[] myArray = new byte[10];
DataInputStream.read(myArray);
When I send over one of these arrays, it ends up stopping storing values in the array when only about half the array is received, even though the array is sent from the server all at once. This results in the receiver's array, in this case, being something like {1,2,3,4,0,0,0,0,0,0}.
I can easily solve this - and already have - by simply adding a loop onto it and waiting for the bytes to all be received, as the method returns the amount of bytes actually read.
byte[] myArray = new byte[10];
int bytesRead = 0;
while( bytesRead < myArray.length) {
bytesRead += DataInputStream.read( myArray, bytesRead, myArray.length - bytesRead );
}
I am simply wondering if there is a better solution to this, as the current solution isn't that elegant. Did I do something wrong to cause only a part of the array to be sent first? Would it be better to use DataInputStream.readByte() to read off the bytes one by one rather than an array at once, and then store them in an array afterward? Would this cause a performance decrease as each byte is read individually? (I'm sending an array of several million bytes)
I want to send email from my jsp file .. And I have a html code which contains form and inputs. How can I send the email? And I am using netbeans ..
View Replies View RelatedSay I was to make a computer game, the first person to play the game would have a joinable game and would then be the server, and anyone joining in would be the client and the server was updated with JSON data of the clients computer game, and the server would then update each client of each characters new data using JSON, I would need fast multi threaded connection handling with minimum overhead, Is there a specific way to do this? or are there many?
I have realized there are a few ways to send and receive data using UDP and while experimenting I have also found its quite hard to synchronise.
Do I have a connection listening until there is data to be sent and then switched back to listening?
Do I have the server listening for a microsecond and then checking to see of there's anything to send for a microsecond continuously?
Do I have multiple connections for sending and receiving
Do I create new connections for each new and individual packets to be sent and received dynamically on a thread?
What is the optimum most effective way and do my examples reflect much understanding at all? my resent attempts create new problems and rather than re invent the wheel I would like to know what is normally done.
Java code to send sms through gsm modem using AT commands..
View Replies View RelatedI have a simple class, called InputManager, which has methods that communicate with another class DatabaseManager which has access to Database which is actually object that contains information about actual database.
My JFrame has Navigation class (extends JPanel). There I put all needed JButtons, JLists and so on.. This class has instance of InputManager and when user interacts with GUI components inside of it, Navigation calls InputManager methods, it then analyses the call and calls needed methods on DeviceManager, which then sends queries to Database and etc.
The problem is, that at the beginning (when user runs a program), I want to get information (which is actually values for my GUI components ) from Database. It could, for example, create another DatabaseManager and connect to the Database to get information, but it is okay to have two objects?
I was also thinking about sending same DatabaseManager object through InputManager to Navigation, but it seems strange for me to have two objects, which can interact with each other in both directions(Class A has instance of Class B, and Class B has instance of Class A). Is there anything bad this can do?
Also what I noticed that it seems odd that GUI class would have to get information from database. (Logic in GUI class).
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?