LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-10-2006, 06:33 AM   #1
lbdgwgt
Member
 
Registered: Aug 2006
Distribution: Ubuntu
Posts: 87

Rep: Reputation: 15
java error


Hi all,

i am trying to make small linux system on CF card. Now i am installing the JRE-1.5.0_09 from Sun. I had a problem.

So first of all I install JDK on my host and JRE on my target, both with the same version. And i tried to make the "Hello World!" program as described on the Sun Java tutorial site. It works on my host.

But as I run it on my target there were problems, i even cant get the help menu:
Code:
# java
There was an error trying to initialize the HPI library
Please check your installation. Hotspot does not work correctly
when installed in the JDK 1.2 Linux Production Release, or
with any JDK 1.1.x release.
Could not create the Java virtual machine.
anyone has experienced this? any suggestion for good reference building java in linux system?

thanks,
 
Old 11-10-2006, 07:21 AM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Can you run "java -version" on your target? It looks like you:

1 - Has two different Java installed on your system. A very old one and the new one, with the old one being the default or
2 - The installation of JDK on your target was corrupted. That happened to me sometimes ^_^.
 
Old 11-10-2006, 09:32 AM   #3
lbdgwgt
Member
 
Registered: Aug 2006
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Mega Man X
Can you run "java -version" on your target? It looks like you:

1 - Has two different Java installed on your system. A very old one and the new one, with the old one being the default or
2 - The installation of JDK on your target was corrupted. That happened to me sometimes ^_^.
No, it is completely strange. i made an image file at my laptop (host), mount it loop to e.g. /mnt/cf, build the basic rootfilesystem (/mnt/cf/bin, /mnt/cf/dev,/mnt/cf/boot, etc.) there, it works, then in /mnt/cf/java/ i installed the JRE.
if i execute the command from my laptop at /mnt/cf/java/jre-1.5.0_09/bin, java works fine. but as soon as i put the CF card on the target, the error arises.

is it possible that some environment variables are corrupted? I built the system from scratch. I haven't done many configuration files.
when i execute java_vm at my target, it says that i have to set JAVA_HOME and PLUGIN_HOME, but after i set it to JAVA_HOME=/usr/java/jre-1.5.0_09 and PLUGIN_HOME=/usr/java/jre-1.5.0_09/plugin, the same error arises.

Any reference about building java in cross development? i havent found good one in google.

thanks,

Last edited by lbdgwgt; 11-13-2006 at 06:56 AM.
 
Old 11-13-2006, 07:41 AM   #4
lbdgwgt
Member
 
Registered: Aug 2006
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Hi all,

I still stuck on these things. My Java cant be executed on my target system.

Code:
# env
SHELL /bin/bash
TERM=vt100
USER=root
PATH=/usr/sbin:/bin:/usr/sbin:/sbin:/usr/java/jre1.5.0_09/bin
PWD=/root
SHLVL=1
HOME=/root
LOGNAME=root
_=/usr/binenv

# java -version
There was an error trying to initialize the HPI library
Please check out your installation. HotSpot does not work correctly
when installed in the JDK 1.2 Linux Production Release, or 
with any JDK 1.1.x release.
Could not create the Java virtual machine.
But on my host system (CF card mounted on /media/usbdisk)
Code:
# pwd
/media/usbdisk

# usr/java/jre1.5.0_09/bin/java -version
java version "1.5.0_09"
Java(TM) 2 Runtime Environment, Standard Edition (nuild 1.5.0_09-b03)
Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode, sharing)
any clue? i have been searching for clues in the internet since tha last 3 days. Some saying configure the LD_LIBRARY_PATH in the order, and other tips, but doesnt work until now.

Thank you very much for any tips

Last edited by lbdgwgt; 11-13-2006 at 10:15 AM.
 
Old 11-14-2006, 02:26 AM   #5
lbdgwgt
Member
 
Registered: Aug 2006
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Hi all,

I couldnt solved the problem with JRE package version 1.5.0_09, but then I tried with JRE package version 1.4.2_13 and it worked fine. dont know what was the problem with the newest version.
I tried also with the package 1.5.0_06 and it works

Last edited by lbdgwgt; 11-30-2006 at 02:50 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Java-GTK glib-java-0.2.5 Error hikkerguy Linux - Software 2 07-19-2006 06:01 PM
Java error "Exception in thread "main" java.lang.StackOverflowError" nro Programming 1 09-04-2004 03:47 AM
Java Error kiley_rodgers Slackware 0 06-06-2003 01:11 PM
java error Hal Hunt Linux - General 1 07-17-2001 03:10 AM
java error Hal Hunt Linux - General 0 07-14-2001 09:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration