Java provides a Firewall WTF?

i was taking a terrible java core practice test today online and this was one of the questions:
Java provides a Firewall between a networked application and your computer.
TRUE/FALSE
i said false, they said i was wrong.
Does anyone know wtf they are talking about here ?

bah, why was it the first hit on google!!:shrug:
Why indeed. A good bit of googlebombing I would guess. It really is a terrible reference. It has been discussed here before. If you browse through the questions and answers you will find that the answers break down like this.
30% correct (if that)
30% have a grain of truth but largely stuff and nonsense
30% out and out bullshit
10% so poorly answered you they don't even seem to be answering the same question
And then there are the threads that are just scary like...
http://www.geekinterview.com/question_details/38346
The answer is a joke of course but the question... I pray it is a joke too.

Similar Messages

  • Can java provide a follow/depend/attatch compiling warning?

    I wrote a class called Query.It connect to database and return ResultSet.So user must manually call my method close() to close the ResultSet and Connection, otherwise resource will be avaliable.
    But user maybe forget call the close() method.If codes are released,problem will occur.
    For this reason I want java provides a compile warning if a important method is not called.
    e.g. Codes maybe like this:
    /**Start**/
    class Query(){
    ResultSet getResultSet(DataSource ds){
    //Codes get resultset
    return ResultSet;
    void close() follow getResultSet(DataSource){
    //Close databse
    //Note: "follow getResultSet(DataSource)" is my idea.
    class test{
    Query query = new Query();
    RsultSet rst = query.getResultSet();
    //query.close();//#1
    /**End**/
    If user forget writing line #1 (to close Database,etc), java compiler will give a warning:
    The method close() must follow method getResultSet!
    You will get error when running.
    Can java provide this function?
    Thanks!

    to mchan0 :
    I konw you mean I can copy ResultSet to another Object.But if databse is very very large,ResultSet will use large memory.It is not we want.
    e.g. our project database need to store 40,000,000 records.Once load large numbers records,server will crack.
    So I can only use ResultSet.
    If I wrong,please correct me.
    Thanks

  • Does java provide any support for MD5

    I want to develop a program which in vc++ should produce a message digest using MD5 for a file and i want to check this file and hashcode generated for its equality . Does Java provide MD5 algo for it.
    ie what i have to do
    file + MD5 algo (Implemented in vc++) = Message Digest 1
    Will Message Digest 1 == Message Digest Generated by Java MD5 algo + file
    Thanks

    Here's a simple example of creating an MD5 in java:
        public byte[] createMD5( final InputStream data )
            throws NoSuchAlgorithmException, IOException
            MessageDigest md5 = MessageDigest.getInstance( "MD5" );
            final byte buf[] = new byte[ 8192 ];
            int bytes = 0;
            while ( ( bytes = data.read( buf ) ) != -1 )
                md5.update( buf, 0, bytes );
            return md5.digest();
        }

  • Is this bug in java-provided utf-8 Charset ???

    Here is the little code I've done:
    String serialisation = "myVeryComplexString ..."
    String coding = new String(serialisation.getBytes("utf-8"));
    String decoding = new String(coding.getBytes(), "utf-8");
    I expected that "serialisation" and "decoding" are the same String. But they are not ...
    The "serialisation.getBytes()" array contains 189 bytes. But the "decoding.getBytes()" array contains 191 bytes ... Why this difference ?
    Any explaination ?

    You aren't willing to listen. Maybe the soruce code for STring will convince you.
    public final class String implements java.io.Serializable, Comparable {
        /** The value is used for character storage. */
        private char value[];
        /** The offset is the first index of the storage that is used. */
        private int offset;
        /** The count is the number of characters in the String. */
        private int count;
        /** Cache the hash code for the string */
        private int hash = 0;
        /** The cached converter for each thread.
         *  Note: These are declared null to minimize the classes
         *  that String must depend on during initialization
        private static ThreadLocal btcConverter = null;
        private static ThreadLocal ctbConverter = null;
         * Returns a <code>ByteToCharConverter</code> that uses the specified
         * encoding. For efficiency a cache is maintained that holds the last
         * used converter.
         * @param  enc The name of a character encoding
         * @return     ByteToCharConverter for the specified encoding.
         * @exception  UnsupportedEncodingException
         *             If the named encoding is not supported
         * @since      1.2
        private static ByteToCharConverter getBTCConverter(String encoding)
                                      throws UnsupportedEncodingException {
            ByteToCharConverter btc = null;
            if (btcConverter == null)
                btcConverter = new ThreadLocal();
            SoftReference ref = (SoftReference)(btcConverter.get());
            if (ref==null || (btc = (ByteToCharConverter)ref.get())==null ||
                              !encoding.equals(btc.getCharacterEncoding())) {
                btc = ByteToCharConverter.getConverter(encoding);
                btcConverter.set(new SoftReference(btc));
            } else {
                btc.reset();
            return btc;
    ...

  • I have a strange Java problem.. WTF is going on?

    I have a bunch of java classes, and one of them called Test.java contains my main method. When i make changes to my Test.java class or just delete the whole file including its .class file, it still runs!!
    so....after i compile (javac Test.java) and when i type the command line (java Test), it works , then when i delete Test.java and also delete Test.class and recompile everything else, why does the command line (java Test) still work??? I'm sure i'm on the right directory and I also tried restarting my computer but I get the same results. Thanks for your suggestions
    james

    Maybe another of your classes includes/instantiates/calls your Test class. I think all compilers will recursively detect such dependencies and compile any classes that do not have a .class file.
    I have a bunch of java classes, and one of them called
    Test.java contains my main method. When i make changes
    to my Test.java class or just delete the whole file
    including its .class file, it still runs!!
    so....after i compile (javac Test.java) and when i
    type the command line (java Test), it works , then
    when i delete Test.java and also delete Test.class and
    recompile everything else, why does the command line
    (java Test) still work??? I'm sure i'm on the right
    directory and I also tried restarting my computer but
    I get the same results. Thanks for your suggestions
    james

  • Java KVM Server Firewall port

    Hello Engineers,
    I am in the process of deploying UCSM and having issues with connection to the KVM Console server on all my blades in the chassis. Can you please let me know all the specific tcp port needed so I can allow connections to the console of the blade.
    Thanks,
    Jay Singh

    Thanks for the help...
    Jay

  • Why Java provides Object cloning even if there is Object reference variable

    In both cases original value get changed. What is the difference between these (clonable interface & Object reference variable)

    Cloneable is a way to make a copy of an object, so that you now have two objects, usually with the same state. Assigning the value in one reference variable to another variable (I can only assume that's what you're talking about, as your question is not clear at all) does not create another object.

  • Implement Firewall by using Java

    I want to create a firewall(3rd layer) by using Java. Is it possible? Is there any class for these purposes?
    I'm not sure if the "DatagramPacket" is the class that I'm looking for.
    What is the lower level of network programming which is supported by Java?
    Thanks

    hm, although i'm not in the "java is too slow" camp i'm still surprised. but then, when using a box as dedicated firewall, java performance is surely good enough.
    what made me wonder is that java does not give access to network functionality on a low level which is required for packet filtering. so it would only be feasible to accomplish an application level firewall. i'm no expert at this but i would guess that this kind of firewall has more overhead than a packet filtering firewall.
    some research revealed that only the frontend seems to be written in java while the firewall is a configured linux system:
    Developed with NetMaster's own Linux distribution tailored specifically for firewall applications, Gateway Guardian is a very flexible, high-end firewall that takes a revolutionary approach to allowing a company to use a lower-end PC as their Internet gateway. Running on a PC that is not the Internet gateway, Gateway Guardian uses a pure Java application to preconfigure hardware, Internet provider settings, and firewall rules through a wizard like format. When the information has been entered, the Java application writes an entire Linux operating system and the custom firewall configuration onto a 3-1/4" floppy diskette.
    http://online.securityfocus.com/products/category/134
    Gateway Guardian (see Resources) is a one-floppy Linux distribution customized for ipchains-based firewalls. Guardian was developed by NetMaster Solutions and uses a Java GUI application to configure hardware, network settings, and firewall rules through a wizard-like format. When the information has been entered, the Java application writes a Linux image and the custom firewall configuration onto a floppy diskette.
    http://www.linuxworld.com/linuxworld/lw-2000-10/lw-10-fwproducts2-p5.html
    see here as well:
    http://techupdate.zdnet.com/techupdate/stories/main/0,14179,2806287,00.html
    any more insights?
    robert

  • Registering a provider built in java class.

    Hi all,
    I have done an application in oracle portal which has pages made in portlets. I have used pl/sql and htp packages in this application. I have created a search module in jsp along with java classes. After that I deployed this as a war file in oracle app server 10g. deployment done successfully but when I am registering a provider in oracle portal, it cannot find the java classes. can anyone please tell me how to register a java provider in oracle portal.

    You need provider.xml file for that.
    WEB-INF\providers\providename\provider.xml
    I think you have to make Portlet from your jsp file.
    I have only made Struts-Portlets (http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/articles/pdkstruts/portletize-your-app.html)
    -jari

  • Network Address Translation in Java

    Hi to all,
    Can any one explain me if is possible to realize a NAT in java?!?
    Are RFC's 3022 and 1918 useful for my purposes?!?
    If it's possible, can anyone post the code or the link where I can find it?!?
    Thanks...

    To do NAT properly you need lower level access to the IP stack than Java provides. There are also a good variety of NAT servers available.
    A good open source choice is Linux IPMasquerade. You can use an old surplus PC (pentium II 233 or better) with Linux and IPMasquerade and IPChains to build a quite respectable firewall and NAT server that is more secure than anything running under windows. I got over 100,000 hits on google for ip masquerade, eg. http://en.tldp.org/HOWTO/IP-Masquerade-HOWTO.
    Another choice is if you use a Linksys DSL router or similar device, this will connect you to cable or ADSL and do NAT for you. The router is less than $50.00 US.
    Given these conditions a NAT in java is hardly worth it.

  • What is difference between C# Gzip and Java swing GZIPOutputStream?

    Hi All,
    I have a Java swing tool where i can compress file inputs and we have C# tool.
    I am using GZIPOutputStream to compress the stream .
    I found the difference between C# and Java Gzip compression while a compressing a file (temp.gif ) -
    After Compression of temp.gif file in C# - compressed file size increased
    while in java i found a 2% percentage of compression of data.
    Could you please tell me , can i achieve same output in Java as compared to C# using GZIPOutputStream ?
    Thank a lot in advance.

    797957 wrote:
    Does java provides a better compression than C#?no idea, i don't do c# programming. and, your question is most likely really: "does java default to a higher compression level than c#".
    Btw what is faster compression vs. better compression?meaning, does the code spend more time/effort trying to compress the data (slower but better compression) or less time/effort trying to compress the data (faster but worse compression). most compression algorithms allow you to control this tradeoff depending on whether you care more about cpu time or disk/memory space.

  • J2me and java card, need help to communicate

    we are trying to put together a reader to read smartcards using j2me and we figure that it would be easiest if we could develop it to work with java cards rather than standard smart cards, the problem is we get garbage when we communicate to it, the chip sends us crap, any suggestions what might be wrong, any calls we might be missing, has anyone worked with j2me and java cards or smart cards, any help would be appreciated.
    einar

    .... reader app and the ME behind it .... smells like mobile ....
    First of all - if you want to have one mobile application running on this just make sure that whatever is written in ME can use drivers from the reader chip ....
    Workin on the PC is something completely different. There was one good example how to develop one host application in Java provided with the JCOP tools long ago ... I don't know if this is now in the new Eclipse tools.
    But - there was a small API provided that can give you good hints what to do - and - once you have it on the reader side - you can easily integrate ME methods with this ...

  • Java API to read the Encrypted Values from Windows Registry settings

    Is there any Java API to read the Encrypted Values from Windows Registry settings ?
    My Java Application invokes a 3rd party Tool that writes the key/value to windows registry settings under : “HKLM\Software\<3rdparty>\dataValue”.
    This entry is in BINARY and encrypted with 3DES, using crypto API from Microsoft.
    3rd party software to encrypt the data stored in registry it
    either uses C++ code: and uses the call “CryptProtectData” and “CryptUnProtectData” or
    If it is a .NET (C#) it uses the call “Protect” or “UnProtect” from class “ProtectData” of WinCrypt.h from the library “Crypt32.lib.
    Note: The data is encrypted using auto-generated machinekey and there is no public key shared to decrypt the Encrypted data.
    Since the data is encrypted using auto-generated machinekey the same can be decrypted from a .Net / C++ application using CryptUnprotectData or UnProtect() API of WinCrypt.h from the library “Crypt32.lib.
    To know more about Auto-Generated MachineKey in Windows refer the links below
    http://aspnetresources.com/tools/machineKey
    http://msdn.microsoft.com/en-us/library/ms998288.aspx
    I need to find a way in Java to find the equivalent API to decrypt (CryptUnprotectData) and Microsoft will automatically use the correct key.
    But i couldn't find any informato related to Java APIs to enrypt or decrypt data using auto-generated machinekey.
    Is there a way to read the encrypted data from Windows regsitry settings that is encrypted using the Auto-Generated Machine Key ?
    Kindly let me know if Java provides any such API or mechanism for this.

    If the symmetric key is "auto-generated" and is not being stored anywhere on the machine, it implies that the key is being regenerated based on known values on the machine. This is the same principle in generating 3DES keys using PBE (password-based-encryption). I would review the documentation on the C# side, figure out the algorithm or "seed" values being used by the algorithm, and then attempt to use the JCE to derive the 3DES key using PBE; you will need to provide the known values as parameters to the PBE key-generation function in JCE. Once derived, it can be used to decrypt the ciphertext from the Regiistry in exactly the same way as the CAPI/CNG framework.
    An alternate way for Java to use this key, is to write a JNI library that will call the native Windows code to do the decryption; then the Java program does not need to know details about the key.
    That said, there is a risk that if your code can derive the key based on known seeds, then so can an attacker. I don't know what your applicatiion is doing, but if this is anything related to compliance for some data-security regulation like PCI-DSS, then you will fail the audit (for being unable to prove you have adequate controls on the symmetric key) if a knowledgable QSA probes this design.
    Arshad Noor
    StrongAuth, Inc.

  • Java error while opening Batch Scheduler in Hyperion Workspace

    Hello Guys,
    I get this error while trying to open the Batch Scheduler in Hyperion Workspace. Please assist.
    Error:
    ; nested exception is:
    java.lang.NullPointerException

    Hello Everybody,
    I have recently installed Hyperion 11.1.2.2(Foundation Services and Interactive Reporting) in our environment.
    The installation and configuration are successful. Also when I ran a sample BQY it works fine.
    If I try to run the sample programs on the Hyperion server in their actual location, they work fine.
    I am having problem setting up the SDK remotely and run the sample program.
    I am getting the following error when trying to run the sample Login.java provided in /EPMSystem11R1/products/biplus/SDK/samples/java/
    Unable to setup SDK for Hyperion 11.1.2.2 remotely
    Please help, thanks in advance

  • How to install new fonts using code in java?

    Hi,
    How to install font in a system using java, provided i know the font file's address. Is there any specific class/method available for this purpose? Copying the file to windows/font directory will work for windows, but I think it wont be generic to all operating system. So is there anyway to install a font using code?
    I also want to know how to make the font available only until my application window is open, It must be available to all other external applications like photoshop, word etc., When I close my window it must un-install automatically or be made not available to other applications. Any suggestions? Please do help! Thanks in advance...

    I have already tried the above, But the font created using input stream is available only to my application* and is not viewable in photoshop.*. I realize this. Like I said, I know of no method that will register/deregister the font with the system. You'll have to create your own method that takes the operating system into account.
    String os = System.getPropery("os.name");
    if(os.equals("Windows Vista")) {
    }else if(os.equals("Windows XP")) {
    }else if(os.equals("Windows NT")) {
    }else if(os.equals("Solaris")) {
    AIX
    Digital Unix
    FreeBSD
    HP UX
    Irix
    Linux
    Mac OS
    Mac OS X
    MPE/iX
    Netware 4.11
    OS/2
    Solaris
    Windows 2000
    Windows 95
    Windows 98
    Windows NT
    Windows Vista
    Windows XPYou'll need the standard font directory for each system. I think all the window ones are C:\Windows\Font\ . Each OS probably has its own little quark (like having several font directories or throwing different security exceptions). Undoubtly it's going to require some research and a bit of trial and error. You can probably work some magic with Runtime.exec(...) as well.
    The alternative would be to google for some libraries that offer similar functionality, or promt the user for the system's font directory and save the location of the directory in a file somewhere for future use (so the user dosen't have to specify the font directory everytime he/she starts up the application).

Maybe you are looking for

  • Premiere Elements 3 with Windows 7

    I have been using Premiere Elements 3.0 with windows XP and it has been sufficient for what I want to do. I have now upgraded to Windows 7 and the disk will not reinstall the program. I noticed that there was an update for Vista of Premiere Elements

  • Display 'No Data Found' if the records doesnot match the parameter

    Can anyone pls answer this question. I have just one parameter, if i select a value from the parameter and the results matches then the report shows records which is obvious but IF no data is matching to the value I selected in parameter, Can I didpl

  • Rollback firmware (zen vision m 60

    hi guys im after an opinion as to whether i should risk rolling back my firmware from .2 to . (thanks for posting the link to the download by the way, you forum guys are awesome) in order to get Fm recording. i was all nice and organised when i first

  • Scratch Disk is Full

    When I try to crop a picture, I am getting an error message that says my scratch disk is full.  I have ample space left on my hard drive, so how can I correct this issue? Thanks, Jennifer Laraia Message was edited by: PECourtejoie (email address remo

  • Not able to configure database instance on target host in Grid Control

    I can see all database instances on a target in GridControl and when I tried to configure database instance, it fails with the following error. Error oracle.sysman.emSDK.emd.comm.CommException: java.net.UnknownHostException: <dbinstance name> Could s