Felipe Walker

Ranch Hand
+ Follow
since Sep 23, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Felipe Walker

Thanks for your help and the links. They were very helpful.
18 years ago
Does anyone know how to make a java application flash in the taskbar without taking the focus. I want to have a java app flash in the taskbar when a certain event happens. I found an existing windows dll that will do the trick. I found info on using JNI but haven't found anything on using an existing windows dll. Hopefully there is a way without using JNI.
18 years ago
what does the rest of the code look like?
18 years ago
create another class that extends Thread and let that class do the work of loading the picture. The new thread does the work of loading your picture while the rest of the application keeps working on it own thread.
18 years ago
I need to write a file to a remote server, but I can not use RMI, or client server sockets. Any suggestions on how I would do that.
18 years ago
I am trying to run the outcall.java example and I keep getting the below error

javax.telephony.InvalidArgumentException
java.lang.NullPointerException
MyOutCallObserver.callChangedEvent
java.lang.NullPointerException

I have all the correct jar files and other files in my classpath. It complies with no problem but I just keep getting the above error. Below is the code.

import javax.telephony.*;
import javax.telephony.events.*;
//import MyOutCallObserver;


/*
* Places a telephone call from 476111 to 5551212
*/
public class Outcall {

public static final void main(String args[]) {

/*
* Create a provider by first obtaining the default implementation of
* JTAPI and then the default provider of that implementation.
*/
Provider myprovider = null;
try {
//JtapiPeer peer = JtapiPeerFactory.getJtapiPeer(null);
JtapiPeer peer = JtapiPeerFactory.getJtapiPeer("net.xtapi.XJtapiPeer");
//myprovider = peer.getProvider(null);
myprovider = peer.getProvider(null);
System.out.println("got provider");
} catch (Exception excp) {
System.out.println("Can't get Provider: " + excp.toString());
System.exit(0);
}

/*
* We need to get the appropriate objects associated with the
* originating side of the telephone call. We ask the Address for a list
* of Terminals on it and arbitrarily choose one.
*/

Address origaddr = null;
Terminal origterm = null;
try {

origaddr = myprovider.getAddress("0");
//Just get some Terminal on this Address
Terminal[] terminals = origaddr.getTerminals();

if (terminals == null) {
System.out.println("No Terminals on Address.");
System.exit(0);
}
origterm = terminals[0];

} catch (Exception excp) {
// Handle exceptions;
System.err.println( excp) ;
}

// Create the telephone call object and add an observer.
Call mycall = null;
try {
mycall = myprovider.createCall();
mycall.addObserver(new MyOutCallObserver());
} catch (Exception excp) {
// Handle exceptions
System.err.println(excp) ;
}

/*
* Place the telephone call.
*/

try {
Connection c[] = mycall.connect(origterm, origaddr, "6788939416");
} catch (Exception excp) {
System.out.println(excp.toString());
}

}

}
I wasn't sure which forum this went in so I posted it here. I have searched the web for about 2 days and there is very little information regarding xtapi errors. I have found several regarding the classpath issues which I corrected but not much else. Any help at all would be apprectiated
18 years ago
I have downloaded jars xtapi.jar, mstapisp.jar,comm.jar and I have win32com.dll
where do I need to have these files in order to run the examples that comes with them Outcall.java
18 years ago
I have downloaded jars xtapi.jar, mstapisp.jar,comm.jar and I have win32com.dll
where do I need to have these files in order to run the examples that comes with them Outcall.java
18 years ago
I meant the folder on my desktop is called java_telephony not java_api.
I run the command java Outcall from the simple directory
18 years ago
echo %classpath%
;C:\Program Files\Java\jdk1.5.0_04\lib;C:\Documents and Settings\Felipe Walker\D
esktop\java_telephony\jars\xtapi.jar;C:\Documents and Settings\Felipe Walker\Des
ktop\java_telephony\jars\mstapisp.jar;C:\Documents and Settings\Felipe Walker\De
sktop\java_telephony\jars\comm.jar

echo %java_home%
C:\Program Files\Java\jdk1.5.0_04\bin;C:\java_api\javamail-1.3.3ea\mail.jar;C:\j
ava_api\jaf-1.0.2\activation.jar;c:\java_api\javax

I have a folder on my desktop java_api. In that folder I have a folder that holds the jar files
comm.jar, xtapi.jar and mstapisp.jar. I then have another folder in the java_api folder called
simple that has the outcall and myoutcallobserver java and class files
18 years ago
I am trying to run Outcall.java I downloaded with xtapi and I keep getting the error

Exception in thread "main" java.lang.NoClassDefFoundError: javax/telephony/media
/MediaTerminalConnection
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at net.xtapi.XJtapiPeer.getProvider(XJtapiPeer.java:110)
at Outcall.main(Outcall.java:23)

I put the xtapi.jar, comm.jar and mstapisp.jar in the class path, I can compile but when I try to run the app, I get the above error.
18 years ago
I am trying to connect to a webserver that uses a proxy server.

Tried the code below but keep geting the server error 407
the substitute the0.0.0.0 with the server ip address and username assword for my username and password

url = new URL("http://0.0.0.0/test/" + filename);
URLConnection connection = url.openConnection();
String password = "username assword";
String encodedPassword = b64c.encode(password);
connection.setRequestProperty( "Proxy-Authorization", encodedPassword);


InputStream is = url.openStream();


BufferedReader br = new BufferedReader(new InputStreamReader(is));
while( (record=br.readLine()) != null ) {
System.out.println(record);
}
is.close();
}
I am trying to connect to a webserver and read a file. I am using a URLConnection and keep getting the error
java.net.ConnectException: Connection timed out:connect

any suggestions?

I am trying to connect to the file via vpn to my companys website on port 80
Thanks that was my problem did not realize I was pointing to a differnet version of java in my path.
18 years ago
I am trying to run rmic command on my server class and get the message

error: Invalid class file format in .\SBServer.class. The major.minor version '
49.0' is too recent for this tool to understand.
error: Class SBServer not found.
2 errors

I am running the command from the directory the class is in. Please help.
18 years ago