Problem with small java program

need some help with a small Java assignment I am doing.
When I compile the code i get 2 errors they are
invalid method declaration: return type required
public CreateRandomFile() LINE 87
^
cannot resolve symbol
new CreateRandomFile(); LINE 112
^
Any help is greatly appreciated
**********CODE BEGINS HERE ***********************
import javax.swing.*;
import java.io.*;
import BreezySwing.*;
public class RandomTest extends GBFrame
JLabel accLabel = addLabel("Account Number",1,1,1,1);
IntegerField accField = addIntegerField(0,1,2,1,1);
JLabel firstLabel = addLabel("First Name",2,1,1,1);
JTextField firstField = addTextField("",2,2,1,1);
JLabel lastLabel = addLabel("Last Name",3,1,1,1);
JTextField lastField = addTextField("",3,2,1,1);
JTextArea resultArea = addTextArea("",4,1,2,3);
JButton acceptButton = addButton("Accept",7,1,2,1);
JButton accessButton = addButton("Access",8,1,2,1);
JButton clearButton = addButton("Clear",9,1,2,1);
private RandomAccessFile file;
public void buttonClicked(JButton buttonObj)
if (buttonObj == acceptButton)
else
if (buttonObj == accessButton)
else
accField.setNumber(0);
resultArea.setText("");
firstField.setText("");
lastField.setText("");
private void openFile()
FileOutputStream foStream = new FileOutputStream ("acc.dat");
ObjectOutputStream doStream = new ObjectOutputStream (foStream);
if ("acc.dat" == null || "acc.dat".equals(""))
System.out.println("Invalid File Name");
else
try{
file = new RandomAccessFile ("acc.dat","rw");
catch (IOException e)
System.out.println("File does not exist or Invalid File Name");
private Record getRecord()
Record record = new Record();
int accountNumber;
try{
accountNumber = Integer.parseInt(accField.getText());
if (accountNumber <1 || accountNumber >100)
System.out.println("Account doesn't exist");
return null;
file.seek((accountNumber -1)*Record.size());
record.read(file);
catch (NumberFormatException nfe)
System.out.println("Account does not exist");
System.out.println("Invalid Number Format");
catch (IOException io)
System.out.println("Error reading file");
return record;
public createRandomFile() // <----- ERROR HERE
Record blank = new Record();
openFile();
try{
file = new RandomAccessFile("acc.dat", "rw");
for (int i=0;i<100;i++)
blank.write(file);
System.exit(0);
catch (IOException e )
System.out.println("File doesn't exist");
System.out.println("Invalid File Name");
System.exit(1);
public static void main(String args[])
JFrame tpo = new RandomTest();
tpo.setTitle("Assignment 1");
tpo.setSize(200,330);
tpo.setVisible(true);
new createRandomFile(); // <--- ERROR HERE
}

I changed the things you suggested by have a new error of
cannot resolve symbol
symbol : method createRandomFile ()
location: class javax.swing.JFrame
tpo.createRandomFile();
^
**************new code here***************************
import javax.swing.*;
import java.io.*;
import BreezySwing.*;
public class RandomTest extends GBFrame
     JLabel accLabel = addLabel("Account Number",1,1,1,1);
     IntegerField accField = addIntegerField(0,1,2,1,1);
     JLabel firstLabel = addLabel("First Name",2,1,1,1);
     JTextField firstField = addTextField("",2,2,1,1);
     JLabel lastLabel = addLabel("Last Name",3,1,1,1);
     JTextField lastField = addTextField("",3,2,1,1);
JTextArea resultArea = addTextArea("",4,1,2,3);
JButton acceptButton = addButton("Accept",7,1,2,1);
JButton accessButton = addButton("Access",8,1,2,1);
     JButton clearButton = addButton("Clear",9,1,2,1);
     private RandomAccessFile file;
public void buttonClicked(JButton buttonObj)
     if (buttonObj == acceptButton)
     else
     if (buttonObj == accessButton)
     else
     accField.setNumber(0);
     resultArea.setText("");
     firstField.setText("");
     lastField.setText("");
private void openFile()
     FileOutputStream foStream = new FileOutputStream ("acc.dat");
     ObjectOutputStream doStream = new ObjectOutputStream (foStream);
     if ("acc.dat" == null || "acc.dat".equals(""))
     System.out.println("Invalid File Name");
     else
     try{
          file = new RandomAccessFile ("acc.dat","rw");
     catch (IOException e)
          System.out.println("File does not exist or Invalid File Name");
private Record getRecord()
     Record record = new Record();
     int accountNumber;
     try{
          accountNumber = Integer.parseInt(accField.getText());
     if (accountNumber <1 || accountNumber >100)
          System.out.println("Account doesn't exist");
          return null;
     file.seek((accountNumber -1)*Record.size());
     record.read(file);
     catch (NumberFormatException nfe)
     System.out.println("Account does not exist");
     System.out.println("Invalid Number Format");
     catch (IOException io)
          System.out.println("Error reading file");
return record;
public void createRandomFile()
Record blank = new Record();
openFile();
try{
     file = new RandomAccessFile("acc.dat", "rw");
     for (int i=0;i<100;i++)
     blank.write(file);
     System.exit(0);
catch (IOException e )
     System.out.println("File doesn't exist");
     System.out.println("Invalid File Name");
     System.exit(1);     
public static void main(String args[])
JFrame tpo = new RandomTest();
tpo.setTitle("Assignment 1");
tpo.setSize(200,330);
tpo.setVisible(true);
tpo.createRandomFile();
}     

Similar Messages

  • Problem with running java program

    Hey again!
    I missed out some information in last posting.. here is the full description
    I have just installed 1.5.0_06 and have set paths and what otherwise is necessary to run the java programs. I was testing the install and run a standard HelloWorld.java program
    I got the following error:
    Exception in thread main java.lang.NoClassDefFoundError: HelloWorld
    what is wrong...
    Here is the entire HelloWorld.java
    public class HelloWorld
    public HelloWorld()
    System.out.println("Hello World");
    public static void main(String[] args)
    HelloWorld hw = new HelloWorld();
    I have checked that the path is correct too..
    Hopefully someone can help me!
    Anders

    Your Path is set, probably the problem is classpath.
    Change the cmd/command prompt to the directory that contains your HelloWorld.class file, verifying that it exists. If it does, issue this command from that directory:
    java -cp . HelloWorld
    Important: include the period and surrounding spaces
    If that works, you can learn about setting and using the classpath here:
    http://java.sun.com/j2se/1.5.0/docs/tooldocs/index.html#general
    By the way, just add a reply to your original post with the additional information, rather than creating another post. That eliminates duplication of replies.

  • Problem with a java program "the game five in a row"

    http://leepoint.net/notes-java/examples/games/five/five.html
    how to run this program and c the output

    i.arnav wrote:
    no i want it in java programming only
    plz help me how to run it if thr are any errorsI'm having a difficult time understanding your posts. THR? The Hollywood Reporter? Total Hip Replacement?The High Road (firearms forum)?

  • Problem with a wrapper program.

    Hi all,
    we are facing problem with a wrapper program,through which we are calling three different xml reports.
    when we independently submit these xml reports thorugh front end .
    All the three programs run successfully & gives the desired output.
    but when we run this through wrapper program.
    All ths three programs run successfully ,but don't give output,i.e. output file comes as blank.
    when I 'VIEW DETAILS" on the SRS window, the only difference between the independent program & the report through wrapper program is the 'UPON COMPLETION..'part.
    The 'UPON COMPLETION..'part. for the independent program shows the RTF Template Layout name ,while the program submitted through the wrapper program doesn't show the layout name.
    i have registered all the three reports as XML REPORTS,while the wrapper program as "package_name.procedure_name" & 'TEXT' as an output format.
    can anybody tell us , the problem??
    thanks.

    Wow, that's a lot of work. This isn't any different than PL/SQL in the real Oracle world. Parameters are named or positional. Named input uses the assignment operator of =>. Positional takes them in order per the procedure/function signature. In SQL*Plus, do a desc on fnd_request (owned by apps) and tell us what the "default" column represents.
    If you have been typing in all arguments, figure out how many times you've done that, how much time it took, multiply it by your hourly rate, and then tell your manager you owe your company that amount of money for having wasted so much time.
    function submit_request (
                     application IN varchar2 default NULL,
                     program     IN varchar2 default NULL,
                     description IN varchar2 default NULL,
                     start_time  IN varchar2 default NULL,
                     sub_request IN boolean  default FALSE,
                     argument1   IN varchar2 default CHR(0),
                     argument2   IN varchar2 default CHR(0),
                       argument3   IN varchar2 default CHR(0),
                     argument4   IN varchar2 default CHR(0),
                     argument5   IN varchar2 default CHR(0),
                     argument6   IN varchar2 default CHR(0),
                     argument7   IN varchar2 default CHR(0),
                     argument8   IN varchar2 default CHR(0),
                     argument9   IN varchar2 default CHR(0),
                     argument10  IN varchar2 default CHR(0),
                     argument11  IN varchar2 default CHR(0),
                     argument12  IN varchar2 default CHR(0),
                       argument13  IN varchar2 default CHR(0),
                     argument14  IN varchar2 default CHR(0),
                     argument15  IN varchar2 default CHR(0),
                     argument16  IN varchar2 default CHR(0),
                     argument17  IN varchar2 default CHR(0),
                     argument18  IN varchar2 default CHR(0),
                     argument19  IN varchar2 default CHR(0),
                     argument20  IN varchar2 default CHR(0),
                     argument21  IN varchar2 default CHR(0),
                     argument22  IN varchar2 default CHR(0),
                       argument23  IN varchar2 default CHR(0),
                     argument24  IN varchar2 default CHR(0),
                     argument25  IN varchar2 default CHR(0),
                     argument26  IN varchar2 default CHR(0),
                     argument27  IN varchar2 default CHR(0),
                     argument28  IN varchar2 default CHR(0),
                     argument29  IN varchar2 default CHR(0),
                     argument30  IN varchar2 default CHR(0),
                     argument31  IN varchar2 default CHR(0),
                     argument32  IN varchar2 default CHR(0),
                       argument33  IN varchar2 default CHR(0),
                     argument34  IN varchar2 default CHR(0),
                     argument35  IN varchar2 default CHR(0),
                     argument36  IN varchar2 default CHR(0),
                     argument37  IN varchar2 default CHR(0),
                       argument38  IN varchar2 default CHR(0),
                     argument39  IN varchar2 default CHR(0),
                     argument40  IN varchar2 default CHR(0),
                     argument41  IN varchar2 default CHR(0),
                       argument42  IN varchar2 default CHR(0),
                     argument43  IN varchar2 default CHR(0),
                     argument44  IN varchar2 default CHR(0),
                     argument45  IN varchar2 default CHR(0),
                     argument46  IN varchar2 default CHR(0),
                     argument47  IN varchar2 default CHR(0),
                       argument48  IN varchar2 default CHR(0),
                     argument49  IN varchar2 default CHR(0),
                     argument50  IN varchar2 default CHR(0),
                     argument51  IN varchar2 default CHR(0),
                       argument52  IN varchar2 default CHR(0),
                     argument53  IN varchar2 default CHR(0),
                     argument54  IN varchar2 default CHR(0),
                     argument55  IN varchar2 default CHR(0),
                     argument56  IN varchar2 default CHR(0),
                     argument57  IN varchar2 default CHR(0),
                     argument58  IN varchar2 default CHR(0),
                     argument59  IN varchar2 default CHR(0),
                     argument60  IN varchar2 default CHR(0),
                     argument61  IN varchar2 default CHR(0),
                     argument62  IN varchar2 default CHR(0),
                       argument63  IN varchar2 default CHR(0),
                     argument64  IN varchar2 default CHR(0),
                     argument65  IN varchar2 default CHR(0),
                     argument66  IN varchar2 default CHR(0),
                     argument67  IN varchar2 default CHR(0),
                     argument68  IN varchar2 default CHR(0),
                     argument69  IN varchar2 default CHR(0),
                     argument70  IN varchar2 default CHR(0),
                     argument71  IN varchar2 default CHR(0),
                     argument72  IN varchar2 default CHR(0),
                       argument73  IN varchar2 default CHR(0),
                     argument74  IN varchar2 default CHR(0),
                     argument75  IN varchar2 default CHR(0),
                     argument76  IN varchar2 default CHR(0),
                     argument77  IN varchar2 default CHR(0),
                     argument78  IN varchar2 default CHR(0),
                     argument79  IN varchar2 default CHR(0),
                     argument80  IN varchar2 default CHR(0),
                     argument81  IN varchar2 default CHR(0),
                     argument82  IN varchar2 default CHR(0),
                       argument83  IN varchar2 default CHR(0),
                     argument84  IN varchar2 default CHR(0),
                     argument85  IN varchar2 default CHR(0),
                     argument86  IN varchar2 default CHR(0),
                     argument87  IN varchar2 default CHR(0),
                     argument88  IN varchar2 default CHR(0),
                     argument89  IN varchar2 default CHR(0),
                     argument90  IN varchar2 default CHR(0),
                     argument91  IN varchar2 default CHR(0),
                     argument92  IN varchar2 default CHR(0),
                       argument93  IN varchar2 default CHR(0),
                     argument94  IN varchar2 default CHR(0),
                     argument95  IN varchar2 default CHR(0),
                     argument96  IN varchar2 default CHR(0),
                     argument97  IN varchar2 default CHR(0),
                     argument98  IN varchar2 default CHR(0),
                     argument99  IN varchar2 default CHR(0),
                     argument100  IN varchar2 default CHR(0))
                     return number;

  • Problem with Small Caps

    I have a problem with small caps when using Times New Roman and Helvetica, but not when using Adobe Garamond Pro, and would like to find out why.
    I generate the small caps within InDesign by the "TT" box in the Control Window. Adobe Garamond comes up with beautiful small caps that blend in with the surrounding text. When I do the same with Helvetica, the small caps, especially if they have normal caps amongst them, are quite inelegant looking because of different letter widths.
    So I did some experiments with half a dozen other serif and sans-serif fonts and none of them were as elegant as Adobe Garamond Pro. For a sample of what I mean, download:
    http://www.mediafire.com/?z5fm0zndmzm
    which compares three fonts: Adobe Garmond, Heletica, and Times New Roman.
    Unfortunately, I did not pick up this problem until I received my first proof from the printers, and now I will have to change all the Helvetica small caps to normal caps, as I can see no other way of overcoming this inelegancy.
    I checked in New Scientist magazine (it uses a serif and sans-serif font throughout, and what I thought I remembered as small caps to begin their stories) to see what they do, but they actually use caps instead of small-caps at the beginning of stories.
    Three questions:
    Q1: Is the way I generate small caps the correct way?
    Q2: Is there something wrong with my Helvetica and Times New Roman fonts?
    Q3: Could it be that only Adobe Garamond has an internal, properly designed small caps?
    I have checked the attributes of the fonts: Garamond is Open Type Postscript, Helvetica is PostScript Type 1 , and Times New Roman is TrueType.
    Any comments most appreciated.

    Thanks for the hints. I tried Scott's method and it works with a bit of extra adjustment. The settings I obtained for 12 point Helvetica were:
    Horizontal and vertical scaling: 70.5%;
    Stroke: 0.1 pt
    Tracking: +25 em
    Baseline shift: +0.1 pt
    The steps to obtain small-caps 12 pt Helvetica are:
    Step 1: Type text as normal.
    Step 2: Select only the lower-case text you want to convert to small caps. i.e if what is to become small caps already has a capital (such as a place name) do not apply the settings to the capitals, unless that's the effect you want.
    Step 3: Apply the above settings manually or via or Character Style.
    Problem 1: How do I rid my Character Style of the font size so that only the scaling factors remain? As it is, if I want to apply small-caps to a different font size than the one I have set up, I have to manually change the font size after applying the style.
    Problem 2: The scaling factors do not appear to work for changes in font size. When I used 24 pt and applied the above settings, the small-caps were too thin. The method only really works for a particular size, which in reality is all you would normally require.

  • Solution Manager systems RAM requirements - problems with the Java Engine

    Hello,
    I am about to install SAP Solution Manager 7 on a WIndows 2003 Server x64 but I need to know what the RAM requirements are? I have been having problems with the Java Engine starting and it seems to time out, I have heard that this is a very RAM hungry process and it might be why?
    Many thanks for your help in advance,
    Omar

    Hello Omar,
    To size SAP Solution Manager 7.0 EHP1 we recommend to use the SAP Solution Manager Quicksizer Tool at:
    http://service.sap.com/sizing-solman
    Here you find information on how to use the tool, how to collect input data for E2E Scenario Sizing, on SAP E2E RCA Sizing, Introscope Tuning, Wily Enterprise Manager Cluster Setup for E2E RCA Scenario and BI Aggregation Strategy in E2E Scenario.
    Please find more information about installing Solution Manager in:
    http://service.sap.com/instguides -> SAP Solution Manager
    I hope this information helps.
    Thanks,
    Mark

  • Problem with a compiled program

    Hello,
    I have a problem with a compiled program on labview 6i.
    This program used a serial port (COM1 or COM2).
    During the launching of the ".exe ", a fatal error occurs.
    Here this error:
    => APPLICATION caused an invalid page fault in
    => module LVRT.DLL at 0167:30164426.
    Can somebody help me?
    Regards
    Cedric

    Cedric,
    This problem was fixed in the LabVIEW 6.0.2 update. You can download this update (along with the updated runtime engine) from our website.
    Good luck with your application, and have a pleasant day.
    Sincerely,
    Darren N.
    NI Applications Engineer
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Problem with my itunes program

    i have a ipod shuffle and i have a big problem with my itunes program, he refuse to read cd so i cant put music on my ipod anymore. please help me with that cause now my ipod has become completly unusable.

    Im able to download the setup but it keeps on giving this message: there is a problem with this windows installer package. a program required for this  install this to complete could not be run
    Perhaps let's first try updating your Apple Software Update.
    Launch Apple Software Update ("Start > All Programs > Apple Software Update"). Does it launch and offer you a newer version of Apple Software Update? If so, choose to install just that update to Apple Software Update. (Deselect any other software offered at the same time.)
    If the ASU update goes through okay, try another iTunes install. Does it go through without the errors this time?

  • I have problems with all doqnloaded programs, keynote, pages and adope reader all the sudden. what causes and how it solve?

    I have problem with all downloaded programs all the sudden, keynote, pages and adobe reader. what could be the reason and solution?

    There is no Adobe Reader for the iPad.
    You're going to have to be much more specific to get help - what kind of problems are you having with the apps?

  • Problems with installing new programs

    Dear all,
    since the update to OS X Yosemite, I have some problems with installing new programs.
    I tried to install the Fitbit App to connect my Fitbit to my Mac but the program can't be started after installation. I have the same problem with Blackberry Blend, too. I am able to install it but it doesn't start running.
    Does anybody have an idea what's the problem?
    Thank You,
    Lisa.

    Did you receive any errors during the installation itself or does this happen when you try to open Photoshop?

  • JCoIDoc IDocLibrary 3.0.2 Problems with IDocServerExample.java

    Hello, I´m facing a problem with IDocServerExample.java. I created a new project in eclipse, added the package com.sap.conn.idoc.examples and the class IDocServerExample.java. I configured the files "MYSERVER.jcoServer" and "BCE.jcoDestination" and started the application. Then I get the following error messages: *********************************************************************************************************************************************************
    com.sap.conn.jco.JCoException: (102) RFC_ERROR_COMMUNICATION: Unable to get repository at com.sap.conn.jco.rt.DefaultServer.update(DefaultServer.java:136) at com.sap.conn.jco.rt.DefaultServer.(DefaultServer.java:105) at com.sap.conn.idoc.jco.DefaultJCoIDocServer.(DefaultJCoIDocServer.java:35) at com.sap.conn.idoc.jco.DefaultJCoIDocServerFactory.createServer(DefaultJCoIDocServerFactory.java:17) at com.sap.conn.idoc.jco.DefaultJCoIDocServerFactory.createServer(DefaultJCoIDocServerFactory.java:13) at com.sap.conn.jco.rt.DefaultServerManager.getServer(DefaultServerManager.java:108) at com.sap.conn.jco.rt.StandaloneServerFactory.getServerInstance(StandaloneServerFactory.java:170) at com.sap.conn.idoc.jco.JCoIDoc.getServer(JCoIDoc.java:78) at com.sap.conn.idoc.examples.IDocServerExample.main(IDocServerExample.java:18) Caused by: com.sap.conn.jco.JCoException: (102) RFC_ERROR_COMMUNICATION: Connect to message server host failed Connection parameters: TYPE=B DEST=JCOSERVER01 MSHOST=arm115tx GROUP=PUBLIC R3NAME=T01 PCS=1 LOCATION CPIC (TCP/IP) on local host rz1462 with Unicode ERROR service '?' unknown TIME Tue Jul 07 09:09:40 200 RELEASE 711 COMPONENT NI (network interface) VERSION 39 RC -3 DETAIL NiErrSet COUNTER 2 at com.sap.conn.jco.rt.MiddlewareJavaRfc.generateJCoException(MiddlewareJavaRfc.java:615) at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.connect(MiddlewareJavaRfc.java:1280) at com.sap.conn.jco.rt.ClientConnection.connect(ClientConnection.java:661) at com.sap.conn.jco.rt.PoolingFactory.init(PoolingFactory.java:103) at com.sap.conn.jco.rt.ConnectionManager.createFactory(ConnectionManager.java:171) at com.sap.conn.jco.rt.DefaultConnectionManager.createFactory(DefaultConnectionManager.java:44) at com.sap.conn.jco.rt.ConnectionManager.getFactory(ConnectionManager.java:160) at com.sap.conn.jco.rt.RfcDestination.initialize(RfcDestination.java:789) at com.sap.conn.jco.rt.RfcDestination.getSystemID(RfcDestination.java:817) at com.sap.conn.jco.rt.RepositoryManager.getRepository(RepositoryManager.java:32) at com.sap.conn.jco.rt.RfcDestination.getRepository(RfcDestination.java:891) at com.sap.conn.jco.rt.DefaultServer.update(DefaultServer.java:132) ... 8 more Caused by: RfcException: [null] message: Connect to message server host failed Connection parameters: TYPE=B DEST=JCOSERVER01 MSHOST=arm115tx GROUP=PUBLIC R3NAME=T01 PCS=1 LOCATION CPIC (TCP/IP) on local host rz1462 with Unicode ERROR service '?' unknown TIME Tue Jul 07 09:09:40 200 RELEASE 711 COMPONENT NI (network interface) VERSION 39 RC -3 DETAIL NiErrSet COUNTER 2 Return code: RFC_FAILURE(1) error group: 102 key: RFC_ERROR_COMMUNICATION at com.sap.conn.rfc.engine.RfcIoControl.error_end(RfcIoControl.java:255) at com.sap.conn.rfc.engine.RfcIoControl.ab_rfcopen(RfcIoControl.java:94) at com.sap.conn.rfc.api.RfcApi.RfcOpen(RfcApi.java:83) at com.sap.conn.jco.rt.MiddlewareJavaRfc$JavaRfcClient.connect(MiddlewareJavaRfc.java:1273) ... 18 more
    Does anyone know what I´m doing wrong? With thanks, Veit

    Im having the same issue here.  Has anyone found a solution to this?

  • Problem with my Library Program (mouse clics and keyboard strokes not work

    <blockquote>Locked by Moderator as a duplicate/re-post.
    Please continue the discussion in this thread: [/forum/1/688186]
    Thanks - c</blockquote>
    == Issue
    ==
    I have another kind of problem with Firefox
    == Description
    ==
    I work in a library in Saint-Raphaël France. We have a full web program placed on our server named Vubis Smart (Infor Society) to manage the books (our database). When using Firefox to access from remote machines every 3 mouse clics, only one is functional ; second problem when i type on the keyboard every 3to6 letters, a letter did not appear. With Microsoft internet explorer no problems. This problem appears only in our computers (not in the other libraries). Windows vista pro sp2. Dual core e5300, RAM2Go. Antivirus Trend Office Scan. How can i analyse this fact ? Thanx for your help, as i realy want to use Firefox instead of IR(Bleahh).
    == This happened
    ==
    Every time Firefox opened
    == we started using Firefox
    ==
    == Troubleshooting information
    ==
    no extension used. Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9.2) Gecko/20100115 Firefox/3.6
    == Firefox version
    ==
    3.6
    == Operating system
    ==
    Windows Vista
    == User Agent
    ==
    Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9.2) Gecko/20100115 Firefox/3.6
    == Plugins installed
    ==
    *-Default Plug-in
    *Shockwave Flash 10.0 r12
    *Picasa plugin
    *3.0.50106.0
    *Windows Presentation Foundation (WPF) plug-in for Mozilla browsers
    *Java Plug-in 1.6.0_11 for Netscape Navigator (DLL Helper)
    *Java(TM) Platform SE binary
    *Adobe PDF Plug-In For Firefox and Netscape
    *The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.

    i solved my problem myself  !!
    you have to reset NVRAM  and  SMC  on your macBook !
    you can find the instruction by search in apple website .!

  • Performance problems with new Java Tiger style recommendations

    Performance problems with jdk 1.5 on Linux plattform
    (not tested on Windows, might be the same)
    using the new style recommendations.
    I need fast Vector loops for high speed mathematical calculations, some
    hints about the fastest way to program that loop would be also great!
    After refactoring using the new features from java 1.5 (as recommended from
    SUN) I lost performance significantly:
    using a vector:
    public Vector<unit> units;
    The new code (recommended from SUN for Java Tiger for redesign):
    for (unit u: units) u.accumulate();
    runs more than 30% slower than the old code:
    for (int i = 0; i < units.size(); i++) units.elementAt(i).accumulate();
    I expected the opposite.
    Is there any information available that helps?
    The following additional information I got from Mr. Shankar Unni:
    I got some fairly anomalous results comparing ArrayList and Vector: for the
    1.5-style loops, ArrayList was faster then Vector, but for a loop with get()
    calls, Vector was faster. Vector was even faster than that using
    elementAt(), which was a surprise:
    For a million summing iterations over a 100-element array:
    vector elementAt loop took 3446 ms.
    vector get loop took 3796 ms.
    vector iterator loop took 5469 ms.
    arraylist get loop took 4136 ms.
    arraylist iterator loop took 4668 ms.

    If your topic doesn't change, please stay in your original post.

  • Problems running a java program

    Hello,
    I have absolutely no java experience whatsoever, and I need to fix a program that suddenly stopped running properly after several years without problems. Basically, I have a perl script that calls a java program. Everytime I run this perl script from the web browser, the java program returns an internal error:
    # # HotSpot Virtual Machine Error, Internal Error # Please report this error at # http://www.blackdown.org/cgi-bin/jdk # # Error ID: 5649525455414C53504143450E4350500024 # # Problematic Thread: prio=5 tid=0x804e680 nid=0x6d16 runnable #
    However, when I run the perl script command line, it runs fine. I added the -verbose option to the java call, and I discovered that the program stops running after it opens the .jar files but before it loads them .... these files have full read permissions, so I don't think that's the problem. Any ideas?
    Thanks!

    ...fix a program that suddenly stopped running properly after several years without problems.Which means either the program changed or the environment changed. I would guess the environment. The most likely possibilities: new version of the operating system, new version of perl, new version of java. Also possible: new version installed of any of the previous without removing older versions, new software not associated with the first, new mapped drives and/or changed env vars.

  • Problems with the HelloWorld program

    I cannot run the helloworld program can someone help me with that. I am completely new to java programming.

    That's a rather vague description of the problem.
    What happens when
    you type this:
    javac -version
    java -versionCarefull there Jos. You'll probably have to specify where to type in that
    stuff. Otherwise the OP might type it in his IDE/text-editor...His what?!?!1!!!*one*!!!111??? how perverted ...
    kind regards,
    Jos ;-)

Maybe you are looking for