| JAVA RMI register problem |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- 1
- RMI firewall issuesim doing an assignment on 'rmi client callbacks' in college and am
having difficulty with the windows firewall here. when i try and run
the server i get the following error msg:
Exception in thread "main" java.security.AccessControlException: access
denied (
java.net.SocketPermission 157.190.187.162:10005 connect,resolve)
at java.security.AccessControlContext.checkPermission(Unknown
Source)
at java.security.AccessController.checkPermission(Unknown
Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkConnect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown S
ource)
at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown S
ource)
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown
Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown
Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Unknown Source)
at RMIServer.main(RMIServer.java:46)
iv been told i have to do something with a policy file and tried but
still doesn't seem to help. im not even sure if im duin it right.
any advice appreciated.
- 1
- Access insert into problemI'm just trying to get started with servlets and JDBC and I am using
MS Access 2000 as the database. The last record is not being added!
Specifically this line does not seem to be added "INSERT INTO
testTable2 VALUES(333, 'name3')", only the first two records are
added. If I add in more records, again only the last is not added.
Please note that in the java code the println statement comes after
the insert into statement and the println statement is showing up on
screen, so I know that the insert into statement is being run. Can
somebody suggest some reason why this is not working? Thanks.
To keep this a little bit shorter, I will paste only the necessary
part, skipping the error handling section.
import java.sql.*;
public class BuildTables {
public static void main(String[] args) {
try {
String username = "guest";
String password = "guest";
String url = "jdbcdbc:db2";
String driver = "sun.jdbc.odbc.JdbcOdbcDriver";
String[] SQLStatements = {
"CREATE TABLE testTable2 (Num INT NOT NULL PRIMARY KEY, name
CHAR(20))",
"INSERT INTO testTable2 VALUES(111, 'name1')",
"INSERT INTO testTable2 VALUES(222, 'name2')",
"INSERT INTO testTable2 VALUES(333, 'name3')"
};
Class.forName(driver);
Connection conn = DriverManager.getConnection(url, username,
password);
Statement stmt = conn.createStatement();
for(int i = 0; i < SQLStatements.length; i++) {
stmt.executeUpdate(SQLStatements[i]);
System.out.println(SQLStatements[i]);
}
}
- 1
- The Best Super Vaigra d2
Introducing E-rectiion Pills "Caillis Softabs"
which guarantees long lasting pleasures.
Safe to take without any side-effect.
Satisfaction guuaranteeess...
or your money back without question ask.
http://in.geocities.com/vanni45848hollyanne62088/
T8TmA
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 1
- getconnection is making me so angryHi-
In the code below the forName method works but i cant get getConnection
to compile without errors. I have tried everything except standing on
my head.
if i create a new server in mysql control center i can connect with
super user privlileges with root and no password.
any ideas why getConnection is zapping me like some 3rd evil force?
thank you,
jim
import java.sql.*;
public class testConnection {
static final String JDBC_DRIVER ="com.mysql.jdbc.Driver";
static final String DATABASE_URL="jdbc:mysql://localhost/test";
public static void main(String args[]) {
Connection con=null;
Statement stmt=null;
System.out.println("what in the world am i doing wrong?");
String query="Select password('boogity bop')";
try {
Class.forName(JDBC_DRIVER);
con = DriverManager.getConnection(DATABASE_URL,"root","");
- 3
- Some ANT questionsI have some ANT questions. Please answer them.
1) I want to set a property's value to an environment variable's value. I
have been able to do that :
<property environment="env"/>
<property name="java.home.dir" value="${env.JAVA_HOME}"/>
Now if this environment variable is not set then i want to manually set my
property's value. How can I do that?
2) What is the difference between <classpath> and <path> tags?
3) What is <pathemelement> tag for?
Thanks
- 6
- Opinions on complexityI am thinking of developing a network application for my PhD, and it
involves (among other stuff) my own implementation of the TCP/IP
protocols. So, at the state the Java 1.5 version is, I need the use of
JNI for the RAW sockets. (Although the use of Java is not a MUST, I am
more experienced at it than I am at C/C++ or other useful programming
language.)
By now, I've managed to almost-implement the Ping: I send the
appropiate ICMP Echo Request to 127.0.0.1 (with its well-formed IP
header, ICMP header and data, based on the RFCs), but I still don't
"hear" the ICMP Echo Reply from my application, (although I can see
this ICMP Echo Reply going back when I capture the network traffic of
my loopback interface with Ethereal). But it's not the point of my
entry in this group to find a solution on this (it must be something
odd in the C native code I have to fix).
The thing is that, although I find this project feasible, I don't
really know how complex may it become (I am sure the TCP/IP stack is
not a trivial thing) and, unfortunately, I cannot spend as much time as
I would like on this (you sure know how it works: I've got a job from 8
to 17:30, which is not bad at all, but it doesn't let me too much spare
time).
So here goes my question: do you think it is a feasible project for
developing it on my own in a reasonable time?, do you recommend me
"opening" it on sourceforge or something like that, and share it with
other thinking heads?, are you one of those thinking heads :) ?.
Thanks in advance for your comments,
_Hobbes.
____________________________
"I must've put my finger on it." - Calvin
- 8
- Java, IPv6 and IPv4Envirounment: FreeBSD >=5.3 (earler FreeBSD I don't test), SUN Jdk 1.4 and 1.5
Exampe compilation for 1.4:
cd ${PORTSDIR}/java/jdk14 && make install -DWITH_LINUX_BOOTSTRAP -DMINIMAL -DWITH_IPV6
Exampe compilation for 1.5:
cd ${PORTSDIR}/java/jdk15 && make install -DWITHOUT_WEB -DWITH_IPV6
Problem:
If I don't enable WITH_IPV6, IPv6 cannot be accessed from Java programs, but I have to use the IPv6 & IPv4 in my network.
If IPv6 enabled in Java, I cannot connect to any IPv4 address even I set the system property `java.net.preferIPv4Stack=true'.
This is not good, because not all applications start allow add to java's arguments and/or envirounment this one (for example, Opera browser).
What I want to see:
When I enable IPv6, I can connect to IPv4 addresses
Wish:
add ability to autoload system properties, specific for my box (for example, from ${LOCALBASE}/etc/java.properties)
--
Best regards,
Arseny Nasokin
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 10
- cryptix / Websphere issueI'm using the Cryptix library (current version) on WAS 5.0
Everything works fine until I try to update the ear.
This is the error:
java.security.InvalidKeyException: Not an ElGamalKey
[2/14/05 14:25:43:609 CST] 5d491a6 SystemErr R at
cryptix.jce.provider.elgamal.ElGamalCipher.engineInit(ElGamalCipher.java:134)
[2/14/05 14:25:43:610 CST] 5d491a6 SystemErr R at
javax.crypto.Cipher.init(Unknown Source)
[2/14/05 14:25:43:610 CST] 5d491a6 SystemErr R at
cryptix.openpgp.algorithm.PGPElGamal.encrypt(PGPElGamal.java:536)
[2/14/05 14:25:43:610 CST] 5d491a6 SystemErr R at
cryptix.openpgp.packet.PGPPublicKeyEncryptedSessionKeyPacket.encrypt(PGPPublicKeyEncryptedSessionKeyPacket.java:153)
[2/14/05 14:25:43:610 CST] 5d491a6 SystemErr R at
cryptix.openpgp.provider.PGPEncryptedMessageBuilder.engineBuild(PGPEncryptedMessageBuilder.java:278)
[2/14/05 14:25:43:610 CST] 5d491a6 SystemErr R at
cryptix.message.EncryptedMessageBuilder.build(EncryptedMessageBuilder.java:253)
[2/14/05 14:25:43:610 CST] 5d491a6 SystemErr R at
com.eonegroup.custom.mayco.util.QbMaycoPGPEncryptor.encrypt(QbMaycoPGPEncryptor.java:158)
If I stop/restart the application server, everything is fine. Just
happens on .ear updates!
Any suggestions?
Thank you.
- 11
- J-Integra Espresso (Java .NET CORBA interoperability)Intrinsyc Software is proud to announce the latest addition to its
popular J-Integra Interoperability Suite... J-Integra Espresso!
J-Integra Espresso is a true CORBA solution for the Microsoft .NET
framework. This Object Request Broker (ORB) has been written in C# and
connects Java and CORBA with the .NET world. J-Integra Espresso has
been developed entirely as managed code and can therefore be accessed
by all .NET languages (C#, ASP.NET, etc...).
J-Integra Espresso features:
* Pure .NET implementation, 100% managed code
* Bi-directional: .NET to Java/CORBA and Java/CORBA to .NET
* Enables interoperability with any J2EE or CORBA infrastructure that
is IIOP-compliant such as VisiBroker, Orbix, JacORB, JBoss, WebLogic,
and WebSphere
* Support for IIOP transport protocols including SSL and TLS over IIOP
(SSLIOP)
* Marshalling objects by reference or by value
* One-sided deployment (no touch on J2EE AppServer)
For a free evaluation, visit our website at
http://j-integra.intrinsyc.com/
Regards,
Shane Sauer
Intrinsyc Software International, Inc.
J-Integra Interoperability Solutions
http://j-integra.intrinsyc.com/
When Web Services are not enough
- 11
- Disabling Web StartI installed the latest JRE (J2SE 5.0 JRE) on a Windows host yesterday.
After installation, the host listens on several new ports. The listener
seems to be related to Java Web Start.
I don't need Java Web Start (just want a working JVM); I want a
host which listens to as few ports as possible on external interfaces.
(And no: I don't want to firewall - I consider it more secure and less
resource consuming to remove unneeded listeners.)
I've tried finding a way to stop Web Start through the Java entry in
Windows' control panel, but with no luck.
It seems that Web Start was once something that could be selectively
(un)installed, but that it isn't optional any more(?)
How do I uninstall Web Start from a modern JRE installation? If not
possible: How do I turn off Web Start? If not possible, either: How do
I make Web Start listen on 127.0.0.1 only?
--
Greetings from Troels Arvin, Copenhagen, Denmark
- 14
- textfield validationi am trying to write a GUI and need to enter a number into a textfield.
i have used the following code that works if an integer is entered but
if not i get an error.
TextField nEntryCON;
>int n = Integer.parseInt(nEntryCON.getText());
any help would be good.
- 15
- javaws using a dllI have a small java application that reads the registry through the use
of a .dll. I am packaging this app in a jar and then deploying it via
java web start. When I run things locally, I have no problems, but when
I deploy it through javaws, I get errors about accessing methods within
the .dll. Is there any trick to creating a jar with the dll for
deployment via javaws.
Thanks
- 15
- java 3d pickingHi,
I have a very simple 3D-app with a couple of cubes in the scene which I
want to pick. I dont want to rotate, translate or scale them, I just
want to pick one of them and know which one was picked. (It's for a
battleship-like game, just want to choose a cube to know at which one to
"shoot" at.)
Could anyone suggest me a solution to the problem? All I want is to know
which object was picked. That's all. Hope someone can help, this work
has to be done really soon ..
thx for your kind help,
Angus
- 16
- getByName() and getAllByName(0getAllByName(String host) and getByName(String host) of the InetAddress
class return an array and a record respectively.
both does the same thing i presume and only differs in the return type.
therefore, which record does the getByName(..) return? the first, last,
random record?
|
| Author |
Message |
Marzena

|
Posted: 2008-3-29 23:26:00 |
Top |
java-programmer, JAVA RMI register problem
Hi
Im making aplication with Java RMI ... everything was working till
yesterday. Today i started to run server and i cant make it :( (once
per 20 times it works)
The way i registering serwer is (im doing this from the folder where i
have my server class and java files + stub ):
start rmiregistry
java -Djava.security.policy=test.policy serwer
Sometimes it works ,sometimes not,espescially when i m starting to run
second diffrent process(serwer)
i got this error:
D:\workspace\serwer2>rmiregistry
java.rmi.server.ExportException: Port already in use: 1099; nested
exception is:
java.net.BindException: Address already in use: JVM_Bind
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:
310)
at
sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:218
)
at
sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:393)
at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:129)
at
sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:19
0)
at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:92)
at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:78)
at sun.rmi.registry.RegistryImpl.main(RegistryImpl.java:322)
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.<init>(ServerSocket.java:185)
at java.net.ServerSocket.<init>(ServerSocket.java:97)
at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMI
DirectSocketFactory.java:27)
at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMI
MasterSocketFactory.java:333)
at
sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:64
9)
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:
299)
... 7 more
D:\workspace\serwer2>java -Djava.security.policy=test2.policy server
Liczba aktywnych watkow: 1
nazwa watku: main
Usluga druga niezarejestrowana: RemoteException occurred in server
thread; neste
d exception is:
java.rmi.UnmarshalException: error unmarshalling arguments;
nested excep
tion is:
java.lang.ClassNotFoundException: server_Stub
I didnt change anything in my source code...nothing...it just started
doing like this. Lately i was able to run two server process...and
everything was ok.... i was looking for a tip in google...but nothing
help...anybody knows how to fix it?
Tnx .
|
| |
|
| |
 |
Roedy Green

|
Posted: 2008-3-30 15:24:00 |
Top |
java-programmer >> JAVA RMI register problem
On Sat, 29 Mar 2008 08:25:44 -0700 (PDT), Marzena
<email***@***.com> wrote, quoted or indirectly quoted someone
who said :
>Port already in use: 1099
maybe some other app is also using that port. Seems to me there is a
way to configure a different RMI port, or see if you can see what
other app is using 1099 and move it.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
|
| |
|
| |
 |
EJP

|
Posted: 2008-3-31 8:32:00 |
Top |
java-programmer >> JAVA RMI register problem
Marzena wrote:
> D:\workspace\serwer2>rmiregistry
> java.rmi.server.ExportException: Port already in use: 1099; nested
> exception is:
>
> java.net.BindException: Address already in use: JVM_Bind
Most probably the registry is already running. netstat will tell you.
|
| |
|
| |
 |
Marzena

|
Posted: 2008-4-2 1:29:00 |
Top |
java-programmer >> JAVA RMI register problem
No other app is using the same port as rmiregistry... i checked it...
i mean when i want to register one object its working
i run rmiregistry (start rmiregistry)
and run the serwer (java -Djava.security.policy=test.policy serwer)
then i open next command line and doing the same with second object
start rmiregistry
java -Djava.security.policy=test2.policy server
rmiregistry gave me the error that i pasted before
and mine second method (server) doesnt register :|
im confused cause it was working before ...and stopped...i didnt
change the code...
the code which i use in the app server & serwer is :
if (System.getSecurityManager() == null)
System.setSecurityManager(new RMISecurityManager());
try {
serwer obj = new serwer();
Naming.rebind("pomiar", obj);
System.out.println("Usluga zarejestrowana");
} catch (Exception e) {
System.out.println("Usluga niezarejestrowana: " +
e.getMessage());
}
I would be greatfull for any tip :(
|
| |
|
| |
 |
EJP

|
Posted: 2008-4-2 8:32:00 |
Top |
java-programmer >> JAVA RMI register problem
Marzena wrote:
> No other app is using the same port as rmiregistry... i checked it...
On the contrary. *Something* is using it. When you get an error saying
'Port already in use: 1099', it means that port 1099 is already in use.
So how did you check it? Run netstat -an and you'll see that TCP port
1099 is already listening.
As I said before, I suspect you already have the RMI Registry running
and you are trying to start another one. In which case you don't really
have a problem, just ignore the error on the second one.
|
| |
|
| |
 |
Marzena

|
Posted: 2008-4-5 0:50:00 |
Top |
java-programmer >> JAVA RMI register problem
Ok i fixed the problem... every server RMI need to be bound in rmi
registry running at diffrent port
it is working when i changed it... but i still dont know how did it
work before,when i was doing everything
in one rmiregistry port...anyway thanks for answer :-))
|
| |
|
| |
 |
EJP

|
Posted: 2008-4-6 18:55:00 |
Top |
java-programmer >> JAVA RMI register problem
Marzena wrote:
> Ok i fixed the problem... every server RMI need to be bound in rmi
> registry running at diffrent port
Why? Why can't you have one RMI Registry for the entire application?
> it is working when i changed it... but i still dont know how did it
> work before,when i was doing everything
> in one rmiregistry port...anyway thanks for answer :-))
Why shouldn't that work?
Your problem seems to be that you want to start a new RMI Registry per
server. You don't have to do that. You only need one per server host.
|
| |
|
| |
 |
Nigel Wade

|
Posted: 2008-4-7 16:34:00 |
Top |
java-programmer >> JAVA RMI register problem
Marzena wrote:
> Ok i fixed the problem... every server RMI need to be bound in rmi
> registry running at diffrent port
Hmm, no it doesn't. The only reason you would require more than one port is if
you have more than one RMI registry. Every RMI server needs to be bound to a
RMI registry, but that registry does not need a different port for each RMI
server. In fact that would defeat the entire purpose of the RMI registry.
The RMI registry is a "global" repository for multiple servers. The point is
that a client only has to make a request to one RMI registry for any particular
service. There really should be only one rmiregistry on each host, unless there
are exceptional circumstances.
--
Nigel Wade
|
| |
|
| |
 |
Marzena

|
Posted: 2008-4-8 1:24:00 |
Top |
java-programmer >> JAVA RMI register problem
I thought the same... but look at my code. Im checking if there is any
rmiregistry if yes i wanna use it...but it doesnt work,i got exception
that smth is already using the port and i cant connect...it was
working before,right now no :( so i used 3 ports to every
application :/
if (System.getSecurityManager() == null)
System.setSecurityManager(
new java.rmi.RMISecurityManager());
java.rmi.registry.Registry reg = null;
try {
reg = java.rmi.registry.LocateRegistry.createRegistry(1099);
System.out.println("Utworzone nowe registry na porcie 1099.");
} catch (Exception e) {
System.out.println("Nie powiodlo sie utworzenie registry.");
System.out.println("Skorzystam z istniejacego.");
}
if (reg == null) {
try {
reg = java.rmi.registry.LocateRegistry.getRegistry();
System.out.println("Skorzystalam z zarejestrowanego registry");
} catch (Exception e) {
System.out.println("Nie moge skorzystac z istniejacego
registry.");
System.exit(0);
}
}
try {
serwer obj = new serwer();
reg.rebind("pomiar", obj);
System.out.println("Us硊ga zarejestrowana.");
}
catch (Exception e) {
e.printStackTrace();
}
|
| |
|
| |
 |
EJP

|
Posted: 2008-4-8 7:00:00 |
Top |
java-programmer >> JAVA RMI register problem
Marzena wrote:
> System.out.println("Nie moge skorzystac z istniejacego registry.");
Are you saying that you always get this displayed?
|
| |
|
| |
 |
Nigel Wade

|
Posted: 2008-4-8 17:41:00 |
Top |
java-programmer >> JAVA RMI register problem
Marzena wrote:
> I thought the same... but look at my code. Im checking if there is any
> rmiregistry if yes i wanna use it...
You attempt to create a registry first. That will always fail on the second and
subsequent attempts because there is already another registry running on that
port.
You should attempt locate a registry first, and if that fails because there is
none, then create one.
> but it doesnt work,i got exception
> that smth is already using the port and i cant connect...
Your error messages are not in English, so I've no idea what exception you are
actually throwing. You also catch the blanket Exception and don't ever report
what the actual Exception is, or the message it returns, so how can you say
that it reports that something is already using the port? That may be what
*you* are writing to System.out, but it may not bear any relation to the actual
situation. What you need to do is output the actual Exception message and see
what's really going on.
> it was
> working before,right now no :( so i used 3 ports to every
> application :/
>
>
> if (System.getSecurityManager() == null)
> System.setSecurityManager(
> new java.rmi.RMISecurityManager());
>
> java.rmi.registry.Registry reg = null;
> try {
> reg = java.rmi.registry.LocateRegistry.createRegistry(1099);
> System.out.println("Utworzone nowe registry na porcie 1099.");
> } catch (Exception e) {
> System.out.println("Nie powiodlo sie utworzenie registry.");
> System.out.println("Skorzystam z istniejacego.");
> }
> if (reg == null) {
> try {
> reg = java.rmi.registry.LocateRegistry.getRegistry();
> System.out.println("Skorzystalam z zarejestrowanego registry");
> } catch (Exception e) {
> System.out.println("Nie moge skorzystac z istniejacego
> registry.");
> System.exit(0);
> }
> }
> try {
> serwer obj = new serwer();
> reg.rebind("pomiar", obj);
> System.out.println("Us艂uga zarejestrowana.");
> }
> catch (Exception e) {
> e.printStackTrace();
> }
--
Nigel Wade
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- open source poker codeHi,
Bit of a long shot I imagine, but has anyone tried to use:
http://sourceforge.net/projects/pokersource/
They promise some sort of java wrapper in the readme, but all I have
found is c code.
I guess there's a chance to use JNI to call the c stuff but I suffer
from a very rare and extreme form of laziness that prevents this (and I
can't understand the code!).
cheers
Andy
- 2
- 3
- VM -> secure Web Memory, Patent 863I'm releasing to Open Source an e-commerce local memory technique that
could reduce web congestion. A web-based operating system might be
possible. I am releasing this application also to Open Source.
To protect bandwidth for this technique, I applied for and received US
Patent 6,636,863 - the claims of this patent will be interesting to the
Open Source community.
Information:
http://209.87.142.42/webmemory/
Background:
* I originally published in June of 2000 on javaboutique
(http://javaboutique:internet.com/articles/shoppingcart/index.html) and
released the code for an e-commerce front end as Open Source.
* The article was mirrored on Linux Today
(http://linuxtoday.com/news/2000070200204OSSW).
* On Oct. 21, 2003, after a lengthy process including a quality review
by a number of patent examiners, I was granted US Patent 6,636,863
based on this work (to read the text, go to
http://patft.uspto.gov/netahtml/srchnum.htm and input the patent
number).
* Web Memory is secure, client-based, user-specific memory, based in
the JAVA VM present in computers, cell phones, Palm Pilots and chips.
It works in dotNET as well. The bandwidth for this technique has been
protected by patent. Is the method useful to the Open Source community?
Lane Friesen
e-mail: lanefriesen (at) hotmail.com
- 4
- how to get the content from an URL?Hi people,
I have write some code that outputs the content of an URL in
System.out,
which is really trivial using the following code:
URL url=new URL("http://www.some-url.com");
URLConnection c=url.openConnection();
BufferedReader is=new BufferedReader(new
InputStreamReader(c.getInputStream()));
String line;
while ((line=is.readLine())!=null) {
System.out.println("line: "+line);
}
But, some URLs have javascript code embedded that redirects the page
or refills
it in some way when it's automatically run by the browser. I want to
have the HTML code after executing that javascript code, exactly as
you can get it from your internet browser's "view source-code", not as
I'am getting it by now.
The cuestion is...
there is ANY workaround to this issue? some way to run javascripted
pages from
java? some way to deliver it to a web browser, or something nicer?
thanks to everyone,
hernan rancati, cesare.
- 5
- steganography using javaHi all,
I am actually new to this steganography thing.So I want to know if
there are any built-in methods and classes to handle stego in
Java.Also,I will very much appreciate if any of you have a sample code
or tutorial link.
Thanks all,
Anindya
- 6
- 7
- Seaching word in text file using JAVA.Hello,
I have a problem on seaching word in text file using JAVA.
Below are the sample code i have written for searching word honda,
1990 and imran.I also want to save word honda in static string name
classtring. For first line i use this java code to save word honda in
classtring and its working well. I have a problem to save second line
1990 and imran.
The technique i use is searching until "=" and save word after "=".Can
anyone give the idea and java code.
Thank you...
------------java code ------------------
content = f.readLine();
// find class name
StringTokenizer s = new StringTokenizer (content,"=");
while (s.hasMoreTokens())
{
String string_val = s.nextToken();
if (string_val.trim().equals("classname".trim()))
{
classString=s.nextToken();
}
}
------- data text file -------------
name_car = honda
year = 1990
owner = imran
- 8
- USB support for Java (Win32)Does anybody know any win32 usb library for java that I can use to
communicate with device. Application will communicate with device
using USB in the same way as RS232 - for control and management.
Thanks,
Dimitry
- 9
- Got my Java console application finishedI finished my Java console application and it works
great in Windows and Linux. The problem right now is testing
it in Mac. I only have an old Mac Performa with OS8, and my Mac isn't reading
it right. Anyone know how to use a Java console program in pre-OSX Macs?
When I double click on the jar file it launches an editor now, does anyone know
how to launch it as a console application? I have the
Java Runtime Engine installed.
I believe want to associate the jar files with the Java Runtime Engine in
OS8...does anyone know how to do that with a Mac?
- 10
- Save gif file from the URLHello,
I just want to save on disc a gif file taken from the internet (i.e.
save as logo.gif the image
http://www.google.com/intl/us_ALL/images/logo.gif ). Is it possible
without much effort (I have read about the extra & not free libraries
but I hope there is a simple way to do so (just read bytes and write
bytes - no modification).
Regards. Marko
- 11
- On Java and C++On 28 Apr 2006 00:59:19 -0700, "al pacino" <email***@***.com>
wrote, quoted or indirectly quoted someone who said :
>improve your programming skills and what better tool to do that than
>using c++.
You might find the work of W. Edwards Deming interesting. He was the
man who taught the art of quality control to the Japanese.
He argues there is no point in exhorting people to be better. You
have to change the environment so they naturally and without
additional effort produce better results.
C++ allows well made programs but does little to insist on or even
encourage them. The beautiful quality remains a theoretical goal
rarely achieved. It is a bit like an impressive high wire act.
You can see the effect. If you look over C++ code you will see a huge
range of quality. If you look at Java code it is much more uniform.
The artisan in you yearns for the sporadic brilliance, but the manager
prefers the uniformity.
As a programmer you see the effect. In Java, a higher percentage of
trouble is caught at compile time. Once you have the compiler happy,
usually the code works. Because of the null pointer checks, enforced
initialisation and subscript checks, if a program works at all there
is a higher probability it is working correctly than the equivalent
C++ program. That means a poor programmer who writes buggy code has a
bigger safety net with Java to watch over him to catch these errors.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
- 12
- Paint methodI'm still new to Java, so this may be a pretty pathetic question.
Anyway, I have a paint method in an applet that paints something and
then when a certain button is pushed it needs to draw more (rectangles
and strings to be precise). However, the paint method is above, and
the scope of 'g' does not extend into the actionPerformed method. Can
'Graphics g' be declared outside the paint method, and if not is there
a way to make it work, while rewriting as little as possible?
- 13
- 14
- [Java-Printer]My printers are not senn by java appsThis problem apparently has nothing todo with Java applications : I am on
Linux and apparently now any Java apps run do not see my printer list as
handled by CUPS.
Before it worked ; I think it has to do with the JDK installed ?
Any ideas will be wellcome.
Thanks.
- 15
- Core Java ( JAVA 2.0), J2EE, XML, Swing,XSL Opening in Chennai 3+YearsHi All,
We are looking Software Engineer for my MNC Client in
chennai.. L&T info, HCL, Virtusa, EDS
Skill: Core Java ( JAVA 2.0), J2EE, XML, Swing,XSL
Exp 3 to 6 Years
Work Location: Chennai
>> SE, TL, PL openings
If you are looking for a good opening Please send the
resume to email***@***.com
Please send me the following information for a faster
Processing
Name:
Contact NO:
Cell:
Landline:
Current company:
Current Location:
Current Salary:
Expected Salary:
Notice Period with Present Employer:
Total IT Experience:
Relevant Experience:
Key Skills:
Domain Worked:
Are you willing to relocate to chennai
Regards
Latha HR Solutions
Chennai
|
|
|