Quick navigation:        Home   |    Site Map   ||    References   |    Biography   ||    Copyright   |    Other copyright   |    Contact us   |   
Protein structure
 

Re: [ccp4bb] How to run Java program?

 

Basic tutorials:
 
 

CCP4bb navigation

CCP4bb <-- 2007 <-- April 2007 <-- 03 April 2007
Previous message:
Subject: Re: How to run Java program?
From: Kevin Cowtan cowtan {- at -} YSBL {- dot -} YORK {- dot -} AC {- dot -} UK
Date: 2007-04-03
Next message:
Subject: Re: Question about cryoprotectant
From: artem {- at -} XTALS {- dot -} ORG artem {- at -} XTALS {- dot -} ORG
Date: 2007-04-03


Subject: Re: How to run Java program?
From: Justin Schmitz Justin {- dot -} Schmitz {- at -} UNI-DUESSELDORF {- dot -} DE
Date: 2007-04-03

Kevin Cowtan schrieb:
> The file you need to run should end .class or .jar. If you don't have
> such a file, you'll need to compile it first. You probably need a java
> sdk rather than jre, although gcj might do the trick.
>
> Then:
> javac Switch.java
> should make the .class file. (You may need to include the path to your
> java compiler).
>
> Finally:
> java Switch.class
> should run it.
>
> Of course Switch may not be a runnable class, in which case you'll get
> an error.
>
> Kevin
>
> yang li wrote:
>> Hi,
>> I have a java program named Switch.java, I want to run it under
>> fedora5 core, I donnot know any compiler
>> I need to install? I installed a package named
>> jre-1_5_0_11-linux-i586-rpm.bin, when I use command
>> java Switch.java
>> wrong information came out:
>> Exception in thread "main" java.lang.NoClassDefFoundError: SwitchI
>> at gnu.java.lang.MainThread.run(libgcj.so.7)
>> Caused by: java.lang.ClassNotFoundException: SwitchI not found in
>> gnu.gcj.runtime.SystemClassLoader{urls=[file:./],
>> parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
>> at java.net.URLClassLoader.findClass(libgcj.so.7)
>> at java.lang.ClassLoader.loadClass(libgcj.so.7 )
>> at java.lang.ClassLoader.loadClass(libgcj.so.7)
>> at java.lang.Class.forName(libgcj.so.7)
>> at gnu.java.lang.MainThread.run(libgcj.so.7)
>>
>> Then I used command yum install libgcj.so.7 , but it was not helpful.
>> I am a java newhand, any help will be appreciated, thanks!
>

java Switch
will run it. Withut the .class

CCP4bb navigation

CCP4bb <-- 2007 <-- April 2007 <-- 03 April 2007
Previous message:
Subject: Re: How to run Java program?
From: Kevin Cowtan cowtan {- at -} YSBL {- dot -} YORK {- dot -} AC {- dot -} UK
Date: 2007-04-03
Next message:
Subject: Re: Question about cryoprotectant
From: artem {- at -} XTALS {- dot -} ORG artem {- at -} XTALS {- dot -} ORG
Date: 2007-04-03



ProteinCrystallography.org: Copyright 2006-2008 by Quid United Ltd