Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Java Proxy problem

Java Proxy problem
Thread Tools
Fresh-Faced Recruit
Join Date: Nov 2000
Location: Denton, TX U.S.A
Status: Offline
Reply With Quote
Mar 11, 2002, 09:46 AM
 
Hello,
I am developing an application / applet for OS X 10.1.3 with the java update.

At home:
It runs both ways on my pc. It also runs fine at home from my mac.

At work:
When I bring my laptop into work, I cannot get it to run.
I can ping the server from my mac.
When I try to run, I get a FileNotFoundException.
The only real difference is that I have to go through a proxy.

I have read the Java site which states:
<font color = blue>
To go through your proxy server use this piece of code in your servlet:
Properties prop = System.getProperties();
prop.put("http.proxyHost","your-proxy-host");
prop.put("http.proxyPort","proxy-port");
Then use URLConnection or HttpURLConnection.
</font>

This did not seems to work? Has anyone had success at connecting through a proxy? Any help/ideas would be really appreciated.

If I can show this works, I may be able to get my company to open up it services beyond it's current pc ONLY base.

Right now we tell our few people who use macs (100 out of thousands) to run virtual PC, install Java, then run our application.

Jeff
     
Junior Member
Join Date: Feb 2002
Location: Atlanta
Status: Offline
Reply With Quote
Mar 15, 2002, 07:29 PM
 
Jeff,

If you're still looking for an answer to this, here's what works for me:

<BLOCKQUOTE><font size="1"face="Geneva, Verdana, Arial">code:</font><HR><pre><font size=1 face=courier>
...
prop.put(<font color = red>"firewallHost"</font>,<font color = red>"my-proxy-host-name"</font>);
prop.put(<font color = red>"firewallPort"</font>,<font color = red>"my-proxy-port-number"</font>);
prop.put(<font color = red>"firewallSet"</font>,<font color = red>"true"</font>);
...
</font>[/code]

Hope this helps you out.
#gheff
     
Fresh-Faced Recruit
Join Date: Nov 2000
Location: Denton, TX U.S.A
Status: Offline
Reply With Quote
Mar 16, 2002, 10:41 PM
 
No .... it did not work.

I appreciate the help though. Thanks.
I am still looking for an answer. Hopefully,
I will get an answer next week at a conference.

Jeff
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:18 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2