473,785 Members | 2,446 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

access denied (java.net.Socke tPermission

When I run the code below as an applet I get this message:
Hello java

there was a problem

access denied (java.net.Socke tPermission yahoo.com resolve)

But when I take the same code for reading the url as an application it
works.

What do I need to do???

............
import java.net.*;
import java.io.*;

import java.applet.App let;
import java.awt.Graphi cs;

public class HelloWorld extends Applet {
public void paint(Graphics g) {
g.drawString("H ello world!", 50, 25);
System.out.prin tln("hello java");
try{

URL url = new URL("http://yahoo.com");
URLConnection connection = url.openConnect ion();

PrintWriter out = new PrintWriter(
connection.getO utputStream());
out.println("st ring=stringToRe verse");
out.close();

BufferedReader in = new BufferedReader(
new InputStreamRead er(
connection.getI nputStream()));
String inputLine;

while ((inputLine = in.readLine()) != null)
System.out.prin tln(inputLine);

in.close();

}
catch ( Exception e)
{
System.out.prin tln("there was a problem");
System.out.prin tln(e.getMessag e());
}
}
}
...............

Jul 17 '05 #1
2 12482
You have to sign your applet.
Jul 17 '05 #2
Maj0r wrote:
You have to sign your applet.


How do you do that?

Do you have any urls that explain that?

thanks.

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5429
by: Lorenzo | last post by:
hi you all, first of all apologies for having cross-posted this message but really i did not know where to post it. please let me know what ng you consider the most suitable for the described issue. i wrote a program made by a client and a server that communicate via RMI premise 1) everything has been developed and executed on WinXP Professional and the following jre
0
2403
by: Mark | last post by:
Using a Java program, I can connect to the test database in MySQL. The test database is installed using a MySQL utility, and it can be accessed by any user without supplying a password. The relevant lines in my Java (Java version 1.4.1) code are: Connection con = null; String url = "jdbc:mysql:///test"; // <== no user or password specified con = DriverManager.getConnection(url); However, when I try to connect to the accounting...
1
5590
by: Darren Lew | last post by:
Hi there, I have this problem which is really driving me nuts for a couple of days. Glad if any help or suggestion is given Javascript will give me a pop-up error "Access is denied" when i try to load a simple xml file, which is in the server machine itself. The script is within a JSP page running apache tom-cat. I am running it with IE6 from an windows administrative acc straight on the server so there shouldn't be any access prob.
0
3539
by: ASP.Confused | last post by:
The old message looked a little stale, so I am re-posting it here. Anybody have any ideas of what I could do?!? The previous responses to this question are below. If you want to look at the original question, the subject line is: ADODB.NET and "Access Denied" I have an ASP.NET page writtein in VB that uses ADODB. I just had to
3
1903
by: Rachel | last post by:
Hi, I am using the data access application block successfully in our development environment, however when I deploy to our testing server as Private Assemblies I keep getting the following Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
1
2636
by: Scott Yen | last post by:
Hi, I'm using the following Axis java client to invoke a .Net web service hosted my localhost. Although the username and password is set on the "call", client gets (401) Access Denied" exception. private static void testTest() { try { String endpoint = "http://localhost/WebService1/Service1.asmx"; String method = "Test";
1
6653
by: Smoothj | last post by:
Hello all, when connecting to an IRC server with my java applet some of my members get this error code. java.security.AccessControlException : access denied (java.net.SocketPermission irc.xxx.xxx resolve) What can I do to solve this? Regards,
8
28600
by: ajos | last post by:
hi frnds, im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no driver found exception. to verify this error ive made a simple database in jsp(just to check if my mysql is working smoothly otherwise) which access' the username.....but in the process im getting a error--> java.sql.SQLException: Access denied for user ''@'localhost' (using password: NO) i have...
1
2009
by: noopurtiwari | last post by:
Can anybody please explain me what exactly happens when i add the line permission java.net.SocketPermission "localhost:1024-","listen";in the java.policy file of my jre installation. Thanks in advance Noopur
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9491
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10104
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9959
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7510
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.