Programming, website development forum Get latest updates by RSS Follow TechnicalTalk on Twitter Follow TechnicalTalk on Facebook 
HomeSearchRecent PostsLoginRegisterContact Us

Username  
Password    
  Forgot your password?  

Pages: [1]   Go Down
 
  Email this topic  |  Print
0 Members and 1 Guest are viewing this topic.

Java in Linux

 
webmaster forum
Fracker  Offline
Activity
0%
 
New Poster
Posts: 11
Topics: 9
September 04, 2009, 11:22:50 PM

Writing and compiling Java program on linux

You need,

1. Java SE Development Kit 4 for linux version
2. A Text editor such as Pico, vi or emacs (all 3 are built in linux)

Now write a program using Pico, vi or emacs, let say you have given name as HelloWorldApp.java

Quote
class HelloWorldApp {
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
}

 (after installation java. environment variable will automatically register) you can verify these environmental variables by env or echo

Quote
JAVA_HOME=/usr/java/j2se
JAVA_FONTS=/usr/share/fonts/truetype
ANT_HOME=/usr/share/ant

Now compile using javac program,

Quote
javac HelloWorldApp.java

After running above program a file will be generated HelloWorldApp.class

Always remember both javac, and java are case sensitive, so HelloworldApp.java is not equal to helloworldapp.java.

Now simply run the program using java

Quote
java HelloWorldApp

The end...
 
webmaster forum
polas  Offline
Activity
33.33%
 
Code Guru
Gender: Male
Posts: 1399
Topics: 85
WWW
September 08, 2009, 08:53:09 AM

Not hugely dissimilar than from on Windows

Mesham Type Oriented Parallel Programming Language, Free online technical support
 
webmaster forum
singam  Offline
Activity
0%
 
Regular Coder
Posts: 50
Topics: 19
July 07, 2010, 08:21:22 PM

Yesterday my dad bought me a Cnm Book and it is on Linux. I tried to install flash player so i could watch youtube and play online games but i installed flash player tar but it is just in my documents now and youtube still won't play. Can someone help me and give me step by step instruction please, i would be extremely great full. Thank you Smiley I don't know if this helps but i am on Bon Echo interent provider.
=============

Free Games
 
webmaster forum
polas  Offline
Activity
33.33%
 
Code Guru
Gender: Male
Posts: 1399
Topics: 85
WWW
July 10, 2010, 03:09:25 AM

Google it, flash is often a little tricky and requires specific files to be placed in FF's directories

Mesham Type Oriented Parallel Programming Language, Free online technical support
 
webmaster forum
Activity
0%
 
New Coder
Posts: 17
Topics: 2
August 13, 2010, 08:30:36 AM

I need help! Can anyone here help me and tell me how can install flash player in my browser so that I can watch YouTube videos.

immobilien mallorca | Cheap Website Design | chicago movers
 
webmaster forum
john14317  Offline
Activity
0%
 
Skilled Coder
Posts: 149
Topics: 0
July 12, 2011, 04:07:55 AM

You can also compile and execute your Java program directly from the shell. Set your working directory to the location of your .java file.

    To compile, type:

        [username:~/introcs/hello] javac HelloWorld.java

    To execute, type:

        [username:~/introcs/hello] java HelloWorld


payday loans
instant online cash advance
 
webmaster forum
cashcars  Offline
Activity
100%
 
Regular Coder
Posts: 66
Topics: 2
WWW
January 15, 2012, 11:48:32 AM

he uninstall process consists of:

    Java Plug-in Uninstall
    Java Uninstall
        RPM Uninstall
        Self extracting Uninstall

Java Plug-in Uninstall: Mozilla browser
If you are going to reinstall Java, you don't need to uninstall Java Plug-in. Just use the -f option for ln when creating a new symbolic link.
Example: ln -f /usr/lib/mozilla/plugins/libnpjp2.so

If you want to completely remove Java from your Linux box, the procedure of removing the symbolic link is described below.

    Open Terminal Window
    Log in as the super user
    Type: rm /usr/lib/mozilla/plugins/libnpjp2.so
    You will be prompted to remove symbolic link:
    rm: /usr/lib/mozilla/plugins/libnpjp2.so ?
    Type: Y

Java Uninstall
There are two ways to uninstall Java. Please use the method that you used when you installed Java. For example, if you used RPM to install Java, then use the RPM uninstall method.

    RPM uninstall
    Note: If you have RPM on your Linux box, you should first find out if Java is already installed using RPM. If Java is not installed using RPM, you should skip reading.
        Open Terminal Window
        Login as the super user
        Try to find jre package by typing: rpm -qa
        If RPM reports a package similar to jre-<version>-fcs, then Java is installed with RPM.

        Note: Normally, you do not need to uninstall Java with RPM, because RPM is able to uninstall the old version of Java when installing a new version! You may skip reading, unless you want to remove Java permanently.
        To uninstall Java, type: rpm -e jre-<version>-fcs

    Self-extracting file uninstall
        Find out if Java is installed in some folder. Common locations are /usr/java/jre_<version> or /opt/jre_nb/jre_<version>/bin/java/
        When you have located the folder, you may delete folder.
        Warning: You should be certain that Java is not already installed using RPM before removing the folder.
        Type: rm -r jre<version>
        For example: rm -r jre1.6.0

electrician perth
 
webmaster forum
hawk035  Offline
Activity
100%
 
Skilled Coder
Posts: 115
Topics: 0
February 02, 2012, 02:34:29 AM

Sorry friend I don't have info about it. oops

Business Directory
 
  Email this topic  |  Print
Pages: [1]   Go Up
 
Jump to:  



Powered by SMF 1.1.15 | SMF © 2011, Simple Machines


Google visited last this page February 04, 2012, 02:04:00 AM