Gera Jellema

Greenhorn
+ Follow
since Mar 08, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Gera Jellema

I don't know which linux you use, but this has been helpful for me:
http://www.goland.org/Tech/Installing_Java_in_Mandrake_9_1.html
This is the adress and underneath is a piece of the file.

Step 2 - Install Java Files -

Open a shell and login as root

You need to run sh on the bin file you downloaded in order to expand it. If you are downloading SDK version 1.4.2 then the command would be: sh j2sdk-1_4_2_01-linux-i586-rpm.bin

This will bring up another long license screen. Press the space bar a couple of hundred times and you will eventually get to a question along the lines of "Do you agree to the above license terms" to which you type in 'yes' (you already gave up your soul in step 1, so there isn't much to lose). This will cause the script you executed to decompress a .rpm file.

To install the RPM file type in "urpmi X" where X is the rpm filename. In the case of 1.4.2 this was "urpmi j2sdk-1_4_2_01-linux-i586.rpm". This will cause files in the RPM to be installed, somewhere.

Step 3 - Setting Up Your Java Environment -

As your normal non-root identity use your favorite editor to open ~/.bashrc
Add in the following path declaration "PATH=$PATH:X:" where X is the location of the bin directory. In my machine this is "PATH=$PATH:/usr/java/j2sdk1.4.2_01/jre/bin:".

Add in the following JAVA_HOME declaration (this tells Java programs where to find the files they need) "JAVA_HOME=X", this is the same X as before so on my system it is "JAVA_HOME=/usr/java/j2sdk1.4.2_01/jre/bin"

Then add in two export statements

export PATH

export JAVA_HOME

Save the file

You are now ready to run Java programs

Step 4 - Setting up Mozilla -
Based on http://plugindoc.mozdev.org/linux.html:

Open a root shell

You need to link the Java plugin file into your Mozilla installation. The command is "ln -s Y/plugin/i386/ns610/libjavaplugin_oji.so Z/plugins/libjavaplugin_oji.so". Where Y is the jre installation directory and Z is the mozilla installation directory. On my machine the command is "ln -s /usr/java/j2sdk1.4.2/jre/plugin/i386/ns610/libjavaplugin_oji.so /usr/lib/mozilla-1.3.1/plugins/libjavaplugin_oji.so"

NOTE: If you are using Mozilla 1.4 or higher you need to get the .so file from the /ns610-gcc32 directory not the /ns610 directory.

Gera
20 years ago
Hi,
I'm using kwrite because I'm working on a linux computer, so I think that should be ok.
Gera
20 years ago
Hi everyone,
as with a lot of people I'm new to this programming. I try to run the next program I got from someone. But from the second "/**" I get "illegal character: \154" with almost every line, and sometimes even 4 or 5 of such errors. In total I get 100 of the same errors

import java.io.*;
import org.biojava.bio.*;
import org.biojava.bio.seq.*;
import org.biojava.bio.seq.io.*;
import org.biojava.bio.symbol.*;
/**
�* <p>Program to six-frame translate a nucleotide sequence</p>
�*/
public class Hex {
� /**
�� * Call this to get usage info, program terminates after call.
�� */
� public static void help() {
��� System.out.println(
������� "usage: java utils.Hex <file> <format eg fasta> <dna|rna>");
��� System.exit( -1);
� }
� public static void main(String[] args) throws Exception{
��� if (args.length != 3) {
����� help();
��� }
��� BufferedReader br = null;
��� String format = args[1];
��� String alpha = args[2];
��� try {
����� br = new BufferedReader(new FileReader(args[0]));
����� SequenceIterator seqi =
��������� (SequenceIterator)SeqIOTools.fileToBiojava(format, alpha, br);
����� //for each sequence
����� while(seqi.hasNext()){
������� Sequence seq = seqi.nextSequence();
������� //for each frame
������� for (int i = 0; i < 3; i++) {
��������� SymbolList prot;
��������� Sequence trans;
��������� //take the reading frame
��������� SymbolList syms = seq.subList(
��������������� i+1,
��������������� seq.length() - (seq.length() - i)%3);

��������� //if it is DNA transcribe it to RNA
��������� if(syms.getAlphabet() == DNATools.getDNA()){
����������� syms = RNATools.transcribe(syms);
��������� }
��������� //output forward translation to STDOUT
��������� prot = RNATools.translate(syms);
��������� trans = SequenceTools.createSequence(prot, "",�seq.getName()+�"TranslationFrame: +"+i, Annotation.EMPTY_ANNOTATION);
��������� SeqIOTools.writeFasta(System.out, trans);
��������� //output reverse frame translation to STDOUT
��������� syms = RNATools.reverseComplement(syms);
��������� prot = RNATools.translate(syms);
��������� trans = SequenceTools.createSequence(prot, "", seq.getName() + "TranslationFrame: -" + i, Annotation.EMPTY_ANNOTATION);
��������� SeqIOTools.writeFasta(System.out, trans);
������� }
����� }
��� }
��� finally {
����� if(br != null){
������� br.close();
����� }
��� }
� }
}
These are just a few of these errors:
Hex.java:13: illegal character: \154
/**
^
Hex.java:16: illegal character: \154
public static void help() {
^
Hex.java:17: illegal character: \154
System.out.println(
^
Hex.java:17: illegal character: \154
System.out.println(
^
Hex.java:17: illegal character: \154
System.out.println(
^
Hex.java:18: illegal character: \154
"usage: java utils.Hex <file> <format eg fasta> <dna|rna>");
^
Hex.java:18: illegal character: \154
"usage: java utils.Hex <file> <format eg fasta> <dna|rna>");
^
Hex.java:18: illegal character: \154
"usage: java utils.Hex <file> <format eg fasta> <dna|rna>");
^
Thanks a lot
20 years ago