Java prog is very slow
hai
i am beginner level in java prog
i insert data in ms sql server 2000. i am insert 5000 record in database . but i am application take long time .pls give advise for me
very quick
import java.sql.*;
public class SqlDatabase
public Connection connection;
public boolean openConnection(String strServerIPAddress, String strDatabaseName, String strUserName, String strPassword)
String url = "jdbc:microsoft:sqlserver://" + strServerIPAddress + ":1433" +";DatabaseName=" + strDatabaseName;
try
//Loading the driver...
DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver());
//Buiding a Connection
connection = DriverManager.getConnection(url, strUserName, strPassword);
if(connection== null )
return false;
//catch( java.sql.SQLException e )
catch (SQLException e)
System.out.println(e.getMessage());
return false;
return true;
public void SqlDataInsert(String Random_num,String Check_Sum)throws Exception {
//DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver());
//Connection connection = DriverManager.getConnection( "jdbc:microsoft:sqlserver://202.146.65.221:1433;DatabaseName=MMS_Gateway","Tech","tech32132");
if (connection != null)
try {
Statement stmt = connection.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
ResultSet resultSet = stmt.executeQuery("select * from Random_CheckSum where 1=2");
resultSet.moveToInsertRow();
resultSet.updateString("Random_Number",Random_num);
resultSet.updateString("Check_Sum",Check_Sum);
resultSet.insertRow();
System.out.println("Data Sroted in Database");
} catch (SQLException e) {
System.out.println(e.getMessage());
}
now my java prog is very fast . now take 15 sec to 20 sec for insert 5000 records
now i have change my code is
import java.sql.*;
public class SqlDatabase
public Connection connection;
public boolean openConnection(String strServerIPAddress, String strDatabaseName, String strUserName, String strPassword)
String url = "jdbc:microsoft:sqlserver://" + strServerIPAddress + ":1433" +";DatabaseName=" + strDatabaseName;
try
//Loading the driver...
DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver());
//Buiding a Connection
connection = DriverManager.getConnection(url, strUserName, strPassword);
if(connection== null )
return false;
//catch( java.sql.SQLException e )
catch (SQLException e)
System.out.println(e.getMessage());
return false;
return true;
public void SqlDataInsert(String Random_num,String Check_Sum)
if (connection != null)
try {
String Sql="INSERT INTO Random_CheckSum (Random_Number, Check_Sum) VALUES(?, ?)";
PreparedStatement pstmt =connection.prepareStatement(Sql);
pstmt.setString(1, Random_num);
pstmt.setString(2, Check_Sum);
pstmt.executeUpdate();
System.out.println("Data Sroted in Database");
} catch (SQLException e) {
System.out.println(e.getMessage());
} Thank for all
Similar Messages
-
Signed java applet is very slow with 1.4.2_06
We have an application which has a signed jar applets was working fine with Java Plug-in (JPI) version 1.4.1_02.
Due to customer requirement they want to run the same applet with JPI version 1.4.2_06, After JPI upgrade the applet is running slow.
I am not sure what sun has changed the security settings in 1.4.2_06. So, Can some one give there thoughts on why would it run slow because of JPI changes.
Thanks in advance.
AjHi,
It is nothing to do with Signed applet.
If URL Connection 's setDefaultCacheUses is set to false then this is causing to run the Applet slow. As it require to download complete jar(if any) everytime.
From 1.4.1_02 (CachedJarURLConnection.class in jaws.jar):
public void connect()
throws IOException
if(!connected)
jarFile = JarCache.get(jarFileURL);
if(jarFile != null)
{�.
From 1.4.2_06 (CachedJarURLConnection.class in plugin.jar):
public void connect()
throws IOException
if(!connected)
if(getUseCaches())
jarFile = JarCache.get(jarFileURL);
if(jarFile != null)
{� -
Java 5 is VERY slow on Linux Fedora core3
Why Java is 10-15 times slower on Fedora Linux, in comparising to Windows XP?
I have two identical PC (dual Pentuim3 1Gh, 1.5Gig memory).
Java version - JDK 1.5.0_03
For testing, I run simple java program:
/// Start LoadTest.Java
import java.util.*;
public class LoadTest {
public static void main(String[] args)
Date startDate = new Date();
int repeat = 1000;
HashMap map = new HashMap();
for(int i=0; i<repeat; i++) {
//System.out.println(i);
ArrayList list = new ArrayList();
long lval = (new Date()).getTime() / startDate.getTime() + ((new Date()).getTime() * startDate.getTime()) - startDate.getTime();
String sval = Long.toString(lval);
Long LValue = Long.valueOf( sval ).longValue();
map.put(LValue, sval);
String keyset = map.keySet().toString();
list.add(0,keyset);
list.addAll(map.values());
for (Iterator iter = map.keySet().iterator(); iter.hasNext(); ) {
Long lv = (Long) iter.next();
String sv = (String) map.get(lv);
list.add(sv);
keyset = map.keySet().toString();
list.add(0,keyset);
Date endDate = new Date();
String message = " LoadTest: " + repeat + " repetitions. Total Time: " + (endDate.getTime() - startDate.getTime());
System.out.println(message);
/// End LoadTest.Java
It takes 300ms to run it on Windows and 3900ms - on Linux
Can somebody help me?
Shall I consider to use Windows on the web-server?
Thanks.I know, it's just dirty, ugly test, but WHY WinXP handles it better?
Actually, I did this best after I get som test results for my application.
I't uses JBoss4.1/Tomcat5 on JDK 1.5_03. I used JMeter to test it and get some strange results - to test throughput rate on plain JSP pages, like login page (without any EJB) , Linux performs 10 times slower (for 100 requests, 24/min on Linux and 240/min on Windows). To test EJB, which retrieving datasets from database, the difference is about 3 times. Linux - FedoraCore 3 (2.6.11)
That's why I started testing Java itself. BTW, if make this test a little "pretty" - no memory allocations in loop, less using arraylists and maps, the performance difference about 3 times or even less, if to put Thread.sleep(1) in the loop.
Now, I have to figure out, which paltform to use for our web-application, but I'm confused.
BTW, which app.server did you use? May be JBoss is not the best solution? The application should handle about 200 users, most of them almost simultaneously.
Thanks -
Java virtual machine very slow: why?
Since I have upgraded Tiger to Leopard, the startup of the Java virtual machine is unbelievably slow: for example, just executing java -version for the first time requires almost one minute. This happens only the first time the JVM is started: after that, everything seems to work properly. Any idea of what is the problem? Thank you.
I don't have this problem at all.
Which version of Unix are you using? And which version of Java are you using on the Unix computer? How old is your Computer? -
Java Web Service very slow from Flex when not local
I have a jaxws web service that I am using as the interface layer to a database that I call from a Flex application. All was working well when I was referencing the service from localhost, but as soon as I deployed a version to test against (running on AWS EBS) the service calls dropped to several minutes.
To remove all external factors I could think of, I created a test service, which simply returns a list of 5 strings, therefore there is no DB connection issue and there are no complex objects to be interpreted. I still get exactly the same behaviour, the call is fast when running locally, but an absolute dog deployed.
If I use a web browser to retrieve the wsdl / xsd locally or remotely, they return immediately. If I use soapUI to execute the call both local and remote instances return in less than 500ms.
Using the Network Monitor, the wsdl takes a few hundred milliseconds to be retrieved, the xsd reference however, takes one minute and sometime fails altogether, ditto with the final call for data retrieval. There is no activity on the server at this time.
The Request/Response times in Network monitor indicate that when the calls are made they are taking no more than 1 second to return, but there is exactly one minute between the wsdl retrieval and xsd call, similarly there is exatly one minute between xsd retrieval and data retrieval.
Any ideas?Hi, I'm not sure I can post my application due to company privacy issues... I'll look into that.
Note that if I execute the function from the test view of the data service (a logical data service) it responds in a reasonable amount of time - it's only when I call the same method through a web service that was generated from the data service taht I have a problem.. it consistently takes around 30 seconds +- 3 seconds.
Your last question... uhh yes... the web service/data service returns a summary of a person which does include address and contact info.
Let me see about attaching the application - I'm thinking the answer will be no, however... is it possible for you to help without having the code? Hopefully the above information helped. -
Ps -p running very slow (1-2 seconds) on Java process
Hi Solaris gurus:
I encountered a issue that running ps -p on java process running very slow, it took almost 2 seconds to complete.
I issued a truss on the "ps -p " command, the following is part of the output:
/1: 0.0001 fstat(1, 0xFFFFFFFF7FFFE1F0) = 0
/1: 0.0000 write(1, " U I D P".., 55) = 55
/1: 0.0002 open("/proc/19299/psinfo", O_RDONLY) = 3
*/1: 1.3170 read(3, "02\0\0\0\0\0\011\0\0 K c".., 416) = 416*
/1: 1.2401 close(3) = 0
/1: 0.0002 stat("/dev/tty", 0xFFFFFFFF7FFFE830) = 0
It seems that the read() spent the most time.
Anyone can help?Not enough memory, page-outs is too large
8.91 GB Page-outs
After removing adware, and do a safe boot of Safari and remove extensions, then reset cache history etc. You need to do a boot into Recovery Mode and run Disk Repair from there. Also boot the system in Safe Mode.
On startup it sounds like you have a problem with the directory which would also account for long startups and checking the directory. Along with or instead of DU Repair Disk you can use Single User Mode and fsck -fy to try to fix the directory but in some cases that may not be enough.
Backups from before you got this adware and problems helps and should always be ready and able to restore a system from known good backups or system restore image.
4GB of RAM may have been fine originally but "Early 2011" is now 5 years and 4 OS version changes. You can upgrade the memory and while at it consider a nice SSD internal drive which will help as well. Take a look and see what prices and options there are from http://www.macsales.com for your 2011 MacBook Pro.
http://www.everymac.com
Community for MBP MacBook Pro -
PI 7.1 ESR and Java Webstart very slow
Hi,
I have been using the PI ESR and IB on the snow leapord OS with Mozilla and Safari browsers. The java webstart seems to be very slow and working on the ESR objects is sometimes a pain as it takes long time to save , activate or change and sometimes I end up java heap space issues although we are running at a 2 gig heap size. Is it only me or is anyone else facing the same issue?
Is it time to go back to good old windows XP? or can this be fixed in Mac ...I love my Mac for other reasons though...:)
TeresaHi,
>>>serverXXXPI71
add this server info with related IP address into your hosts file
and it will work
Regards,
Michal Krawczyk -
Java is very slow on terminal servers
Hi, we have several terminal servers for clients. But running Java (JRE) on a bank website, is very slow to load the Java plugin. So the whole login takes around 1-2mins to complete.
We run Windows Server 2008 R2 which is virtualized with VMWare, we run the latest Java client v7 Update 17. Java has always been slow on these servers, is there a way to teak it somewho, so it loads faster?WoOber wrote:
Its me who have setup the whole server, but users experience really that Java starts really slow when they try to login on their bank on the web.And how is that login done? In an applet? Because then the performance issue is on their own computer in their own private installations of browsers and Java runtimes, not your terminal. Applets tend to load 'slowly', especially on older versions of Java. The feeling of slowness tends to be because people compare the loading time to Flash, a completely different beast. -
WebAnalysis/WebAdminServicesConsole very slow (because of java applet)
Hello,
Context: Hyperion System 9.3.1
server1, Windows -> installed Administration Services e BI+ (Workspace, Web Analysis ecc)
server2, AIX -> installed Essbase
The client has externalized the software/hardware so we have:
network A =client's network
network B = Internet Service provider network
network C =network of the society to which client has externalized the hardware
The communication path is: network A -> network B -> network C
server1 and server2 are on network C.
From the client's computers in network A, Web Analysis Studio and Web Administration Services Console (both using java applets)
have very very slow response times. To give you an idea, an blank report in Web Analysis needs 10min to open. With Web Admin Console I can't do anything: in an empty outline, I added 2 dimensions with 1 member each, when I tried 'Save outline' after 20mins of waiting a response the system also freezed.
When I work in remote control directly on server1, Web Analysis studio and Web Admin Console are very very fast.
This happens only with these two components, the other web components not using java applet (Workspace ecc) don't have this problem.
That made me think there is a network issue. But ping and tracert to both servers (1,2) from the client machines gave me positive results.
I don't know what else to test/try.
Any help will be appreciated!
Thank you!
DanielaCiao,
It seems Web Analysis works well only with jre 1.5.0 update 11. I had java 1.6.0 update 4. I had disintalled java 1.6.0_4, installed 1.5.0_11 and now web analysis applet won't even load.
The java console makes me see the following messages (I replaced by hand the real server name with the server_name):
Java Plug-in 1.5.0_11
Uso della versione JRE 1.5.0_11 Java HotSpot(TM) Client VM
Directory principale utente = C:\Documents and Settings\Administrator
c: cancella finestra console
f: finalizza oggetti nella coda di finalizzazione
g: recupera spazio
h: visualizza questo messaggio di aiuto
l: esegui dump dell'elenco classloader
m: stampa utilizzo memoria
o: attiva registrazione eventi
p: ricarica configurazione proxy
q: nascondi console
r: ricarica configurazione criteri
s: esegui dump delle proprietà del sistema e dell'installazione
t: esegui dump dell'elenco thread
v: esegui dump dello stack del thread
x: cancella cache classloader
0-5: imposta livello di traccia su <n>
[WARN] HYABaseClient - -Analyzer Client Version=9.3.1.0.0.248
[WARN] HYABaseClient - -ServerURL=http://server_name/WebAnalysis/processor
[INFO] ProxyHttpClientHelper - -[PROXY_INIT] - Detect proxy settings using JavaPlugin Proxy Service...
[INFO] ProxyHttpClientHelper - -[PROXY_INIT] - Proxy settings missed or bypassed. Go to sever directly
[INFO] ProxyHttpClientHelper - -[PROXY_INIT] - Proxy settings are detected successfully.
java.net.UnknownHostException: server_name
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(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 org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)
at org.apache.commons.httpclient.HttpConnection.open(Unknown Source)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at com.hyperion.atf.services.distributed.http.HttpRequestProcessor.checkProxySettings(HttpRequestProcessor.java:269)
at com.hyperion.atf.services.distributed.http.HttpRequestProcessor.checkProxySettings(HttpRequestProcessor.java:234)
at com.hyperion.analyzer.usersession_base.HYABaseClient.obtainProxySettings(Unknown Source)
at com.hyperion.analyzer.usersession_base.HYABaseClient.initATF(Unknown Source)
at com.hyperion.analyzer.usersession_base.HYABaseClient.init(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[WARN] HYABaseClient - -Using Config: config_client.xml
[INFO] SessionScopeBindingToJVM - -Releasing services for session: Unbound/Undefined SessionId
[ERROR] ServiceManager - -Creating dummy lock.
[INFO] SessionScopeBindingToJVM - -Creating token for session: INITIALIZATION
[INFO] HttpRequestProcessor - -ServerURL=http://server_name/WebAnalysis/processor
[INFO] HttpRequestProcessor - -Connect to server DIRECTLY
[INFO] EventHandlerAsynchronous - -Created 3 worker threads.
[ERROR] NamingServiceProxy - -Could not retrieve root entry. <org.apache.commons.lang.exception.NestableRuntimeException: org.apache.commons.lang.exception.NestableException: An error occurred during network communications.>org.apache.commons.lang.exception.NestableRuntimeException: org.apache.commons.lang.exception.NestableException: An error occurred during network communications.
at com.hyperion.atf.services.distributed.clientproxies.NamingServiceProxy.getRootEntry(NamingServiceProxy.java:1008)
at com.hyperion.atf.internal.services.naming.NamingServiceProxy.getRootEntry(NamingServiceProxy.java:119)
at com.hyperion.atf.internal.services.naming.NamingServiceProxy.initialize(NamingServiceProxy.java:102)
at com.hyperion.atf.internal.services.containers.UserSessionContainer.initialize(UserSessionContainer.java:119)
at com.hyperion.atf.services.ServiceManager.setServiceContainer(ServiceManager.java:526)
at com.hyperion.atf.services.ServiceManager.getService(ServiceManager.java:271)
at com.hyperion.atf.services.ServiceManager.setServiceContainer(ServiceManager.java:503)
at com.hyperion.atf.services.ServiceManager.initServiceContainer(ServiceManager.java:463)
at com.hyperion.atf.services.ServiceManager.initialize(ServiceManager.java:661)
at com.hyperion.atf.services.ServiceRegistry.initialize(ServiceRegistry.java:126)
at com.hyperion.analyzer.usersession_base.HYABaseClient.initATF(Unknown Source)
at com.hyperion.analyzer.usersession_base.HYABaseClient.init(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.commons.lang.exception.NestableException: An error occurred during network communications.
at com.hyperion.atf.services.distributed.http.HttpRequestProcessor.internalProcess(HttpRequestProcessor.java:480)
at com.hyperion.atf.services.distributed.DistributedRequestProcessorClient.process(DistributedRequestProcessorClient.java:115)
at com.hyperion.atf.services.distributed.clientproxies.NamingServiceProxy.getRootEntry(NamingServiceProxy.java:999)
... 13 more
Caused by: java.net.UnknownHostException: server_name
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(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 org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)
at org.apache.commons.httpclient.HttpConnection.open(Unknown Source)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(Unknown Source)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at com.hyperion.atf.services.distributed.http.HttpRequestProcessor.internalProcess(HttpRequestProcessor.java:466)
... 15 more
[ERROR] UserSessionContainer - -java.lang.IllegalStateException: Root entry is null
[ERROR] UserSessionContainer - -Could not destroy container instance properly "com.hyperion.atf.internal.services.naming.NamingServiceProxy". <java.lang.NullPointerException>java.lang.NullPointerException
at com.hyperion.atf.internal.services.containers.UserSessionContainer.destroy(UserSessionContainer.java:336)
at com.hyperion.atf.internal.services.containers.UserSessionContainer.initialize(UserSessionContainer.java:127)
at com.hyperion.atf.services.ServiceManager.setServiceContainer(ServiceManager.java:526)
at com.hyperion.atf.services.ServiceManager.getService(ServiceManager.java:271)
at com.hyperion.atf.services.ServiceManager.setServiceContainer(ServiceManager.java:503)
at com.hyperion.atf.services.ServiceManager.initServiceContainer(ServiceManager.java:463)
at com.hyperion.atf.services.ServiceManager.initialize(ServiceManager.java:661)
at com.hyperion.atf.services.ServiceRegistry.initialize(ServiceRegistry.java:126)
at com.hyperion.analyzer.usersession_base.HYABaseClient.initATF(Unknown Source)
at com.hyperion.analyzer.usersession_base.HYABaseClient.init(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[ERROR] ServiceManager - --------------------------
[ERROR] ServiceManager - -Service "naming" was not initialized. Removed from registry.
[ERROR] ServiceManager - -java.lang.IllegalStateException: Could not initalize container for: ServiceRegistration (name=naming, scope=user_session, priority=99, class=com.hyperion.atf.internal.services.naming.NamingServiceProxy, cronned=null)
[ERROR] ServiceManager - --------------------------
[INFO] SessionScopeBindingToJVM - -Releasing services for session: INITIALIZATION
[WARN] SecurityContextManagerProxy - -Could not verify login...will try again. <org.apache.commons.lang.exception.NestableRuntimeException: org.apache.commons.lang.exception.NestableException: An error occurred during network communications.>org.apache.commons.lang.exception.NestableRuntimeException: org.apache.commons.lang.exception.NestableException: An error occurred during network communications.
at com.hyperion.atf.services.distributed.clientproxies.SecurityContextManagerProxy.hasValidSecurityContext(SecurityContextManagerProxy.java:286)
at com.hyperion.atf.security.authentication.SecurityContextManagerProxy.refresh(SecurityContextManagerProxy.java:73)
at com.hyperion.atf.security.authentication.SecurityContextManagerProxy.hasValidSecurityContext(SecurityContextManagerProxy.java:162)
at com.hyperion.atf.security.authentication.SecurityContextManagerProxy.getUser(SecurityContextManagerProxy.java:149)
at com.hyperion.atf.security.authentication.SecurityContextManagerProxy.toString(SecurityContextManagerProxy.java:195)
at java.lang.String.valueOf(Unknown Source)
at java.lang.StringBuffer.append(Unknown Source)
at com.hyperion.atf.internal.services.containers.UserSessionContainer.internalRelease(UserSessionContainer.java:259)
at com.hyperion.atf.internal.services.containers.UserSessionContainer.release(UserSessionContainer.java:219)
at com.hyperion.atf.internal.services.containers.UserSessionContainer.release(UserSessionContainer.java:229)
at com.hyperion.atf.services.ServiceManager.releaseServices(ServiceManager.java:354)
at com.hyperion.atf.services.SessionScopeBindingToJVM.destroy(SessionScopeBindingToJVM.java:34)
at com.hyperion.atf.services.ServiceManager.initialize(ServiceManager.java:682)
at com.hyperion.atf.services.ServiceRegistry.initialize(ServiceRegistry.java:126)
at com.hyperion.analyzer.usersession_base.HYABaseClient.initATF(Unknown Source)
at com.hyperion.analyzer.usersession_base.HYABaseClient.init(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.commons.lang.exception.NestableException: An error occurred during network communications.
at com.hyperion.atf.services.distributed.http.HttpRequestProcessor.internalProcess(HttpRequestProcessor.java:480)
at com.hyperion.atf.services.distributed.DistributedRequestProcessorClient.process(DistributedRequestProcessorClient.java:115)
at com.hyperion.atf.services.distributed.clientproxies.SecurityContextManagerProxy.hasValidSecurityContext(SecurityContextManagerProxy.java:277)
... 17 more
Caused by: java.net.UnknownHostException: server_name
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(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 org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)
at org.apache.commons.httpclient.HttpConnection.open(Unknown Source)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(Unknown Source)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at com.hyperion.atf.services.distributed.http.HttpRequestProcessor.internalProcess(HttpRequestProcessor.java:466)
... 19 more
[ERROR] HYABaseClient - -Error while initializing ATF <com.hyperion.atf.services.InitializationException: Could not initialize service manager: 1224512931093>com.hyperion.atf.services.InitializationException: Could not initialize service manager: 1224512931093
at com.hyperion.atf.services.ServiceManager.initialize(ServiceManager.java:678)
at com.hyperion.atf.services.ServiceRegistry.initialize(ServiceRegistry.java:126)
at com.hyperion.analyzer.usersession_base.HYABaseClient.initATF(Unknown Source)
at com.hyperion.analyzer.usersession_base.HYABaseClient.init(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: com.hyperion.atf.services.ServiceManager$ServiceRecursiveInitException: Could not start critical service: "appinit.tasks", all services are being rolled back.
at com.hyperion.atf.services.ServiceManager.setServiceContainer(ServiceManager.java:546)
at com.hyperion.atf.services.ServiceManager.initServiceContainer(ServiceManager.java:463)
at com.hyperion.atf.services.ServiceManager.initialize(ServiceManager.java:661)
... 5 more
org.apache.commons.lang.exception.NestableRuntimeException: org.apache.commons.lang.exception.NestableException: An error occurred during network communications.
at com.hyperion.analyzer.atf.service.clientproxies.HYALicensingServiceProxy.isFeatureEnabled(Unknown Source)
at com.hyperion.analyzer.usersession_base.AnalyzerClient.initShowHideParams(Unknown Source)
at com.hyperion.analyzer.usersession_base.AnalyzerClient.createGUI(Unknown Source)
at com.hyperion.analyzer.usersession_base.HYABaseClient.init(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.commons.lang.exception.NestableException: An error occurred during network communications.
at com.hyperion.atf.services.distributed.http.HttpRequestProcessor.internalProcess(HttpRequestProcessor.java:480)
at com.hyperion.atf.services.distributed.DistributedRequestProcessorClient.process(DistributedRequestProcessorClient.java:115)
... 6 more
Caused by: java.net.UnknownHostException: server_name
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(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 org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)
at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(Unknown Source)
at org.apache.commons.httpclient.HttpConnection.open(Unknown Source)
at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(Unknown Source)
at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)
at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
at com.hyperion.atf.services.distributed.http.HttpRequestProcessor.internalProcess(HttpRequestProcessor.java:466)
... 7 more
Any help will be appreciated! -
MacBook Pro very slow to bring up homepage, programs won't open; likely related to failure to upgrade Java on Parallels, told that C disc low capacity, disc compression recommended was unsuccesful/failed. Rebooting, battery removal hasn't helped. Can't open Systems Preferences. Suggestions?
Linc, the resident dump guru, will probably be along in awhile and provide deeper insights, but here goes for now. I'm seeing an awful lot of warnings and messages from Chrome. Any chance you could lay off that browser for awhile and use Safari in the meanwhile? No red messages anywhere in the listing. Have you tried rebooting into Mountain Lion Recovery Mode to do a Repair Disk and Repair Disk Permissions? (Cause in spite of what your config tag says, the dump indicates you are running a ML kernel)
-
Java 2D very slow with Windows XP
Hi all!
I'm writing an isometric game engine using Java 2D API, in full-screen exclusive mode and using all the advantages of the new VolatileImage class. The engine is almost finished, I'm testing it putting some animated players on screen and showing the frame rate of the engine. Everything went right, frame rate was very high in Linux and Windows 98/Me. But when I try to run the engine on Windows XP I can only get 5 or 6 fps!!!! And I don't know why!! It seems that XP makes Java run very slow... at least when using Java2D...
Please, anyone knows why the performance is reduced??? Is there a new JRE release for Windows XP?? I'm using JDK 1.4.1.
Thanks for your help.If you're using the Fullscreen API, then you're using BufferStrategy, thus you shouldn't use VolatileImages, it does this for you in the background. You shouldn't create any buffers, simply use the one provided. I'm assuming your problem probably lies in transparency. I've made an isometric engine using the fullscreen API that has run with complete 60fps page flipping. I would assume your bottle-neck lies in:
Transparencys (These are very slow, there is a way to make a bitmask, much like you'd do in DirectX)
Dynamic Memory allocation/Alpha rendering in your animation loop. (You need to allocate ALL of the colors you're going to use, and avoid using an alpha component if you want to avoid the VM getting bogged down by the garbage collector because you're allocating 30 Color objects a second).
I made a Color object that was some what hacked together that has methods to allow you to access it's values for doing this kind of thing, allocating your scheme before hand is an easier approach.
The method that performs the page flipping is a BLOCKING method, so you should orient your drawing before it, and not assume it's simply placing a request, like repaint does.
-Jason Thomas. -
Paint performance with JScrollPane very slow in jdk 1.4?
I got a simple program that overrides paintComponent on a JPanel. Then draws lots of lines, rectangles and some strings. The panel is then added to a scrollpane.
The scrolling is very smooth in java 1.3.1, but very slow in 1.4.2
the paintComponent takes between 16ms and 30ms with java 1.3.1 but 70-200ms with java 1.4.2.
I tried turning of antialising etc.. but no help. Whats the "improvement" they made in jdk 1.4?Ok I made a simple example, which draws around 5000 elements.
Sourcecode is here: http://www.mcmadsen.dk/files/ScrollPaneTest.java
I did several testruns on java 1.4.2 and java 1.3.1, heres the "avarage" result:
Java 1.4.2:
Current: 140ms High: 203ms Avg: 144ms Low: 125ms
Java 1.3.1:
Current: 62ms High: 219ms Avg: 68ms Low: 47ms
The paintComponent() looks like this:
public void paintComponent(Graphics g)
super.paintComponent(g);
long offset=System.currentTimeMillis();
PaintElement paintElementTmp;
for(int i=0;i<paintElements.size();i++)
paintElementTmp=(PaintElement)paintElements.elementAt(i);
g.setColor(paintElementTmp.getBackground());
g.fillRect(paintElementTmp.getX(),paintElementTmp.getY(),paintElementTmp.getWidth(),paintElementTmp.getHeight());
g.setColor(paintElementTmp.getForeground());
g.drawString(paintElementTmp.getText(),paintElementTmp.getX(),paintElementTmp.getY());
long done=System.currentTimeMillis();
long current=done-offset;
sum+=current;
if(current>high)high=current;
if(low>current)low=current;
count++;
System.out.println("Current: "+current+"ms High: "+high+"ms Avg: "+(sum/count)+"ms Low: "+low+"ms");
I tried all the renderinghints, but no difference (from the default settings). Also the scrolling is very slow and stops all the time in java 1.4.
Any ideas on how to get java 1.4 to perform as java 1.3.1?
Thanks -
I got a turtle in my MacBook, and he's very slow.
I had posted about my iMac & MacBook being very slow when using Safari, in the iMac Intel forums, and I got an answer about iMac, they said I need to upgrade Ram, but would say anything about the MacBook Pro and said to post here. So, here it goes:
Hello all, I need some help with my apple products. I spend half my day messing with the internet to try and get it going instead of sitting there with a blank look on its face. They freeze up to an extent. I generally can always close out Safari, shut off the wifi, then turn wifi on and safari will work somewhat better sometimes. Here is the Etre report for both the iMac and MacBook. Also on the MacBook report, I was digging around in my system report and found something that made me think it might be bad so i have included it as well. Please help me and keep me from wasting half my day every day. Thanks. There is several extra lines after the Macbook report that came from my system report. I don't know if it is pertinent or not but I feel like it is. I wasn't sure what to leave out so I just put it all in, sorry for the long post.
Note----- I took out the logs that were from the previous address I lived at. Just included from when I moved into new house.
I took all logs out.
Problem description:
Ever since I moved into this new house my apple computers have slowed down to granny speed and sometimes they just sit there and stare at you. I have an iMac from 2011, a mac book pro 2014, iPhone 6, iPhone 4s, and to top it off a windows computer that is used for graphic software. I have 2 TV’s that we use as well. My internet and cable are provided by ATT and at my old house it worked great, no problems. I have had ATT out twice since install in January. They have given me a new modem, and a booster to help increase the reach of the wireless internet. My internet is supposed to be 18mbs download and for the life of me can’t think of the upload speed. When testing I usually have a 10 to 11 download and a 1.80 upload speed. I have ran verify disk, fix permissions so many times and that it is ridiculous. My iMac is used in the back room which is about 30 feet from modem, that is why they gave me the booster the 2nd time out. The macbook is used just whereever. The speed of the Mac’s is slower then the Windows computer. That ain’t right. I don’t download anything, I don’t go to crazy suspect sites. I have taken the iMac to apple store and they tested it and said it was fine. I have re-installed the O.S. (Yosimiteme 10.10.3). I just want my apples to work properly again.
This is for the MacBook
EtreCheck version: 2.2 (132)
Report generated 5/3/15, 8:23 PM
Download EtreCheck from http://etresoft.com/etrecheck
Click the [Click for support] links for help with non-Apple products.
Click the [Click for details] links for more information about that line.
Hardware Information: ℹ️
MacBook Pro (Retina, 13-inch, Late 2013) (Technical Specifications)
MacBook Pro - model: MacBookPro11,1
1 2.4 GHz Intel Core i5 CPU: 2-core
4 GB RAM Not upgradeable
BANK 0/DIMM0
2 GB DDR3 1600 MHz ok
BANK 1/DIMM0
2 GB DDR3 1600 MHz ok
Bluetooth: Good - Handoff/Airdrop2 supported
Wireless: en0: 802.11 a/b/g/n/ac
Battery: Health = Normal - Cycle count = 290 - SN = D863505T5JWFT5Y1L
Video Information: ℹ️
Intel Iris
Color LCD 2560 x 1600
System Software: ℹ️
OS X 10.10.3 (14D136) - Time since boot: 20:35:40
Disk Information: ℹ️
APPLE SSD SD0128F disk0 : (121.33 GB)
EFI (disk0s1) <not mounted> : 210 MB
Recovery HD (disk0s3) <not mounted> [Recovery]: 650 MB
Macintosh HD (disk1) / : 120.14 GB (52.28 GB free)
Encrypted AES-XTS Unlocked
Core Storage: disk0s2 120.47 GB Online
USB Information: ℹ️
Apple Internal Memory Card Reader
Apple Inc. BRCM20702 Hub
Apple Inc. Bluetooth USB Host Controller
Apple Inc. Apple Internal Keyboard / Trackpad
Thunderbolt Information: ℹ️
Apple Inc. thunderbolt_bus
Gatekeeper: ℹ️
Mac App Store and identified developers
Kernel Extensions: ℹ️
/Library/Application Support/VirtualBox
[not loaded] org.virtualbox.kext.VBoxDrv (4.3.14) [Click for support]
[not loaded] org.virtualbox.kext.VBoxNetAdp (4.3.14) [Click for support]
[not loaded] org.virtualbox.kext.VBoxNetFlt (4.3.14) [Click for support]
[not loaded] org.virtualbox.kext.VBoxUSB (4.3.14) [Click for support]
/System/Library/Extensions
[loaded] com.screenrecycler.driver.ScreenRecyclerDriver (1.4.13 - SDK 10.4) [Click for support]
Launch Agents: ℹ️
[not loaded] com.adobe.AAM.Updater-1.0.plist [Click for support]
[loaded] com.adobe.AdobeCreativeCloud.plist [Click for support]
[loaded] com.google.keystone.agent.plist [Click for support]
[loaded] com.oracle.java.Java-Updater.plist [Click for support]
[loaded] org.macosforge.xquartz.startx.plist [Click for support]
Launch Daemons: ℹ️
[loaded] com.adobe.fpsaud.plist [Click for support]
[loaded] com.google.keystone.daemon.plist [Click for support]
[loaded] com.microsoft.office.licensing.helper.plist [Click for support]
[loaded] com.oracle.java.Helper-Tool.plist [Click for support]
[loaded] org.macosforge.xquartz.privileged_startx.plist [Click for support]
User Launch Agents: ℹ️
[loaded] com.adobe.ARM.[...].plist [Click for support]
[loaded] com.adobe.ARM.[...].plist [Click for support]
[loaded] com.citrixonline.GoToMeeting.G2MUpdate.plist [Click for support]
[running] com.microsoft.LaunchAgent.SyncServicesAgent.plist [Click for support]
[not loaded] org.virtualbox.vboxwebsrv.plist [Click for support]
User Login Items: ℹ️
iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
Internet Plug-ins: ℹ️
o1dbrowserplugin: Version: 5.41.0.0 - SDK 10.8 [Click for support]
Default Browser: Version: 600 - SDK 10.10
AdobeAAMDetect: Version: AdobeAAMDetect 2.0.0.0 - SDK 10.7 [Click for support]
FlashPlayer-10.6: Version: 17.0.0.169 - SDK 10.6 [Click for support]
AdobePDFViewerNPAPI: Version: 11.0.10 - SDK 10.6 [Click for support]
Silverlight: Version: 5.1.30514.0 - SDK 10.6 [Click for support]
Flash Player: Version: 17.0.0.169 - SDK 10.6 [Click for support]
QuickTime Plugin: Version: 7.7.3
googletalkbrowserplugin: Version: 5.41.0.0 - SDK 10.8 [Click for support]
SharePointBrowserPlugin: Version: 14.4.9 - SDK 10.6 [Click for support]
AdobePDFViewer: Version: 11.0.10 - SDK 10.6 [Click for support]
JavaAppletPlugin: Version: Java 8 Update 31 Check version
User internet Plug-ins: ℹ️
CitrixOnlineWebDeploymentPlugin: Version: 1.0.105 [Click for support]
WebEx64: Version: 1.0 - SDK 10.6 [Click for support]
Safari Extensions: ℹ️
Buffer
3rd Party Preference Panes: ℹ️
Flash Player [Click for support]
Java [Click for support]
Time Machine: ℹ️
Skip System Files: NO
Auto backup: YES
Volumes being backed up:
Macintosh HD: Disk size: 120.14 GB Disk used: 67.85 GB
Destinations:
Seagate Backup Plus Drive [Local]
Total size: 999.86 GB
Total number of backups: 32
Oldest backup: 2014-09-03 02:53:05 +0000
Last backup: 2015-04-01 02:18:11 +0000
Size of backup disk: Excellent
Backup size 999.86 GB > (Disk size 120.14 GB X 3)
Top Processes by CPU: ℹ️
5% WindowServer
2% tccd(2)
2% fontd
1% cloudd
0% taskgated
Top Processes by Memory: ℹ️
546 MB kernel_task
135 MB Safari
78 MB mdworker(5)
70 MB WindowServer
61 MB TextEdit
Virtual Memory Information: ℹ️
372 MB Free RAM
3.63 GB Used RAM
90 MB Swap Used
Diagnostics Information: ℹ️
May 2, 2015, 11:47:44 PM Self test - passed
May 2, 2015, 11:42:44 PM /Library/Logs/DiagnosticReports/Safari_2015-05-02-234244_[redacted].hang
THIS IS THE iMac
EtreCheck version: 2.2 (132)
Report generated 5/3/15, 8:22 PM
Download EtreCheck from http://etresoft.com/etrecheck
Click the [Click for support] links for help with non-Apple products.
Click the [Click for details] links for more information about that line.
Hardware Information: ℹ️
iMac (21.5-inch, Mid 2010) (Technical Specifications)
iMac - model: iMac11,2
1 3.06 GHz Intel Core i3 CPU: 2-core
4 GB RAM Upgradeable
BANK 0/DIMM0
Empty
BANK 1/DIMM0
Empty
BANK 0/DIMM1
2 GB DDR3 1333 MHz ok
BANK 1/DIMM1
2 GB DDR3 1333 MHz ok
Bluetooth: Old - Handoff/Airdrop2 not supported
Wireless: en1: 802.11 a/b/g/n
Video Information: ℹ️
ATI Radeon HD 4670 - VRAM: 256 MB
iMac 1920 x 1080
G206HQL 1600 x 900 @ 60 Hz
System Software: ℹ️
OS X 10.10.3 (14D136) - Time since boot: 0:25:17
Disk Information: ℹ️
WDC WD5000AAKS-40V6A0 disk0 : (500.11 GB)
EFI (disk0s1) <not mounted> : 210 MB
Macintosh HD (disk0s2) / : 499.25 GB (392.09 GB free)
Recovery HD (disk0s3) <not mounted> [Recovery]: 650 MB
OPTIARC DVD RW AD-5680H
USB Information: ℹ️
Apple Internal Memory Card Reader
Apple Inc. BRCM2046 Hub
Apple Inc. Bluetooth USB Host Controller
Apple, Inc. Keyboard Hub
Apple, Inc Apple Keyboard
Apple Computer, Inc. IR Receiver
Apple Inc. Built-in iSight
Gatekeeper: ℹ️
Mac App Store and identified developers
Kernel Extensions: ℹ️
/System/Library/Extensions
[not loaded] com.Belcarra.iokit.USBLAN_netpart (2.0.2) [Click for support]
[not loaded] com.Belcarra.iokit.USBLAN_usbpart (2.0.2) [Click for support]
[not loaded] com.RemoteControl.USBLAN.usbpart (2.0.6) [Click for support]
[not loaded] com.leapfrog.driver.LfConnectDriver (1.8.1 - SDK 10.7) [Click for support]
/System/Library/Extensions/Belcarra.USBLAN_netpart.kext/Contents/PlugIns
[not loaded] com.belcarra.iokit.netpart.panther (1.6.1) [Click for support]
/System/Library/Extensions/Belcarra.USBLAN_usbpart.kext/Contents/PlugIns
[not loaded] com.belcarra.iokit.usbpart.panther (1.6.1) [Click for support]
/System/Library/Extensions/RemoteControl.USBLAN_usbpart.kext/Contents/PlugIns
[not loaded] com.RemoteControl.USBLAN.panther (1.6.1) [Click for support]
Startup Items: ℹ️
HP IO: Path: /Library/StartupItems/HP IO
Startup items are obsolete in OS X Yosemite
Launch Agents: ℹ️
[not loaded] com.adobe.AAM.Updater-1.0.plist [Click for support]
[running] com.adobe.AdobeCreativeCloud.plist [Click for support]
[running] com.flipvideo.FlipShare.AutoRun.plist [Click for support]
[loaded] com.google.keystone.agent.plist [Click for support]
[loaded] com.hp.help.tocgenerator.plist [Click for support]
[failed] com.motive.alertDetectorHost.plist [Click for support] [Click for details]
[failed] com.motive.userAgent.plist [Click for support] [Click for details]
Launch Daemons: ℹ️
[loaded] com.adobe.fpsaud.plist [Click for support]
[running] com.flipvideo.FlipShareServer.launchd.plist [Click for support]
[loaded] com.google.keystone.daemon.plist [Click for support]
[loaded] com.leapfrog.connect.shell.plist [Click for support]
[loaded] com.microsoft.office.licensing.helper.plist [Click for support]
[failed] com.motive.systemDaemon.plist [Click for support]
User Launch Agents: ℹ️
[loaded] com.adobe.ARM.[...].plist [Click for support]
[loaded] com.adobe.ARM.[...].plist [Click for support]
[loaded] com.citrixonline.GoToMeeting.G2MUpdate.plist [Click for support]
User Login Items: ℹ️That thread helped for a time. But now it seems as though my computer is back to slow again. But, some of the jargon is over my head as well. Not sure I knew quoite everything they were talking about. But thanks a lot for that, it helped I probably just need to reread it and follow the instructions again. Thanks so much.
-
Problem description:
My Macbook air runs very slow since installed Yosemite a few days ago
EtreCheck version: 2.0.6 (91)
Report generated October 24, 2014 at 12:07:13 GMT+3
Hardware Information: ℹ️
MacBook Air (13-inch, Mid 2012) (Verified)
MacBook Air - model: MacBookAir5,2
1 2 GHz Intel Core i7 CPU: 2-core
8 GB RAM Not upgradeable
BANK 0/DIMM0
4 GB DDR3 1600 MHz ok
BANK 1/DIMM0
4 GB DDR3 1600 MHz ok
Bluetooth: Good - Handoff/Airdrop2 supported
Wireless: en0: 802.11 a/b/g/n
Video Information: ℹ️
Intel HD Graphics 4000 -
Color LCD 1440 x 900
System Software: ℹ️
OS X 10.10 (14A389) - Uptime: 0:15:57
Disk Information: ℹ️
APPLE SSD SM256E disk0 : (251 GB)
S.M.A.R.T. Status: Verified
EFI (disk0s1) <not mounted> : 210 MB
Recovery HD (disk0s3) <not mounted> [Recovery]: 650 MB
Macintosh HD (disk1) / [Startup]: 249.77 GB (28.85 GB free)
Core Storage: disk0s2 250.14 GB Online
USB Information: ℹ️
Apple Inc. FaceTime HD Camera (Built-in)
Apple Internal Memory Card Reader
Apple Inc. Apple Internal Keyboard / Trackpad
Apple Inc. BRCM20702 Hub
Apple Inc. Bluetooth USB Host Controller
Thunderbolt Information: ℹ️
Apple Inc. thunderbolt_bus
Gatekeeper: ℹ️
Mac App Store and identified developers
Kernel Extensions: ℹ️
/Applications/Parallels Access.app
[loaded] com.parallels.virtualsound (1.0.27 27 - SDK 10.6) Support
/Applications/Parallels Desktop.app
[not loaded] com.parallels.kext.hidhook (9.0 24251.1052177) Support
[not loaded] com.parallels.kext.hypervisor (9.0 24251.1052177) Support
[not loaded] com.parallels.kext.netbridge (9.0 24251.1052177) Support
[not loaded] com.parallels.kext.usbconnect (9.0 24251.1052177) Support
[not loaded] com.parallels.kext.vnic (9.0 24251.1052177) Support
/Library/Extensions
[not loaded] org.virtualbox.kext.VBoxDrv (4.2.4) Support
[not loaded] org.virtualbox.kext.VBoxNetAdp (4.2.4) Support
[not loaded] org.virtualbox.kext.VBoxNetFlt (4.2.4) Support
[not loaded] org.virtualbox.kext.VBoxUSB (4.2.4) Support
Startup Items: ℹ️
VirtualBox: Path: /Library/StartupItems/VirtualBox
Startup items are obsolete and will not work in future versions of OS X
Launch Agents: ℹ️
[invalid?] com.cisco.anyconnect.gui.plist Support
[invalid?] com.oracle.java.Java-Updater.plist Support
[running] com.parallels.mobile.prl_deskctl_agent.launchagent.plist Support
[invalid?] com.teamviewer.teamviewer.plist Support
[invalid?] com.teamviewer.teamviewer_desktop.plist Support
[loaded] org.macosforge.xquartz.startx.plist Support
Launch Daemons: ℹ️
[loaded] com.adobe.fpsaud.plist Support
[running] com.cisco.anyconnect.vpnagentd.plist Support
[loaded] com.microsoft.office.licensing.helper.plist Support
[invalid?] com.oracle.java.Helper-Tool.plist Support
[running] com.parallels.mobile.dispatcher.launchdaemon.plist Support
[loaded] com.parallels.mobile.kextloader.launchdaemon.plist Support
[loaded] com.teamviewer.Helper.plist Support
[invalid?] com.teamviewer.teamviewer_service.plist Support
[loaded] org.macosforge.xquartz.privileged_startx.plist Support
User Launch Agents: ℹ️
[loaded] com.google.keystone.agent.plist Support
[running] com.microsoft.LaunchAgent.SyncServicesAgent.plist Support
[running] com.parallels.mobile.startgui.launchagent.plist Support
[not loaded] org.virtualbox.vboxwebsrv.plist Support
User Login Items: ℹ️
iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
Moveslink2 Application (/Applications/Moveslink2.app)
Quicksilver Application (/Applications/Quicksilver.app)
Google Drive Application (/Applications/Google Drive.app)
Google Chrome ApplicationHidden (/Applications/Google Chrome.app)
Dropbox UNKNOWN (missing value)
EvernoteHelper Application (/Applications/Evernote.app/Contents/Library/LoginItems/EvernoteHelper.app)
Internet Plug-ins: ℹ️
SharePointBrowserPlugin: Version: 14.1.3 - SDK 10.6 Support
FlashPlayer-10.6: Version: 15.0.0.189 - SDK 10.6 Support
Flash Player: Version: 15.0.0.189 - SDK 10.6 Support
Flip4Mac WMV Plugin: Version: 3.0.0.126 - SDK 10.8 Support
QuickTime Plugin: Version: 7.7.3
Default Browser: Version: 600 - SDK 10.10
User Internet Plug-ins: ℹ️
Google Earth Web Plug-in: Version: 7.1 Support
Safari Extensions: ℹ️
AdBlock
OpenIE
Facebook Photo Zoom
Translate
1-ClickWeather
3rd Party Preference Panes: ℹ️
Flash Player Support
Flip4Mac WMV Support
Time Machine: ℹ️
Time Machine not configured!
Top Processes by CPU: ℹ️
7% WindowServer
1% fontd
1% Google Drive
0% Microsoft Database Daemon
0% AppleSpell
Top Processes by Memory: ℹ️
180 MB Google Drive
86 MB mds_stores
86 MB SyncServicesAgent
86 MB Google Chrome
86 MB Finder
Virtual Memory Information: ℹ️
2.25 GB Free RAM
2.84 GB Active RAM
2.56 GB Inactive RAM
936 MB Wired RAM
3.88 GB Page-ins
74 KB Page-outsYou have nearly run out of disk space. Either purchase a larger one or start cleaning out the one you have?
-
Applet very slow and shows no activity, but its running
I have a new applet for the users, but I am reluctant to implement until I get some others opinions. It is very slow (30 - 40 seconds)
Before it outputs a screen with about 20 lines, it reads 90 different html files. It looks at the forth rec of each to extract a name. It also gets the file size to determine if the record needs to be on the screen.
Anyway, it does 4 reads on 90 files. = 360 reads. Oops, it also reads and loads a 80 record file at the beginning. So total is 440 reads.
It takes 30 - 40 seconds. Which is not horrible, but it is not good. What really bothers me is that the applet screen shows no activity. At the bottom is shows "done" and "100%". Task Manager shows no activity. But if you just let it sit there, it will finally fill the screen. Pretty amazing to me. I would much rather see a "progress bar" moving on the bottom like other screens. Actually, a progress bar would solve it, because the users are not in a big hurry anyway.
I am using "openStream" and "readLine" for the files.
Any opinions?
import javax.swing.*;
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import java.net.*;
import java.io.*;
import java.util.*;
public class urlaa extends JApplet
//zz implements Runnable, ActionListener
implements ActionListener
// zz added
private JLabel item;
private JList itemList;
int par;
int errorflag = 0 ;
int orgsize = 14900 ;
String par1;
String s;
String e1;
String e2;
String e3;
String w1;
String w2;
String w3;
String w4;
int i = 0;
int len ;
int size ;
String stringsize ;
URLConnection conn ;
int i2 = 0 ;
int k = 0;
int current = 0;
String s1 ;
String s6 ;
String s7 ;
String s8 ;
String printline ;
String pageLink;
String arr[] = new String[150] ;
String arr2[] = new String[150] ;
String arr3[] = new String[150] ;
int arr4[] = new int[150] ;
String inputLine;
Thread runner;
public void init()
String parameter = getParameter("par1");
if (parameter != null)
par = Integer.parseInt(parameter);
else
par = 99;
// zz Button goButton = new Button("Go");
// zz goButton.addActionListener(this);
// zz add(goButton);
// zz added
this.item = new JLabel();
this.addButton();
Container container = this.getContentPane();
this.itemList = this.getList();
container.add(this.getPanel());
URL u;
InputStream wis = null;
DataInputStream dis;
int rcnt = 0;
int rcn2 = 0;
// 1) read filelist.txt file
// and load into a table.
// 2) close the filelist.txt file
// 3) Use the tabled file names to
// read and see if the bio
// has been done
// 1) Read filelist.txt and load table
try
u = new URL("http://www.classof1961.mysite.com/filelist.txt");
catch (MalformedURLException e)
errorflag = 1 ; // set error flag to stop while loops
e1 = ("FILELIST.TXT MalformedURLException: " + e.getMessage()) ;
try
u = new URL("http://www.classof1961.mysite.com/filelist.txt");
wis = u.openStream();
catch (IOException ioe)
errorflag = 1 ; // set error flag to stop while loops
e1 = ("FILELIST.TXT IOException : " + ioe.getMessage()) ;
// does not work size = wis.getContentLength() ;
// Convert the inputStream to a buffered DatainputStream.
dis = new DataInputStream(new BufferedInputStream(wis));
// Read 1st record to set up while loop
try
s1 = dis.readLine() ; // get 1st rcd
catch (IOException ioe)
errorflag = 1 ; // set error flag to stop while loops
e3 = ("FILELIST.TXT IOException : " + ioe.getMessage()) ;
while (s1 != null)
{ // load file names loop
if (errorflag == 0)
{ // if errors
arr[i] = s1 ;
i++ ;
try
s1 = dis.readLine() ;
catch (IOException ioe)
errorflag = 1 ; // set error flag to stop while loops
s1 = null ; // force end of loop
e3 = ("load table read failed" + ioe) ;
rcnt++ ;
if (rcnt > 100) // test code
{ // test code
errorflag = 1;
s1 = null ;
e3 = "Load table is looping!!" ;
} // end of error check loop
} // end of table load loop
int lasttableentry = i ; //
// CLOSE the filelist.txt file
try
wis.close();
catch (IOException ioe)
errorflag = 1 ; // set error flag to stop while loops
e3 = ("close of filelist.txt file failed" + ioe) ;
// End of filelist read and load and close
// ptr to whats new names in table arr
i = 0 ;
// While more names in table,
// Connect and Open file
// Read file until 4th rcd (rel 3rd rcd)
// if rcd has date, then move it to table
// else
// bump to next file name
w1 = arr[i] ;
w2 = w1.substring(1, 4) ; // ONLY USED FOR CHK FOR XXXX
// ______________ start of major loop _____________
boolean morenames = true ;
while (morenames)
{ // Name table loop
if (errorflag == 0)
{ //if no errors
try
u = new URL(w1);
try
URLConnection conn ;
conn = u.openConnection();
size = conn.getContentLength();
catch (IOException e)
errorflag = 4 ;
morenames = false ;
e1 = ("file size logic failed " + w1) ;
catch (MalformedURLException e)
errorflag = 1 ; // set error flag to stop while loops
morenames = false ;
e1 = ("next whats new url error : " + w1) ;
// compile error break ;
try
u = new URL(w1) ;
wis = u.openStream();
catch (IOException e)
errorflag = 1 ; // set error flag to stop while loops
morenames = false ;
e2 = ("next whats new open error : " + w1) ;
// compile error break ;
// Convert the inputStream to a buffered DatainputStream.
dis = new DataInputStream(new BufferedInputStream(wis));
if (errorflag == 0)
{ //if no errors
try
// does not work String s2 = dis.readLine(3) ;
s1 = dis.readLine() ;
s1 = dis.readLine() ;
s1 = dis.readLine() ;
s1 = dis.readLine() ;
catch (IOException e)
errorflag = 1 ; // set error flag to stop while loops
morenames = false ;
e2 = "whats new file MalformedURLException: " ;
// file is larger than original non-bio file size
if (size > orgsize) // if file size > original file size
String s2a = s1.substring(0, 5);
String s3 = " " ;
// Only look at title records to get the name
if (s2a.equals("<titl"))
int k2 = 7 ;
int l = k2 + 1 ;
while (!s1.substring(k2, l).equals("<"))
k2++ ;
l++ ;
s3 = s1.substring(7, k2) ;
else
s3 = " " ;
// s3 now has blanks or the name
arr2[k] = w1 ; // move name into arr2 (link to bio)
arr3[k] = s3 ; // move name into arr3 (bio name)
arr4[k] = size ; // move in file size
k++ ;
} // end of if length > 36
} // end of chk for error flag zero (no errors)
// now we have to close this whats new file
// CLOSE the current whats new file
try
wis.close();
catch (IOException ioe)
errorflag = 1 ; // set error flag to stop while loops
morenames = false ;
e3 = ("close of the current whats new file failed" + ioe) ;
// end of the close
rcn2++ ;
if (rcn2 > 100) // test code
{ // test code
errorflag = 2;
morenames = false ;
e3 = "Searching files is looping!!" ;
i++ ; // bump to next whats up name
w1 = arr[i] ; // load it into work string
if (i > lasttableentry)
morenames = false ;
} // end of error checking loop
else
morenames = false ;
} // end major name table loop
// CLOSE the last whats new file
try
wis.close();
catch (IOException ioe)
errorflag = 1 ; // set error flag to stop while loops
e3 = ("close of last whats new file failed" + ioe) ;
// end of init
// _________________ other methods ______________________
// zz added
private JList getList() {
// Create a List
JList tempList = new JList(arr3);
tempList.setVisibleRowCount(3);
// Enable single selection
tempList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
return tempList;
private JButton addButton() {
JButton button = new JButton("Select Item below and click here to go to the bio");
button.addActionListener(this);
return button;
private JPanel getPanel() {
// set layout to GridLayout 3 rows and 1 columns, no separations
JPanel panel = new JPanel(new GridLayout(3,1,0,0));
JScrollPane spane1 = new JScrollPane(this.itemList);
panel.add(this.addButton());
panel.add(spane1);
panel.add(this.item);
// panel.add(new JLabel("Example List"));
return panel;
// _______________ actionPerformed method ____________________
public void actionPerformed(ActionEvent evt)
s8 = "actionPerformed";
// zz added
String command = evt.getActionCommand();
// Get the selected value from the list and update the JLabel
item.setText((String)itemList.getSelectedValue());
// try to redirect to selected url
try
int idx = itemList.getSelectedIndex() ;
String urlvalue = this.arr2[idx] ;
URL u = new URL(urlvalue);
this.getAppletContext().showDocument(u, "_self");
catch(Exception e)
}jagossage wrote:
But if you just let it sit there, it will finally fill the screen. Pretty amazing to me. The onus is on you, the developer, to decide how to distract your users as they wait for your code to finish. Why should you expect something to do it for you?
I would much rather see a "progress bar" moving on the bottom like other screens.Ah, I think I see where you're confused. The progress bar and applet loading subtitles, etc are Java's way of presenting the progress of loading the applet. Once it's fully loaded, though (which it is when your code starts running), it hands off control to you. It's in your hands at that point.
Maybe you are looking for
-
Customer Service botched Pricematch, no recourse
This has been a nightmare for the past 2 months. To avoid a lengthy paragraph that would prove difficult to read, here's what happened, line by line: 1. Saw Soleus Mini GPS watch on BestBuy.com for $99.99, total w/tax $108.862. Ordered while using a
-
How to use conditional success Screen in SMP2.3 HWC?
Hi All, Do anybody have reference for conditional success screen, I gone through this link SUP 2.2 Conditional Navigation Issue but i didnt able to do how to use conditional success Screen. If anybody have reference please provide me. Regards, Srav
-
User manual in PDF for AcrobatPro8 - where to find it?
I tried to print the Help of AcrobatPro8 however could not find an option to print whole manual as it is, for example, with Illustrator where you can get the whole manual in a neat PDF format. The only way to print anything from the very large Help m
-
After system restore, old files taking up too much space on TM drive...
Time Machine just saved my *** this AM, some sort of a system error while I was repairing permissions, I used the System Restore on TM, and when it all came back, my TM drive is too full to continue using. Is is safe to re-format the drive and start
-
Hi All, as an example, through Goods Receipt Purchase Order (e.g item 'x' quantity 10 price 2 euros =20 euros). If finally I get from vendor a Purchase invoice (copy from) with item 'x' quantity 10 price 1 euros =10 euros I should expect to see that