solved jre, jdk, run java?

Hello,
x86_64
I've been using openjdk6 for my intro programming class. Decided to install jre, jdk instead, along with BlueJ from AUR.
How can I use java from the CL, there is no java/javac command anymore, I see the commands are installed in /opt/java/bin (or something like that, dont remember of the top of my head.) but it seems odd to have to call that everytime I want to use java.
Is there something I am missing here??
Last edited by proxima_centauri (2009-02-26 18:50:19)

Doh!!!
Found the solution here
http://bbs.archlinux.org/viewtopic.php?pid=222946
Needed to restart X or source /etc/profile.

Similar Messages

  • [solved]can't run java apps from command line

    Every Java program that i've tried to run from command line gives me a error message like this:
    augusto java% java Test
    Exception in thread "main" java.lang.NoClassDefFoundError: Test
    Caused by: java.lang.ClassNotFoundException: Test
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    Could not find the main class: Test. Program will exit.
    `java Test.class` doesn't work too.
    but, the exact same code work from eclipse, am I missing something?
    Some info:
    % ls Test*
    Test.class Test.java Test.java~
    % cat Test.java
    public class Test{
    public static void main(String[] args){
    System.out.println("doesn't work");
    % echo $PATH
    /home/augusto/.bin:/home/augusto/.bin:/home/augusto/GNUstep/Tools:/opt/GNUstep/Local/Tools:/opt/GNUstep/System/Tools:/bin:/usr/bin:/sbin:/usr/sbin:/opt/java/bin:/opt/java/jre/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core:/opt/qt/bin
    Last edited by hack.augusto (2009-10-27 00:57:53)

    also make sure that you current directory is in your classpath.
    eg
    export CLASSPATH=".:$CLASSPATH"
    java Test
    your issue is more likely to be classpath related, as java doesn't read the path variable, and the java executable is found
    Last edited by bruce (2009-10-27 01:02:51)

  • [SOLVED] jre: where's java?

    Where's the java command to start programs with jre installed? OpenJDK didn't work with some programs so I had to remove it, but now trying to start .jar programs says "command not found" and none of my java apps will run. what's the mystery here? Wiki gives no answer, thx.
    Last edited by userlander (2009-04-16 19:53:08)

    wonder wrote:did you relogin? you have to instead /etc/profile.d/jre.sh to be called
    That was it  - didn't know about having to login again, thanks.

  • JAR files just won´t run, multiple systems, JRE & JDK installed.

    Hi!
    I´ve been looking on many different places for an answer for this issue:
    I have to run different JAR files for applications, one is from Apache ActiveMQ, and the other is a hash calculating app. I´ve read on many topics that if you get error "Failed to load Main-Class" when running a JAR, the problem is how the JAR was packed (MANIFEST). Well, I find highly unlikely that two different JARs, from different sources, are wrongly packed. Also, I´ve installed JRE, JDK and even Java EE, on MS Server 2003 and on Windows 7 (on this last one only JRE), and no JAR runs. I´ve tried declaring PATH and JAVA_HOME environment variables... no use. Can anyone help me solve my problem?

    Hi,
    You might want to look in your control panel for 'Java' icon. It should give you an option to enable java plugin into your browser. Let me know if you still face the issue.
    Thanks!

  • How to run java programs on machines without JDK

    I want to make an installer for my java program that would work on machines even without JDK or Java runtime. How should I go?

    Here's another point.
    There is no particular need to "install" anything to run java. You can simply copy the jre to a directory of your choice, and from that directory invioke the JVM as you need it.

  • Running java application without installing JRE

    We try to run Java application without installing JRE, by copying java.exe (and other JRE files) together with our jar file. This does not work.
    Can it be solved?

    Can you elaborate on the steps to create a java
    application without installing JRE.
    Regards,
    padmaPadma,
    The solution is to deploy my JAR together with JRE files, without running standard JRE installation. This makes possible to simply ensure that my JAR will run with THIS SPECIFIC JRE. This is important from QA point of view. Also, installation of my application does not change configuration of JVMs on the computer.
    The solved problem:
    Standard JRE installation may change the default JRE for many Java applets and application on computer. Changing version JRE may lead to some programs misbehaviour (JRE backward compatibility does not always work and different Java versions not always live together well). Thus, some IT departments are very nervous about JRE version change.
    Hope, this explains my problem and the solution.

  • Paying $5 USD For Someone to Properly Install Java JRE & JDK in CentOS 5

    The title says it all.. I've been having so much trouble with this that im willing to pay someone 5 dollars to install JRE & JDK Properly for me. This is not a scam you'll have to install java 1st, ill give you access to the server. PM Me for more information or add me on:
    AIM: MarioElFlaCo
    MSN: [email protected]
    Payment will be sent through paypal only!

    Did you get a solution to your memory usage problems.
    We developed an applet which uses JAI 1.1.. yes of course with JRE1.3.1 plugin. The applet functions as a viewer for TIFF images and also allows users to manipulate them. We have ensured that there are no static variables and scope defined for variables is the minimum required. But we are still facing an undefined memory issue.
    When print is executed on the image (using Java2D), a few times ... it just hogs memory. Or I change the image loaded 2 -3 times and refresh the applet, it seems to run out of memory, and finally hangs.
    We have tried to do a System.gc.. to no avail.
    Would appreciate help on this.
    Thanx

  • Running java command from DOS prompt

    Hi,
    When I run java from the DOS prompt (NT) in any other location than the JDK bin directory, I get the following error:
    Error opening registry key 'Software\JavaSoft\Java Runtime Environment'
    My understanding is to be able to run this from anywhere you need to add the tools.jar file to the CLASSPATH, which I have done.
    There is no entry in the Registry for Software\JavaSoft...etc, has anyone any idea what my problem is and how I can solve it?
    Thanks in advance

    Hi,
    I am running Java 2 SDK, Standard Edition Version 1.2.2 running on NT. It was installed as part of Oracles JDeveloper IDE and is running on NT.
    All I want to be able to do is run java from the command line e.g. 'java myclass', to run a standalone Java program. I can run 'javac myclass.java' to compile the program without any problems, but my understanding is that to do this all I need is to have the '.../java1.2/bin' directory included in the 'PATH' variable, whereas to run the java runtime you need to include the tools.jar in the CLASSPATH variable.
    As I said previously I can run the 'java myclass' command from the '../java1.2/bin' directory, just not from anywhere else. As for whats in the code, does not matter you should be able to type just java on the command line and it will come back with an error prompting for the class name. Here is an example of what happens:
    I:\>java
    Error opening registry key 'Software\JavaSoft\Java Runtime Environment'
    However if I change to the correct directory, I get:
    D:\oracle\JDev32\java1.2\bin>java
    Usage: java [-options] class [args...]
    (to execute a class)
    or java -jar [-options] jarfile [args...]
    (to execute a jar file)
    where options include:
    -cp -classpath <directories and zip/jar files separated by ;>
    set search path for application classes and resources
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version
    -? -help print this help message
    -X print help on non-standard options
    The contents of my PATH and CLASSPATH variable are shown below, Thanks again.
    I:\>PATH
    PATH=D:\oracle\BIN;D:\oracle\Apache\Perl\5.00503\bin\mswin32-x86;C:\Program Files\Oracle\jre\1.1.7\b
    in;D:\oracle\ora8i\bin;C:\DMINT40\Win32\Bin;C:\WINNT\system32;C:\WINNT;C:\Program Files\Symantec\pcA
    nywhere;d:\oracle\jdev32\java1.2\bin;d:\downloads\oraxml\bin;d:\oracle\jdev32\java1.2\lib\tools.jar
    I:\>echo %CLASSPATH%
    d:\oracle\jdev32\java1.2\lib\tools.jar;d:\oracle\apache\apache\htdocs\web-inf\classes;d:\oracle\apac
    he\jserv\servlets

  • SOA Suite 11.1.1.6.0  Error - Please specify a valid JRE JDK location

    I am very new to Oracle installations and I cannot get past the " Please specify a valid JRE/JDK location :" message when installing the SOA Suite.
    I verified that all my prerequisites are in place.
    No matter what path I enter, it ignores it and repeats the message. I made sure to install JRE in a directory path with no spaces. I have tried installing jre-7u9-windows-i586 and also jre-7u9-windows-x64. I also tried pointing the location to the jdk160_29/jre/bin directory created by the SOA installation (again, no spaces in my path). Nothing seems to work.
    I am following the Quick Start Guide version 1.2 from August 2011 http://www.oracle.com/technetwork/middleware/soasuite/overview/quickstartguidesoasuite11gr1ps4-459545.pdf. I also looked at various postings and blogs.
    I am running this on a single Windows 7 Home Version SP1, 64-bit machine.
    Here is the full message:
    Starting Oracle Universal Installer...
    Checking if CPU speed is above 300 MHz . Actual 3292 MHz Passed
    Checking swap space: must be greater than 512 MB . Actual 2048 MB Passed
    Checking monitor: must be configured to display at least 256 colors Higher than
    256 . Actual 4294967296 Passed
    Preparing to launch Oracle Universal Installer from C:\Users\Robij\AppData\Loca
    l\Temp\OraInstall2012-11-20_09-46-59AM. Please wait ...
    Please specify JRE/JDK location ( Ex. /home/jre ), <location>/bin/java should e
    xist : \middleware\soasuite\jdk160_29\jre\bin
    Please specify a valid JRE/JDK location :
    As I said, I'm new to this, so sorry for the newbie question. Can anyone help me? Thanks.

    try this at commande ligne
    cd c:\the folder wish contient the setup.exe for soa suite
    setup *–jreLoc* c:\the jdk path directorie example(c:\oracle\midl…\jdk_18...hope that's help you
    Good luck

  • Compiling and running Java programs on my laptop

    I have just bought a new laptop but I can't run and compile Java programs using the javac filename.java command in the command prompt. I know I have to download something but I am not sure what link. I would be grateful if somebody could send me on a URL. My O/S is Windows XP. Can somebody advise please?

    If you just want to run java applications, you just need the JRE: J2SE 5.0 JRE
    If you want to compile java source code, you need the JDK: J2SE 5.0 JDK
    It includes also the JRE. Recommended is also the J2SE 5.0 Documentation that contains the javadoc API that describes all the Java classes.
    To start develeoping I recommend the Java Tutorial: http://java.sun.com/docs/books/tutorial/

  • Error msql command ... "Unable to create JVM. You need jre/jdk 1.3.1 or hig

    Hi All,
    I have successfully installed soa 10.1.3.1. I am using VMware with windows xp as os.
    The problem is occuring when i was trying to apply 1*0.1.3.4 patch* to my 10.1.3.1 installation.
    In the pre-installation instructions we need to upgrade the schema or rum some sql scripts. To do that when I tried to connect using
    msql system/manager@<connection string> i got the following error
    *"Unable to create JVM. You need jre/jdk 1.3.1 or higher"*
    I checked my path and java version also, it looks ok i mean i have 1.5.x java version.
    I am not sure what could be the issue.
    Did anyone of you encounter same or similar issue?
    Any help is highly appreciated.
    Thanks.

    I doubt the dehydration store is installed on mSQL.
    Have you installed basic or advanced. I'm assuming basic, by default this runs on olite.
    To upgrade you need to upgrade the bpel and esb schemas
    The login executables are in the following location
    SOA_HOME\bpel\bin\polsql.cmd (bpel)
    SOA_HOME\integration\esb\olite\bin\sql_olite.bat (ESB)
    cheers
    James

  • Error when I run java

    Hi there
    i am new to java, i tried to follow tutorial and tried to do my first program Hello World, javac is OK but when i run java HelloWorldApp then system shows me error, EXEPTION IN THREAD "MAIN" JAVA.LANG.........
    how can i solve this error?

    there is error message explanation on java website as shown in below but thats temporary solution when i try again it doesnt work whats permanent solution like permanent patch , i set CLASSPATH and PATH but when i close and open command prompt then run the J java HelloWorldApp then this error appear,
    in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp
    If you receive this error, java cannot find your bytecode file, HelloWorldApp.class.
    One of the places java tries to find your .class file is your current directory. So if your .class file is in C:\java, you should change your current directory to that. To change your directory, type the following command at the prompt and press Enter:
    cd c:\java
    The prompt should change to C:\java>. If you enter dir at the prompt, you should see your .java and .class files. Now enter java HelloWorldApp again.
    If you still have problems, you might have to change your CLASSPATH variable. To see if this is necessary, try clobbering the classpath with the following command.
    set CLASSPATH=
    Now enter java HelloWorldApp again. If the program works now, you'll have to change your CLASSPATH variable. To set this variable, consult the Update the PATH variable section in the JDK 6 installation instructions. The CLASSPATH variable is set in the same manner.
    -----------------------------------------------------------------------------------------------------------------------------------

  • How can i run java file by double click like Visual basic

    i have to run java file by giving a command on DOS promtp.But in Visual basic i easily make a .exe file to run my program. Does java provide this thing?
    please help me.

    If you have intaled a JRE in your computer, at leasrt in windows, the .jar files are asociated with the VM, so a double click on them will execute the, thats how things work on my computer, with jdk 1.4 installed.
    Abraham.

  • How to run java on computer without java from flash drive

    Im running a chess club at school and the school computers, you aren't allowed to install on the hard drive.
    Is there a way to put an ide and the java folder containing the jre and jdk on a flashdrive and run the ide and run programs solely from the lfashdrive?

    Yes. put the JDK (not the separate JRE) on the flash drive. The JDK contains a JRE.
    Plug the flashdrive into a computer you control. If that computer already has the desired JDK installed, copy the JDK directory (all of it) to the flash drive. Otherwise, do an install of the JDK to the flash drive.
    To run Java application programs use a command that provides the full path to the java.exe program, for instance (in Windows)
    *<drive letter>:\<some directories>java <the name of your program>*
    You could create a bat file to make this easier to type.
    You can't run applets or anything else that depends on Registry entries.

  • Can we run java programms on Windows XP?

    Hi experts..
    I installed JDK on Microsoft Windows XP Home Edition..but i am unable to run java programmes.
    can i run java programmes on Windows XP?? if so how??
    i will be very thankful..if any one solve this problem..

    Yes, you can. There's a bunch of things you need to do (mostly setting the path environment variable). You should look at the documentation that came with the JDK, and check out the many forum responses to problems in setting up the JDK on Win 2K and Win XP.
    HTH

Maybe you are looking for