troubleshooting Question

Java application through proxy Charles

Avatar of duncanb7
duncanb7 asked on
JavaJavaScriptPHP
41 Comments3 Solutions4151 ViewsLast Modified:
Dear Experts,


I get one applet java application  and I am using it in IE every day.
Now I would like to save the data I want from the application through
the proxy , now I am using Charles debugger proxy.
From the Sun document,http://docs.oracle.com/javase/6/docs/technotes/guides/net/proxies.html, it mention set the java for proxy  at command line.
I tried it at my PC at C:/program files/java/jre7/bin/java -D http.proxyHost=127.0.0.1 -D
http.proxyPort=8888, but it doesn't work, just error Can't find the variable

And I try to use javascript,
<html>
<head>
</head>
<COMMENT><SCRIPT LANGUAGE="JavaScript1.1"><!--
java.lang.System.getProperties().put("http.proxyHost", "127.0.0.1");
java.lang.System.getProperties().put("http.proxyPort", "8888");
 
   var javaVersion = java.lang.System.getProperty("java.version");  
   alert(javaVersion);
//--></SCRIPT></COMMENT>
<body>
</body>
</html>

Firefox reports,
Error: uncaught exception: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "*" "read,write")
and only alert(javaVersion) is working.

I already open or run Charles proxy software and its client adress is set 127.0.0.1:8888
before I do the previous action and  Charles running is fine from IE and Firefox.
But it doesn't show any information data  I want  from my applet application that is
probably related to those proxy setting for Java proxy is not correct.
And my PC I login in as  adminstrative manager mode  already
Any advise to solve the issue, I am not familar with java code  and if provide
the simple code for setting system proxy property for Java that is
strongly welcome.

Please advise
Duncan
ASKER CERTIFIED SOLUTION
duncanb7

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 41 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 41 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros