Bit new to Java.

I'm a bit new to Java. Can someone pls tell me if this: class hello extends JComponent and class hey extends JComponent are kinds of inheritance. Thanks a lot.

Yes, anytime you use 'extends', you've created an inheritance structure. In the two lines you posted, both 'hello' and 'hey' can be used as a JComponent, and have it's member variables and methods.

Similar Messages

  • I am new to this and a bit rusty with Java, Oracle, Web Development, et al; and, I need a free trial run at this time, Can we do this?

    I am new to this and a bit rusty with Java, Oracle, Web Development, et al; and, I need a free trial run at this time, Can we do this?

    your itunes accoutn have nothing to d with your computer
    you can go to any computer with internet access in the world and
    login into your itunes account if you have the appleID and password
    the itunes account is placed on apples itunes servers

  • New TO JAVA Programming

    Dear Forummembers,
    I am student doing postgraduate studies in IT.i have some queries related to one of my programming staff.i am very much new into Java programming and i am finding it a bit difficult to handle this program.The synopsis of the program is given below -
    You are required to design and code an object-oriented java program to process bookings for a theatre perfomance.
    Your program will read from a data file containing specifications of the performance,including the names of the theatre, the play and its author and the layout of the theatre consisting of the number of seats in each row.
    It will then run a menu driven operation to accept theatre bookings or display the current
    status of seating in the theatre.
    The name of the file containing the details of the performance and the theatre should be
    provided at the command line, eg by running the program with the command:
    java Booking Theatre.txt
    where Theare.txt represents an example of the data file.
    A possible data file is:
    Opera
    U and Me
    Jennifer Aniston
    5 10 10 11 12 13 14
    The data provided is as follows
    Line 1
    Name of the Theatre
    Line 2
    Name of the play being performed
    Line 3
    Name of the author of the play being performed
    Line 4
    A list of the lengths (number of seats) of each row in the theatre, from front to
    back.
    The program must start by reading this file, storing all the appropriate parameters and
    establishing an object to accept bookings for this performance with all details for the theatre
    and performance.
    The program should then start a loop in which a menu is presented to the user, eg:
    Select from the following:
    B - Book seats
    T - Display Theatre bookings
    Q - Quit from the program
    Enter your choice:
    And keep performing selected operations until the user�s selects the quit option, when the
    program should terminate.
    T - Display Theatre bookings
    The Display Theatre Bookings option should display a plan of the theatre. Every available
    seat should be displayed containing its identification, while reserved seats should contain an
    Rows in each theatre are indicated by letters starting from �A� at the front. Seats are
    numbered from left to right starting from 1. A typical seat in the theatre might be designated
    D12, representing seat 12 in row D.
    B - Book seats
    The booking of seats is to offer a number of different options.
    First the customer must be asked how many adjacent seats are
    required. Then start a loop offering a further menu of choices:
    Enter one of the following:
    The first seat of a selected series, eg D12
    A preferred row letter, eg F
    A ? to have the first available sequence selected for you
    A # to see a display of all available seats
    A 0 to cancel your attempt to book seats
    Enter your selection:
    1. If the user enters a seat indentifier such B6, The program should attempt to
    reserve the required seats starting from that seat. For example if 4 seats are
    required from B6, seats B6, B7, B8 and B9 should be reserved for the customer,
    with a message confirming the reservation and specifying the seats reserved..
    Before this booking can take place, some testing is required. Firstly, the row
    letter must be a valid row. Then the seat number must be within the seats in the
    row and such that the 4 seats would not go beyond the end of the row. The
    program must then check that none of the required seats is already reserved.
    If the seats are invalid or already reserved, no reservation should be made and the
    booking menu should be repeated to give the customer a further chance to book
    seats.
    If the reservation is successful, return to the main menu.
    2. The user can also simply enter a row letter, eg B.IN this case, the program should
    first check that the letter is a valid row and then offer the user in turn each
    adjacent block of the required size in the specified row and for each ask whether
    the customer wants to take them. Using the partly booked theatre layout above, if
    the customer wanted 2 seats from row B, the customer should be offered first:
    Seats B5 to B6
    then if the customer does not want them:
    Seats B10 to B11
    and finally
    Seats B11 to B12
    If the customer selects a block of seats, then return to the main menu. If none are
    selected, or there is no block of the required size available in the row, then report
    that no further blocks of the required size are available in the row and repeat the
    booking menu.
    3. If the user enters a ? the program should offer the customer every block of seats
    of the required size in the whole theatre. This process should start from the first
    row and proceed back a row at a time. For example, again using the partially
    booked theatre shown above, if the user requested 9 seats, the program should
    offer in turn:
    Seats A1 to A9
    Seats C1 to C9
    Seats C2 to C10
    Seats E3 to E11
    Seats E4 to E12
    If the customer selects a block of seats, then return to the main menu. If none are
    selected, or there is no block of the required size available in the whole theatre,
    then report that no further blocks of the required size are available and repeat the
    booking menu.
    4. If the user enters a # the program should display the current status of the seating
    in the theatre, exactly the same as for the T option from the main menu and then
    repeat the booking menu.
    5. If the user enters a 0 (zero), the program should exit from the booking menu back
    to the main menu. If for example the user wanted 9 seats and no block of 9 was
    left in the theatre, he would need to make two separate smaller bookings.
    The program should perform limited data validation in the booking process. If a single
    character other than 0, ? and # is entered, it should be treated as a row letter and then tested
    for falling within the range of valid rows, eg A to H in the example above. Any invalid row
    letters should be rejected.
    If more than one character is entered, the first character should be tested as a valid row letter,
    and the numeric part should be tested for falling within the given row. You are NOT
    required to test for valid numeric input as this would require the use of Exception handling.
    You are provided with a class file:
    Pad.java
    containing methods that can be used for neat alignment of the seat identifiers in the theatre
    plan.
    File Processing
    The file to be read must be opened within the program and if the named file does not exist, a
    FileNotFoundException will be generated. It is desirable that this Exception be caught and
    a corrected file name should be asked for.
    This is not required for this assignment, as Exception handling has not been covered in this
    Unit. It will be acceptable if the method simply throws IOException in its heading.
    The only checking that is required is to make sure that the user does supply a file on the
    command line, containing details of the performance. This can be tested for by checking the
    length of the parameter array args. The array length should be 1. If not, display an error
    message telling the user the correct way to run the program and then terminate the program
    System.exit(0);
    The file should be closed after reading is completed.
    Program Requirements
    You are expected to create at least three classes in developing a solution to this problem.
    There should be an outer driving class, a class to represent the theatre performance and its
    bookings and a class to represent a single row within the theatre.
    You will also need to use arrays at two levels. You will need an array of Rows in the Theatre
    class.
    Each Row object will need an array of seats to keep track of which seats have been reserved.
    Your outer driving class should be called BookingOffice and should be submitted in a file named BookingOffice.java
    Your second, third and any additional classes, should be submitted in separate files, each
    class in a .java file named with the same name as the class
    I am also very sorry to give such a long description.but i mainly want to know how to approach for this program.
    also how to designate each row about it's column while it is being read from the text file, how to store it, how to denote first row as row A(second row as row B and so on) and WHICH CLASS WILL PERFORM WHICH OPERATIONS.
    pls do give a rough guideline about designing each class and it's reponsibilty.
    thanking u and looking forward for your help,
    sincerely
    RK

    yes i do know that........but can u ppl pls mention
    atleast what classes shud i consider and what will be
    the functions of each class?No, sorry. Maybe somebody else will, but in general, this is not a good question for this forum. It's too broad, and the question you're asking is an overall problem solving approach that you should be familiar with at this point.
    These forums are best suited to more specific questions. "How do I approach this homework?" is not something that most people are willing or able to answer in a forum like this.

  • New to java-need help for debugging

    hey there
    i just wanted my first program in java and here it is below with the error when i'm compiling it, i cant understand whats wrong:
    public class SquareArea {
    public static void main(String[] args); {
    float length;
    float width;
    float SquareArea;
    System.out.println ("Please enter length"+ length);
    System.out.println ("Please enter width"+ width);
    SquareArea= length*width;
    System.out.println ("The area of the square is" + SquareArea);
    The error is:C:\Documents and Settings\User\Desktop\SquareArea.java:5: missing method body, or declare abstract
    public static void main(String[] args); {
    ^
    1 error
    Tool completed with exit code 1

    Reading inputs from the command line is a bit complicated in java, here is how it is done:
    first add the line:
    import java.io.*;to the beginning of your program.
              float length;
              float width;
              float SquareArea;
              BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
              try
                   System.out.println ("Please enter length:");
                   String lengthStr = reader.readLine();
                   length = Float.parseFloat(lengthStr);
                   System.out.println ("Please enter width");
                   String widthStr = reader.readLine();
                   width = Float.parseFloat(widthStr);
                   SquareArea= length*width;
                   System.out.println ("The area of the square is" + SquareArea);
              catch (IOException ioe)
                   System.out.println("Error reading values.");
                   ioe.printStackTrace();
              }

  • I'm new to Java, what do i need?

    Hi,
    I've been programming C++ for a while, and now I have decided to start programming in Java too.
    So, what do i need to program in Java?
    Got any Java compiler to recommend?

    Installation Notes - JDK 5.0 Microsoft Windows (32-bit)
    Your First Cup of Java
    The Java� Tutorial - A practical guide for programmers
    The Java� Tutorial - Trail: Learning the Java Language
    New to Java Center
    Java Programming Notes - Fred Swartz
    How To Think Like A Computer Scientist
    Introduction to Computer Science using Java
    The Java Developers Almanac 1.4
    Object-Oriented Programming Concepts
    Object-oriented language basics
    Don't Fear the OOP
    Books:
    The Java Programming Language - 4th Edition
    Head First Java, by Bert Bates and Kathy Sierra
    Thinking in Java (Free online), by Bruce Eckel
    Core Java, by Cay Horstmann and Gary Cornell
    Effective Java, by Joshua Bloch
    http://java.sun.com/developer/Books/javaprogramming/

  • New 2 Java with some errors in prog

    Hey Guys and Gals im new to java and im working on some simple progs
    my brain is currently wrapped around this problem
    ---------- Java Compiler ----------
    Register8.java:81: incompatible types
    found : char
    required: java.lang.String
              return bits.charAt(bitNumber);
    ^
    1 error
    Normal Termination
    Output completed (3 sec consumed).
    =======================CODE=======================
         public String getBit(int bitNumber)
              return bits.charAt(bitNumber);
    this is the calling stuff
    public class Driver
         public static void main(String[] args)
              Register8 Binary1 = new Register8();
              System.out.println(Binary1.getBit(3));

    Hey there liddle buddy,
    How did you define 'bits'
    Thang yer very much yer really wonderful
    *** ELVIS: He's the MAN ***
    This answer was supplied coutesy of : -
    Elvis Presley: Programming Consultants inc.
    contact: [email protected]
    Thang yer very much

  • New to Java, where do I start??!?!

    Hello everyone, let me just introduce myself. My name is Jeff and I am from PA, I am a recent graduate of Penn State university with a bachelors of science in information science and technology, application/integration. My major dealt with alot of analysis/requirements/testing/planning/documentation, with a little bit of programming in such interfaces as HTML, CSS, ASP.Net, and I had one Java course which I could have done better in.
    I started my career for a very large well known company in an entry level position. I went in with very little development skills, in the languages that we use here. Mostly everything is Java/Javascript, both of which I am pretty clueless about. They also do alot of web 2.0 stuff using ajax/xml/dojo. I just want to have some suggestions on how I could maybe learn this language a little better, I am not getting anything really so far, because ive just been doing e-learnings and such. I want to start shadowing the developers, but I dont want to go in seeming stupid! Who has some suggestions?

    Hi and welcome.
    This is the beginner's set:
    [Sun's basic Java tutorial|http://java.sun.com/docs/books/tutorial/]
    [Sun's New To Java Center|http://java.sun.com/learning/new2java/index.html]
    Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    jGuru
    A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch
    To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    [Yawmarks List|http://forums.devshed.com/java-help-9/resources-for-learning-java-249225.html]
    [The Java Developers Almanac|http://www.amazon.com/exec/obidos/tg/detail/-/0201752808?v=glance]
    [http://javaalmanac.com|http://javaalmanac.com]
    Bruce Eckel's [Thinking in Java(Available online.)|http://mindview.net/Books/DownloadSites]
    Joshua Bloch's [Effective Java|http://www.amazon.com/Effective-Java-2nd-Joshua-Bloch/dp/0321356683]
    Bert Bates and Kathy Sierra's [Head First Java|http://www.amazon.com/exec/obidos/tg/detail/-/0596004656?v=glance]
    James Gosling's [The Java Programming Language|http://www.amazon.com/Java-TM-Programming-Language-4th/dp/0321349806/ref=sr_1_1?ie=UTF8&s=books&qid=1247059012&sr=1-1]
    Gosling is the creator of Java. It doesn't get much more authoritative than this.
    Joshua Bloch and Neal Gafter [Java Puzzlers.|http://www.javapuzzlers.com/]

  • Try-catch, new to java

    Anyone know how to effectivly exit a try catch statement if the exception is thrown? Heres this code I'm working with:
    public void create(){
         textCheck1 = textField1.getText();
         try{
           intCheck = Integer.parseInt(textCheck1);
         catch(IllegalArgumentException nfe) {
           System.out.println("NumberFormatException: Level must be a number between 1-70");
         if(intCheck>70){
             throw new NumberFormatException("NumberFormatException: Level must be a number between 1-70");
         else{
           TextArea.setText("Character Successfully Created");
           if(button1.isSelected()){
           System.out.println("Character: \n"+"Name: "+textField2.getText()+"\n"+"Job: "+box.getSelectedItem()+"\n"+"Level: "+textField1.getText()+"\n"+"Gender: Male"+"\n"+"Heroic: "+checkBox.isSelected()+"\n");
           else if(button2.isSelected()){
           System.out.println("Character: \n"+"Name: "+textField2.getText()+"\n"+"Job: "+box.getSelectedItem()+"\n"+"Level: "+textField1.getText()+"\n"+"Gender: Male"+"\n"+"Heroic: "+checkBox.isSelected()+"\n");
        }the way this is set up, when the catch block throws the exception the if-else executes anyway and the results are printed. If the string isn't formated correctly I want to throw the exception and exit the method. please help. thanks.

    cyberjed1 wrote:
    try{
    intCheck = Integer.parseInt(textCheck1);
    catch(IllegalArgumentException nfe) {
    System.out.println("NumberFormatException: Level must be a number between 1-70");
    }the way this is set up, when the catch block throws the exception the if-else executes anyway and the results are printed. If the string isn't formated correctly I want to throw the exception and exit the method. please help. thanks.Two flaws:
    1) You're catching IllegalArgumentException instead of NumberFormatException. The catch would never be entered.
    2) You're ignoring/swallowing the exception and doing a 'dumb' sysout instead of throwing the (new) exception.
    Fix your code as follows:
    try{
        intCheck = Integer.parseInt(textCheck1);
    } catch (NumberFormatException nfe) {
        throw new NumberFormatException("NumberFormatException: Level must be a number between 1-70");
    } Exactly the way as you did in the subsequent if block.
    By the way, if you consider yourself new to Java, why don't you make use of the 'New to Java' forum? Here we expect a bit more from you.

  • 32-bit JVM receiving Java objects from 64-bit JVM

    Hi folks,
    Question is: will there be problems for 32-bit JVM receiving Java objects from 64-bit JVM? and vice versa.
    Our application client is running on 32-bit JVM, our server is running on 64-bit JVM. Client will send Java objects to server, and vice versa.
    My past experience suggested when sending Java objects between client and server, both client and server needs to be compiled under the same JVM version. Any advice?
    Christy

    My past experience suggested when sending Java
    objects between client and server, both client and
    server needs to be compiled under the same JVM
    version. Any advice?This is only a case if you omit explicit serialVersionUID. My advice is to ALWAYS specify it for classes you want to serialize over the wire or put into persistent storage. It is way too tricky to rely on default one to fail half a year later when some new programmer adds one new public method to a class.
    Unless you need to deserialize already existing resources, there is no need to put any magic number in serialVersionUID - just put 1 for every class you create and possibly increase it by 1 every time you want to make incompatible version (which is not happening so often, as in real world you often try to stay as compatible as possible)

  • I am totally new in Java.

    I want to learn java. But I dont know how can i Do that. I also dont know which software i have to download. Which one is better for me as a new learner. Please some one help me.

    Here are some links for your browser.
    Free Tutorials and Such
    Installation Notes - JDK 5.0 Microsoft Windows (32-bit)
    Your First Cup of Java
    The Java? Tutorial - A practical guide for programmers
    New to Java Center
    Java Programming Notes - Fred Swartz
    How To Think Like A Computer Scientist
    Introduction to Computer science using Java
    The Java Developers Almanac 1.4
    Object-Oriented Programming Concepts
    Object-oriented language basics
    Don't Fear the OOP
    Free Java Books
    Thinking in Java, by Bruce Eckel (Free online)
    Core Servlet Programming, by Merty Hall (Free Online)
    More Servlets, by Marty Hall (Free Online)
    A Java GUI Programmer's Primer
    Data Structures and Algorithms
    with Object-Oriented Design Patterns in Java, by Bruno R. Preiss
    Introduction to Programming Using Java, by David J. Eck
    Advanced Programming for the Java 2 Platform
    The Java Language Specification
    Have fun
    JJ

  • I'am new at Java world, so please suggest me an IDE to work on .......

    hi everybody !
    This is my first post . I'am new in Java world, so please suggest me an IDE to work on ....... there are many IDE: Jbuilder, Jdevelopper, jRun, Sun Studio ... and then I don't know wich one is better (easer to use and to create good user interfaces), I'am designing a networking application surveying servers, hosts, routers ...and managing sms (sent to and received from Administrator).
    The OS is Suse Linux Professsional, the DBSM is Oracle 10g .
    I wait for your answers and thanks for your time

    For a beginner JCreator is a nice but I think it is only for Windows.
    For linux support have a a look at:
    Netbeans:
    If you are looking for GUI design features NetBeans 5.0 (hasn't been released yet, but you can download a beta version - release due in December) has a probably the best GUI designer. I would wait till the release version if I were your. It is also a solid IDE, but consumes a quite a bit of memory. Don't even consider this option unless you have 380MB+ RAM
    www.netbeans.org
    or
    Eclipse
    Very popular, uses less memory than NetBeans, but doesn't come with a GUI designer. Nice for editing code, but don't expect many fancy wizards.
    www.eclipse.org. You can get away with about 256MB RAM.
    If you intend to run Oracle 10g on the same system as these tools at the same time you better have a very impressive system, or will end up editor code in a text editor and compiling from the command line.

  • New to Java...Tough program to write I think...

    Alright, I have a problem. I have never coded in java before, but a teacher wants a program written that is too much for html/php/VB to handel, and a friend suggestion I use java.
    my problem is that I have never coded in Java before, but supposidly because its object oriented, the language should make the program easier to write.
    The program is a "Group Generator"
    Anyway, here is what the teacher wants:
    Step 1) Program Asks user how many students are in his class, and how many students he wants in each group
    Step 2) Program Asks user the names of all X students
    Step 3) Program makes a list of every combination of groups that can be made out of these X people (never repeating 2 people in a group)
    Step 4) Program outputs results
    Here is a quick example because I know its confusing
    10 kids in my class, groups of 2
    Group Set 1:
    1: AB
    2: CD
    3: EF
    4: GH
    5: IJ
    Group Set 2:
    1: AC
    2: BD
    3: GF
    4: IH
    5: EJ
    and the program would keep finding sets of unique grounds...but A will never be grouped with B again, or C again...so the ammount of group sets is actually quite low.
    Anway, this isnt for a grade or anything, its just something some teacher wants and I think would help teachers a bit in forming unique grounds of kids....
    Any input or ideas would be GREATLY appriciated :-)

    Alright, I have a problem. I have never coded in java
    before, but a teacher wants a program written that is
    too much for html/php/VB to handel, and a friend
    suggestion I use java.HTML is markup, so it won't be of much use. However, PHP, VB, and a host of other languages can handle this easily. Write it using the language with which you are comfortable.
    If you want to learn Java, however, here are some good resources...
    Your First Cup of Java - http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html
    Essentials, Part 1, Lesson 1: Compiling & Running a Simple Program - http://java.sun.com/developer/onlineTraining/Programming/BasicJava1/compile.html
    The Java Tutorial - A practical guide for programmers - http://java.sun.com/docs/books/tutorial/
    New to Java Center - http://java.sun.com/learning/new2java/index.html
    How To Think Like A Computer Scientist - http://www.ibiblio.org/obp/thinkCSjav/
    Introduction to Computer Science using Java - http://chortle.ccsu.ctstateu.edu/CS151/cs151java.html
    The Java Developers Almanac 1.4 - http://javaalmanac.com/
    JavaRanch: a friendly place for Java greenhorns - http://www.javaranch.com/
    jGuru - http://www.jguru.com
    Object-Oriented Programming Concepts - http://java.sun.com/docs/books/tutorial/java/concepts/
    Object-oriented language basics - http://www.javaworld.com/javaworld/jw-04-2001/jw-0406-java101.html
    Don't Fear the OOP - http://sepwww.stanford.edu/sep/josman/oop/oop1.htm
    Books:
    Bert Bates and Kathy Sierra's Head First Java - http://www.amazon.com/exec/obidos/tg/detail/-/0596004656?v=glance
    Bruce Eckel's Thinking in Java (Free online) - http://mindview.net/Books/DownloadSites
    Joshua Bloch's Effective Java - http://www.amazon.co.uk/exec/obidos/Author=Bloch,%20Josh
    Java Design: Building Better Apps and Applets (2nd Edition) - http://www.amazon.com/exec/obidos/tg/detail/-/0139111816/qid=1101309882/sr=8-7/ref=sr_8_xs_ap_i7_xgl14/104-6417153-1511164?v=glance&s=books&n=507846

  • How can I open help file (HTML or .chm) from Java Web Start (new to JAVA)

    Hi All,
    Im trying to open the help file of my application.
    When trying to access the help file from the GUI (pressing F1 for launching the help file), I'm geting the an error, something like:
    "Can't show help URL: jar:file:C:\Documents and Settings\%USER%\Application Data\Sun\Java\Deployment\javaws\cache\http\Dlocalhost\P7001\DMwebstart\RMjar-name!/com/resources/helpFiles/MyHelpFile.html"
    It seems that the file which is packed in a jar, was downloaded to the Java Web Start cache directory:
    C:\Documents and Settings\%USER%\Application Data\Sun\Java\Deployment\javaws\cache\http\Dlocalhost\P7001\DMwebstart
    The code which is activated when launching the help file is:
    try
                ResourceBundle resourceBundle = DoubleResourceBundle.getBundle("Resource", "ResourceImpl");
                RuntimeUtil.launchFile(new File(resourceBundle.getString("help.file")));
            } catch (IOException e)
                // TODO Auto-generated catch block
                e.printStackTrace();
            }where the property "help.file" is in some property file in the resource bundle named "Resource", and looks like this :
    help.file="com/trax/docs/help/global/MyHelpFile.html"
    The function "RuntimeUtil.launchFile" knows how to launch any file in its default application, and indeed it does launches the html, when giving it an absolute path to the file on my PC, as "C:\Helpfiles\MyHelpFile.html" as such:
    RuntimeUtil.launchFile("C:\Helpfiles\MyHelpFile.html");My question is :
    The application is going to be deployed on a Customer PC. How can I access the html file from the code, with a relative path and not its absolute path on the customer pc, which I can't know?
    I found these restrictions regarding web start:
    (copied from "http://rachel.sourceforge.net/"):
    *Rule 1: Java Archives only. No loose files.* All your resources have to be packaged in Java Archives (jar) if you want to have
    them delivered to the user's machine and kept up-to-date automatically by Java Web Start.
    *Rule 2: No file paths.* You can't use absolute or relative file paths to locate your
    jars holding your resources (e.g. <code>jar:file:///c:/java/jws/.cache/resources.jar</code>).
    Absolute file paths won't work because you never know where Java Web Start
    will put your jar on the user's machine. Relative file paths won't work because Java Web Start
    mangles the names of your jars (e.g. <code>venus.jar</code> becomes <code>RMvenus.jar</code>)
    and every JNLP client implementation has the right to mangle your names
    in a different way and you, therefore, can't predict the name with
    which your jar will be rechristend and end up on the user's machine in
    the application cache.Seems complex or impossible, to perform a simple task like opening a file.
    Please advise (I'm new to Java and Web Start).
    BTW, I'm working with IntelliJ IDEA 5.0.
    Thanks,
    Zedik.
    {font:Tahoma}{size:26pt}
    {size}{font}

    the follwing method i have used to open html file ...
    so to access html file i am shipping resources folder with jar file ..
    private void openHtmlPages(String pageName) {
         String cmd[] = new String[2];
         String browser = null;
         File file = null;
         if(System.getProperty("os.name").indexOf("Linux")>-1) {
              file = new File("/usr/bin/mozilla");
              if(!file.exists() ) {
              }else     {
                   browser = "mozilla";
         }else {
              browser = "<path of iexplore>";
         cmd[0] = browser;
         File files = new File("");
         String metaData = "/resources/Help/Files/"+pageName+".html"; // folder inside jar file
         java.net.URL url = this.getClass().getResource(metaData);
         String fileName = url.getFile();
         fileName = fileName.replaceAll("file:/","");
         fileName = fileName.replaceAll("%2520"," ");
         fileName = fileName.replaceAll("%20"," ");
         fileName = fileName.replaceAll("jarfilename.jar!"," ").trim();
         cmd[1] = fileName;     
         try{
              Process p = Runtime.getRuntime().exec(cmd);
         }catch(java.io.IOException io){
                   //Ignore
    can anyone give me the solution..???
    Regards
    Ganesan S

  • What is new in Java syntaxes in new Java versions?

    What is new in Java syntaxes in new Java versions?
    What about this sentenses
    1. for (int c:data), where data is array of integer
    2. ArrayList<Object> () ...
    3. Class<?>...
    I can't find this syntaxes in my books and documentation...
    And what Java version is latest?

    dont crosspost
    Edited by language police

  • What's new in Java 4

    Anybody can quickly explain the things are added in Java 4 newly.
    Thnx in advance.

    Nothing's new in Java 4 because there is no Java 4.
    Maybe you mean Java 5?
    Or maybe you mean Java 1.4?
    In either case, either the download page for that version, or the installation, should have release notes that answer your question.
    In fact, here they are for Java 5:
    http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html

Maybe you are looking for

  • Is there a log for logins?

    I want to establish multiple accounts on one computer and want to find out if as an admin I can keep track of who's been on the computer and for how long? Is this possible with panther and/or tiger? Thanks.

  • 1:N mapping Scenario, BPM errors

    Hi, I am following this scenario  1: N multi mapping Various multi-mappings and Optimizing their Implementation in Integration Processes (BPM) in XI. I need your help to fix my errors for Container1, container 2, and Send step in BPM In BPM, 1. I hav

  • How to remove CS4 Trial with PS CS4 and LR 2.6 Installed?

    After reading several discussions on the subject, it would appear the following workflow should be followed: 1 Log on as Administrator 2 Use Uninstall Programs and select PPro CS4.  Allow the uninstaller to remove as much of PPro CS4 as it can. 3 Use

  • How to find all Custom tables (transp) that have a custom transaction code?

    My client has asked us to provide a list of all Z (custom) tables and the associated transaction codes for maintaining them. I know I can manually do this with a Z* search in se11 and then do a where used on each table to find out if a view (transact

  • ITunes Alternative line missing

    Hi guys, I've recently re-installed my pc and also iTunes 8.0.1. But somehow, iTunes Alternate line (the white/blue background in the songlist) is not showing. It shows as plain white BG which make me find it difficult to find song's info throughout