Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » java1.5 and javaSDK ee 5 installed, only 1.5 found by system
java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #242839] Tue, 11 December 2007 20:51 Go to next message
Eclipse UserFriend
Originally posted by: cuco2772.gmail.com

Since I have eclipse ee europa installed, I realized I needed to upgrade
my java from se 1.5 to the java ee 5 SDK, so I downloaded to
SDK with JDK .bin file from the sun site, and have made all the necessary
changes that I know of, but if I say 'which javac', it says /usr/bin/javac.


This is a real bugger of a problem, here's what I've done to try to
fix it:

I have java version "1.5.0_11", I cant compile servlets so I installed
this one, the SDK with JDK : java_ee_sdk-5_03-linux.bin, in /opt/SDK/jdk
Problem is, if I do javac, it only finds the 1.5 version, so I cant
compile servlets. I've reset $JAVA_HOME to /opt/SDK/jdk, doesnt help.
My other java and javac are in /opt/SDK/jdk/bin. Since I installed the
first
Java, the 1.5 one, using apt-get everything worked, so I thought maybe if I
tried to make a deb package out of the new Java, it might work.
So I did apt-get install java-package.

Here's what I did after that:

cuco@coat:~/Desktop$ fakeroot make-jpkg java_ee_sdk-5_03-linux.bin
Creating temporary directory: /tmp/make-jpkg.WOrlLt6874
Loading plugins: blackdown-j2re.sh blackdown-j2sdk.sh common.sh
ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk-doc.sh j2sdk.sh j2se.sh sun-j2re.sh
sun-j2sdk-doc.sh sun-j2sdk.sh

Detected Debian build architecture: i386
Detected Debian GNU type: i486-linux-gnu

No matching plugin was found.
Removing temporary directory: done

I'm about ready to give up at this point, any ideas on what to try ?
update-alterenatives doesnt find the right java either.
I dont know how to deal with the plugin issue. I posted a thread on the
ubuntu
forums and looked at similar threads there, but no answers.
I thought I'd try here, even though is only indirectly related to eclipse
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #242844 is a reply to message #242839] Tue, 11 December 2007 23:21 Go to previous messageGo to next message
Mark Dexter is currently offline Mark DexterFriend
Messages: 324
Registered: July 2009
Senior Member
Adam Posner wrote:
> Since I have eclipse ee europa installed, I realized I needed to upgrade
> my java from se 1.5 to the java ee 5 SDK, so I downloaded to SDK with
> JDK .bin file from the sun site, and have made all the necessary
> changes that I know of, but if I say 'which javac', it says /usr/bin/javac.
>
>
> This is a real bugger of a problem, here's what I've done to try to
> fix it:
>
> I have java version "1.5.0_11", I cant compile servlets so I installed
> this one, the SDK with JDK : java_ee_sdk-5_03-linux.bin, in /opt/SDK/jdk
> Problem is, if I do javac, it only finds the 1.5 version, so I cant
> compile servlets. I've reset $JAVA_HOME to /opt/SDK/jdk, doesnt help.
> My other java and javac are in /opt/SDK/jdk/bin. Since I installed the
> first
> Java, the 1.5 one, using apt-get everything worked, so I thought maybe if I
> tried to make a deb package out of the new Java, it might work. So I did
> apt-get install java-package.
>
> Here's what I did after that:
>
> cuco@coat:~/Desktop$ fakeroot make-jpkg java_ee_sdk-5_03-linux.bin
> Creating temporary directory: /tmp/make-jpkg.WOrlLt6874
> Loading plugins: blackdown-j2re.sh blackdown-j2sdk.sh common.sh
> ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk-doc.sh j2sdk.sh j2se.sh
> sun-j2re.sh sun-j2sdk-doc.sh sun-j2sdk.sh
>
> Detected Debian build architecture: i386
> Detected Debian GNU type: i486-linux-gnu
>
> No matching plugin was found.
> Removing temporary directory: done
>
> I'm about ready to give up at this point, any ideas on what to try ?
> update-alterenatives doesnt find the right java either.
> I dont know how to deal with the plugin issue. I posted a thread on the
> ubuntu
> forums and looked at similar threads there, but no answers. I thought
> I'd try here, even though is only indirectly related to eclipse
>
Hi Adam. This is probably a dumb question, but... As you may know,
Eclipse doesn't care about the $JAVA_HOME and javac stuff (unless of
course that means that the correct JRE is not properly installed).

So, have you actually tried going into Eclipse and checking if the JRE
is visible there? (Window/Preferences/Java/Installed JRE's) A long shot,
to be sure, but worth checking. HTH. Mark
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #242849 is a reply to message #242844] Wed, 12 December 2007 01:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Mark Dexter" <dextercowley@gmail.com> wrote in message
news:fjn63q$hvh$1@build.eclipse.org...
> Hi Adam. This is probably a dumb question, but... As you may know, Eclipse
> doesn't care about the $JAVA_HOME and javac stuff (unless of course that
> means that the correct JRE is not properly installed).
>
> So, have you actually tried going into Eclipse [...]

It was a bit hard for me to tell, but I think Adam's question was unrelated
to Eclipse... sounds to me like he's having trouble using javac at the
command line.

If the issue is happening within Eclipse, the right answer is probably to
specify the JRE explicitly on the Eclipse command line or .ini file; and to
add the JRE within Windows -> Preferences.
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #242854 is a reply to message #242849] Wed, 12 December 2007 01:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

Walter Harley wrote:
> "Mark Dexter" <dextercowley@gmail.com> wrote in message
> news:fjn63q$hvh$1@build.eclipse.org...
>> Hi Adam. This is probably a dumb question, but... As you may know, Eclipse
>> doesn't care about the $JAVA_HOME and javac stuff (unless of course that
>> means that the correct JRE is not properly installed).
>>
>> So, have you actually tried going into Eclipse [...]
>
> It was a bit hard for me to tell, but I think Adam's question was unrelated
> to Eclipse... sounds to me like he's having trouble using javac at the
> command line.
>
> If the issue is happening within Eclipse, the right answer is probably to
> specify the JRE explicitly on the Eclipse command line or .ini file; and to
> add the JRE within Windows -> Preferences.
>
>
It's not clear what your problem actually is. Java EE is api on top of
Java SE. There isn't a separate compiler for Java EE. Could you be
more specific on what you are trying to do, what you are expecting, and
what you are actually seeing.
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #242867 is a reply to message #242854] Wed, 12 December 2007 03:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cuco2772.gmail.com

I will try to be more specific about my problems.
I am trying to set up eclipse > tomcat > mysql development on my ubuntu
laptop
to java enterprise web development. I am a noob at doing this kind of
stuff, so
please forgive me if I say or do some dumb things.

When I try to start tomcat from eclipse, I get some error msg like
'Failed to publish ... configuration may be corrupt'.
It lists the directory in eclipse as Servers/apache-tomcat-6.0.14, on my
machine its actually in /usr/local/tomcat/apache-tomcat-6.0.14., not sure
if that matters. Whether I have previously started tomcat from a terminal
window or not,
it doesnt seem to matter as far as getting it to work in eclipse.
I did add apache-tomcat to my Servers (in eclipse), it shows up as
apache-tomcat-6.0.14.

As far as my Java issues go, I just now tried the suggestion of going to
Windows > Preferences in eclipse to see if I could find the new JRE I
installed
from there. I tried to add it by navigating (in that window that comes up)
to /opt/SDK/JDK/jre and hit add. It says there's jre found there !

I was initially confused about what to install from Sun's Java download
site.
As I said, I had a while back installed the sun-java-1.5 package using
apt-get.
When I looked at the Java 1.5 API docs, I didnt see any class definition
for
HttpServlet, so I figured I needed the Java ee 5 SDK edition. I first
downloaded the .bin that didnt include the JDK (since I already had a JDK),
nothing worked, so I removed my SDK directory and all the files in it, and
then downloaded the .bin with the JDK to /opt/SDK. So now I have
java ee 5 SDK (with JDK included) installed in /opt/SDK. There's a jre
directory in there, so I'm assuming everything I need Java wise should be
in /opt/SDK.

I have reset my $JAVA_HOME in my .bashrc (and in my /etc/bash.bashrc, this
is
ubuntu,so I did it there too, dont know if I needed to) to
/opt/SDK/jdk. (I'm wondering if I should have set it to /opt/SDK/jdk/bin or
something. )

I have a very simple HelloServlet.java located in
/usr/local/tomcat/apache-tomcat-6.0.14/webapps/ROOT/WEB-INF
When I do javac HelloServlet.java, I get the error message
'package javax.servlet.http does not exist'.
If I do a 'which java' or 'which javac' I get /usr/bin/java or
/usr/bin/javac.
I have a javac and a java for the new version I just installed in the
bin directory off /opt/SDK/jdk, so the new javac and java for the
java ee 5 SDK with the jdk are there, itlooks like there's a whole jre off
that /opt/SDK/jdk, but for some reason, only the jre that I originally
installed
in /usr/lib/jvm gets found. I havent found a jvm directory off of
/opt/SDK/jdk,
but I think all the same stuff is probably in there, just in different
directories.

By the way, if I go to localhost:8080, I get the tomcat home page, so its
set up correctly. When I start tomcat, I get this :

root@coati:/usr/local/tomcat/apache-tomcat-6.0.14/bin# ./startup.sh
Using CATALINA_BASE: /usr/local/tomcat/apache-tomcat-6.0.14
Using CATALINA_HOME: /usr/local/tomcat/apache-tomcat-6.0.14
Using CATALINA_TMPDIR: /usr/local/tomcat/apache-tomcat-6.0.14/temp
Using JRE_HOME: /opt/SDK/jdk

Not sure what to make of this problem. Any ideas on what to do about this
would be awesome, I'm about at my wits end. Sorry for the long post.
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #242873 is a reply to message #242867] Wed, 12 December 2007 03:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cuco2772.gmail.com

I just thought I should add a little extra clarification to my post above.
When I do type -a java I get this:

root@coati:/opt/SDK/jdk# type -a java
java is /usr/bin/java
java is /usr/bin/X11/java
java is /opt/SDK/jdk/bin/java
java is /opt/SDK/jdk/jre/bin/java
java is /opt/SDK/jdk/bin/java
java is /opt/SDK/jdk/jre/bin/java
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #242877 is a reply to message #242873] Wed, 12 December 2007 04:00 Go to previous messageGo to next message
Paul A. Rubin is currently offline Paul A. RubinFriend
Messages: 188
Registered: July 2009
Senior Member
Adam Posner wrote:
> I just thought I should add a little extra clarification to my post above.
> When I do type -a java I get this:
>
> root@coati:/opt/SDK/jdk# type -a java
> java is /usr/bin/java
> java is /usr/bin/X11/java
> java is /opt/SDK/jdk/bin/java
> java is /opt/SDK/jdk/jre/bin/java
> java is /opt/SDK/jdk/bin/java
> java is /opt/SDK/jdk/jre/bin/java
>
>

You mentioned update-alternatives in your first post, but just to
confirm: you ran 'update-alternatives --config java' and
'update-alternatives --config javac' and picked the Sun versions
(/opt/SDK/...) each time as the one to use?

/Paul
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #242913 is a reply to message #242877] Wed, 12 December 2007 16:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cuco2772.gmail.com

Here's what happens when I try to run update-alternatives for java and
javac:

root@coati:~# update-alternatives --config java

There are 2 alternatives which provide `java'.

Selection Alternative
-----------------------------------------------
1 /usr/bin/gij-wrapper-4.1
*+ 2 /usr/lib/jvm/java-1.5.0-sun/jre/bin/java

Press enter to keep the default[*], or type selection number:
root@coati:~# update-alternatives --config javac

There is only 1 program which provides javac
(/usr/lib/jvm/java-1.5.0-sun/bin/javac). Nothing to configure.
root@coati:~#

As you can see, only the one comes up.

As a hack, I briefly thought about trying to edit this file:

root@coati:~# cat /var/lib/dpkg/alternatives/javac
auto
/usr/bin/javac
javac.1.gz
/usr/share/man/man1/javac.1.gz

/usr/lib/jvm/java-1.5.0-sun/bin/javac
53
/usr/lib/jvm/java-1.5.0-sun/man/man1/javac.1.gz

but without knowing what I'm doing, I thought it would be foolish to try
something like that. (I think this is one of the places
update-alternatives looks)

The other hack I thought of was making a symlink from the one to points to
now
to the one I wanted. The problem with that idea is that the directory
structure is a bit different in the version I have in /opt/SDK/jdk, that
also
seems risky if there are other things that the system depend on to find
the right files that aren't changed also. Thats why creating the deb
package seemed the way to go, then I could have ubuntu do the configuring
for me.
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #242918 is a reply to message #242913] Wed, 12 December 2007 16:48 Go to previous messageGo to next message
Paul A. Rubin is currently offline Paul A. RubinFriend
Messages: 188
Registered: July 2009
Senior Member
Adam Posner wrote:
> Here's what happens when I try to run update-alternatives for java and
> javac:
>
> root@coati:~# update-alternatives --config java
>
> There are 2 alternatives which provide `java'.
>
> Selection Alternative
> -----------------------------------------------
> 1 /usr/bin/gij-wrapper-4.1
> *+ 2 /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
>
> Press enter to keep the default[*], or type selection number:
> root@coati:~# update-alternatives --config javac
>
> There is only 1 program which provides javac
> (/usr/lib/jvm/java-1.5.0-sun/bin/javac). Nothing to configure.
> root@coati:~#
> As you can see, only the one comes up.
>

Ok. I'm a bit fuzzy as to the specific problem here. In your earlier
post, you said 'which javac' turned up /usr/bin/javac. That's probably
correct. If you run 'ls -l /usr/bin/java*' you should find
/usr/bin/java symlinked to /etc/alternatives/java and similarly for a
bunch of other files. If you then run 'ls -l /etc/alternatives/java*/',
you'll find those names in turn symlinked to the real files. Are they
linking to the wrong places? Is the issue that you want them to link to
/opt/SDK/...?

Incidentally, the preferred approach for determining which Java files
are used to run Eclipse is to put in the Eclipse configuration file. So
if you're concerned about using the SDK to run Eclipse but are content
to have your Java 5 JRE used to run applications, that's probably the
path of least resistance.

/Paul
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #242945 is a reply to message #242918] Wed, 12 December 2007 21:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cuco2772.gmail.com

Yes, the symlinks are pointing to the Java 1.5, not the SDK,
they all point to /usr/lib/jvm/java-1.5.0-sun/.
java-1.5.0-sun is itself a symlink to java-1.5.0-sun-1.5.0.11, the actual
location. That'a why I was thinking of changing the java-1.5.0-sun symlink
to point to somewhere like /opt/SDK/jdk. I'm not sure if you can change
the value
of a symlink to a new value, maybe that would be a solution if I knew
everyplace
I needed to do it.

What file would I edit to change the config for eclipse ?
(Right now I cant even run tomcat from eclipse, but changing eclipse to
use the Java I want would be a start) Thanks for the help, by the way.
I'm amazed at how difficult it is to find any good docs on any of this.
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #242950 is a reply to message #242945] Wed, 12 December 2007 21:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

I think your getting to hung up on which VM you are running. There is only
one Java 1.5 VM. JSE and JEE refer to the jar files that are included in
each version. JSE is the base version of Java. JEE adds additional jar
files to provide the EE functions. You need to get the EE jar files on a
classpath before you can compile anything against the EE api.

Have you tried to go through some basic servlet tutorials? This might help
you get things figured out. Sun has an extensive EE tutorial at
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html.

One of the chapters has a tutorial for servlets.


"Adam Posner" <cuco2772@gmail.com> wrote in message
news:32fc974516ed90a92a6fc6c5ef9de319$1@www.eclipse.org...
> Yes, the symlinks are pointing to the Java 1.5, not the SDK,
> they all point to /usr/lib/jvm/java-1.5.0-sun/.
> java-1.5.0-sun is itself a symlink to java-1.5.0-sun-1.5.0.11, the actual
> location. That'a why I was thinking of changing the java-1.5.0-sun symlink
> to point to somewhere like /opt/SDK/jdk. I'm not sure if you can change
> the value
> of a symlink to a new value, maybe that would be a solution if I knew
> everyplace
> I needed to do it.
>
> What file would I edit to change the config for eclipse ?
> (Right now I cant even run tomcat from eclipse, but changing eclipse to
> use the Java I want would be a start) Thanks for the help, by the way.
> I'm amazed at how difficult it is to find any good docs on any of this.
>
>
>
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #243008 is a reply to message #242945] Thu, 13 December 2007 14:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Adam Posner wrote:
> Yes, the symlinks are pointing to the Java 1.5, not the SDK, they all
> point to /usr/lib/jvm/java-1.5.0-sun/.
> java-1.5.0-sun is itself a symlink to java-1.5.0-sun-1.5.0.11, the
> actual location. That'a why I was thinking of changing the
> java-1.5.0-sun symlink
> to point to somewhere like /opt/SDK/jdk. I'm not sure if you can change
> the value
> of a symlink to a new value, maybe that would be a solution if I knew
> everyplace
> I needed to do it.
> What file would I edit to change the config for eclipse ?
> (Right now I cant even run tomcat from eclipse, but changing eclipse to
> use the Java I want would be a start) Thanks for the help, by the way.
> I'm amazed at how difficult it is to find any good docs on any of this.

The troubles you are having is exactly the reason why system-wide
classpath and JVM settings are to be avoided at almost any cost, IMO.
Each app should be told explicitly what JVM to run under.

Anyway, there are lots of examples of eclipse.ini in the archives of
these newsgroups - Google can find them for you.
Here is a page that talks in detail about the eclipse.ini file,
including the -vm option that you are most interested in.
http://www.eclipse.org/swt/launcher.html

Hope this helps,
Eric
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #243020 is a reply to message #243008] Thu, 13 December 2007 20:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cuco2772.gmail.com

One thing that isnt clear is whether the jdk includes the jvm.
I dont see a jvm folder in my /opt/SDK/jdk directory where I installed
the 'java ee 5 SDK with JDK' download. Maybe there isnt a jvm there.
I see a jre folder. This has a bin, lib, javaws, and plugin subdirectories.
I'll copy and paste the contents of each below:

root@coati:/opt/SDK/jdk/jre# ls bin
ControlPanel java_vm jcontrol orbd policytool rmiregistry
tnameserv
java javaws keytool pack200 rmid servertool
unpack200
root@coati:/opt/SDK/jdk/jre# ls javaws
javaws
root@coati:/opt/SDK/jdk/jre#

root@coati:/opt/SDK/jdk/jre# ls lib
applet fontconfig.Turbo.properties.src
audio fonts
calendars.properties i386
charsets.jar im
classlist images
cmm javaws.jar
content-types.properties jce.jar
deploy jexec
deploy.jar jsse.jar
desktop jvm.hprof.txt
ext locale
flavormap.properties logging.properties
fontconfig.bfc management
fontconfig.properties.src management-agent.jar
fontconfig.RedHat.2.1.bfc meta-index
fontconfig.RedHat.2.1.properties.src net.properties
fontconfig.RedHat.3.bfc oblique-fonts
fontconfig.RedHat.3.properties.src plugin.jar
fontconfig.RedHat.bfc psfontj2d.properties
fontconfig.RedHat.properties.src psfont.properties.ja
fontconfig.Sun.bfc resources.jar
fontconfig.Sun.properties.src rt.jar
fontconfig.SuSE.bfc security
fontconfig.SuSE.properties.src sound.properties
fontconfig.Turbo.bfc zi
root@coati:/opt/SDK/jdk/jre#

root@coati:/opt/SDK/jdk/jre# ls plugin
desktop i386
root@coati:/opt/SDK/jdk/jre#

I wonder if I just installed
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #243029 is a reply to message #243020] Thu, 13 December 2007 21:36 Go to previous messageGo to next message
Mark Dexter is currently offline Mark DexterFriend
Messages: 324
Registered: July 2009
Senior Member
Adam Posner wrote:
> One thing that isnt clear is whether the jdk includes the jvm.
> I dont see a jvm folder in my /opt/SDK/jdk directory where I installed
> the 'java ee 5 SDK with JDK' download. Maybe there isnt a jvm there.
> I see a jre folder. This has a bin, lib, javaws, and plugin subdirectories.
> I'll copy and paste the contents of each below:
>
> root@coati:/opt/SDK/jdk/jre# ls bin
> ControlPanel java_vm jcontrol orbd policytool rmiregistry
> tnameserv
> java javaws keytool pack200 rmid servertool
> unpack200
> root@coati:/opt/SDK/jdk/jre# ls javaws
> javaws
> root@coati:/opt/SDK/jdk/jre#
> root@coati:/opt/SDK/jdk/jre# ls lib
> applet fontconfig.Turbo.properties.src
> audio fonts
> calendars.properties i386
> charsets.jar im
> classlist images
> cmm javaws.jar
> content-types.properties jce.jar
> deploy jexec
> deploy.jar jsse.jar
> desktop jvm.hprof.txt
> ext locale
> flavormap.properties logging.properties
> fontconfig.bfc management
> fontconfig.properties.src management-agent.jar
> fontconfig.RedHat.2.1.bfc meta-index
> fontconfig.RedHat.2.1.properties.src net.properties
> fontconfig.RedHat.3.bfc oblique-fonts
> fontconfig.RedHat.3.properties.src plugin.jar
> fontconfig.RedHat.bfc psfontj2d.properties
> fontconfig.RedHat.properties.src psfont.properties.ja
> fontconfig.Sun.bfc resources.jar
> fontconfig.Sun.properties.src rt.jar
> fontconfig.SuSE.bfc security
> fontconfig.SuSE.properties.src sound.properties
> fontconfig.Turbo.bfc zi
> root@coati:/opt/SDK/jdk/jre#
> root@coati:/opt/SDK/jdk/jre# ls plugin
> desktop i386
> root@coati:/opt/SDK/jdk/jre#
> I wonder if I just installed
>
>
Hi Adam. I think the JRE (Java Runtime Environment) includes the JVM. I
find this very confusing, even after just trying to read the Wikipedia
definitions of both. If I'm reading correctly, the JVM is just the
program that actually runs the .class files for that hardware platform
(e.g., java.exe on Windows), and the JRE includes both this and the
bundled class libraries that come with the Java language (i.e., the
rt.jar and other .jar files included with the JRE).

So there is no separate JVM download that one would normally use. HTH. Mark
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #243036 is a reply to message #243029] Thu, 13 December 2007 23:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cuco2772.gmail.com

Yes, you are right. For ex., the path /opt/SDK/jdk/demo/jvmti has the same
files as /usr/lib/jvm/java-1.5.0-sun-1.5.0.11/demo/jvmti.
I changed the version in eclipse.ini to 1.6 which is the one that is
included in the SDK that I downloaded.
After reading that link posted by Eric, I thought I would try launching
eclipse from the command line, using the -vm option to pass in the right
VM that I wanted. I'm not sure how to refer to the VM, though. I've tried
various things
like root@coati:/opt/eclipse# ./eclipse -vm javaVM1.6. Seg fault there.
I've also tried using the entire path,ie
root@coati:/opt/eclipse# ./eclipse -vm /opt/SDK/jdk/jre/bin/java_vm.
Evidently you cant launch it from the comand line without getting a
segfault,
maybe it has to do with an X11 display var not being set. Here's what it
says:

root@coati:/opt/eclipse# ./eclipse -vm /opt/SDK/jdk/jre/bin/java_vm
java_vm process: You need to set both JAVA_HOME and PLUGIN_HOME

(eclipse:7686): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(eclipse:7686): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion
`G_TYPE_CHECK_INSTANCE (instance)' failed

(eclipse:7686): Gtk-CRITICAL **: gtk_settings_get_for_screen: assertion
`GDK_IS_SCREEN (screen)' failed

(eclipse:7686): GLib-GObject-CRITICAL **: g_object_get: assertion
`G_IS_OBJECT (object)' failed

(eclipse:7686): GLib-GObject-WARNING **: value "TRUE" of type `gboolean'
is invalid or out of range for property `visible' of type `gboolean'

(eclipse:7686): Gtk-WARNING **: Screen for GtkWindow not set; you must
always set
a screen for a GtkWindow before using the window

(eclipse:7686): Gdk-CRITICAL **: gdk_pango_context_get_for_screen:
assertion `GDK_IS_SCREEN (screen)' failed

(eclipse:7686): Pango-CRITICAL **: pango_context_set_font_description:
assertion `context != NULL' failed

(eclipse:7686): Pango-CRITICAL **: pango_context_set_base_dir: assertion
`context != NULL' failed

(eclipse:7686): Pango-CRITICAL **: pango_context_set_language: assertion
`context != NULL' failed

(eclipse:7686): Pango-CRITICAL **: pango_layout_new: assertion `context !=
NULL' failed

(eclipse:7686): Pango-CRITICAL **: pango_layout_set_text: assertion
`layout != NULL' failed

(eclipse:7686): Pango-CRITICAL **: pango_layout_set_attributes: assertion
`layout != NULL' failed

(eclipse:7686): Pango-CRITICAL **: pango_layout_set_alignment: assertion
`layout != NULL' failed

(eclipse:7686): Pango-CRITICAL **: pango_layout_set_ellipsize: assertion
`PANGO_IS_LAYOUT (layout)' failed

(eclipse:7686): Pango-CRITICAL **: pango_layout_set_single_paragraph_mode:
assertion `PANGO_IS_LAYOUT (layout)' failed

(eclipse:7686): Pango-CRITICAL **: pango_layout_set_width: assertion
`layout != NULL' failed
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #243058 is a reply to message #243036] Fri, 14 December 2007 14:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

Adam Posner wrote:
> Yes, you are right. For ex., the path /opt/SDK/jdk/demo/jvmti has the same
> files as /usr/lib/jvm/java-1.5.0-sun-1.5.0.11/demo/jvmti. I changed the
> version in eclipse.ini to 1.6 which is the one that is included in the
> SDK that I downloaded. After reading that link posted by Eric, I thought
> I would try launching
> eclipse from the command line, using the -vm option to pass in the right
> VM that I wanted. I'm not sure how to refer to the VM, though. I've
> tried various things
> like root@coati:/opt/eclipse# ./eclipse -vm javaVM1.6. Seg fault there.
> I've also tried using the entire path,ie root@coati:/opt/eclipse#
> ./eclipse -vm /opt/SDK/jdk/jre/bin/java_vm.
> Evidently you cant launch it from the comand line without getting a
> segfault, maybe it has to do with an X11 display var not being set.
> Here's what it says:
>
> root@coati:/opt/eclipse# ./eclipse -vm /opt/SDK/jdk/jre/bin/java_vm
> java_vm process: You need to set both JAVA_HOME and PLUGIN_HOME

I have no idea what java_vm is, but I'm pretty sure the java executable
for the Sun JDKs and JREs is just named 'java'
So you'd need to specify -vm /path/to/where/java/is/installed/bin/java

The value of the -vm option must be the full path to the java executable.
I honestly don't understand why you're having so much trouble -
thousands of people run Eclipse on Linux every day. I would recommend
installing the Sun JDK into a new location and then editing eclipse.ini
to point to its java executable. On one Red Hat system I use, that is
/usr/java/jdk1.5.0_07/bin/java

Hope this helps,
Eric
Re: java1.5 and javaSDK ee 5 installed, only 1.5 found by system [message #243169 is a reply to message #243058] Fri, 14 December 2007 19:40 Go to previous message
Eclipse UserFriend
Originally posted by: cuco2772.gmail.com

I was thinking maybe it would be better to put it in the /usr dir.
I just tried starting the application server:

/opt/SDK/jdk/bin/asadmin start-domain domain1

Which I was able to start with the other install, but not now. The asadmin
program is not even there. it seems like the documentation that Sun gives
you
might not even be correct for the version you've downloaded.
Is the Sun application server even something I need to worry about ?

I want to delete everything I've downloaded and start from scratch.
Any advice on which version to download ?

http://java.sun.com/javaee/downloads/?intcmp=1282

Sun's site is confusing about what you need. If I could get away with
using J2SE 1.6 I could just use apt-get and everything would be fine.
But I dont see any class definition for HttpServlet in the API docs,
so I'm assuming I need j2ee 5.

One option would be to just keep the j2se 1.5 that I have now and just
download the ee 5 SDK, but I'm not sure where to put the download package
to
make sure files will be found by 1.5 compiler.

Here's what my current directory structure looks like for the 1.5 version
that I installed using apt-get:

root@coati:/usr/lib/jvm/java-1.5.0-sun-1.5.0.11# ls
bin docs jre man src.zip
COPYRIGHT ext lib README.html THIRDPARTYLICENSEREADME.txt
demo include LICENSE sample

Downloading the .bin file from the Sun site and running it extracts
everything
into a directory called SDK. Any idea where I should put that directory ?

What's weird is all the stuff having to do with jdk is in
/usr/share/doc/sun-java5-jdk, they're all documentation files. (This is
for the
1.5 version, I did an apt-get for the docs)

Anyway, what I recently downloaded and installed in /opt was from this
download: java_ee_sdk-5_03-linux.bin (update 3) This seems like it should
should be the right one.

Maybe the easiest question to ask would be, for those of you that manually
downloaded and installed some version of java ee on Linux, (with the tomcat
container), how did you get it working so you could compile and run simple
servlets on it ? I think if I get that working it will be easier to focus
on the eclipse configuration knowing that at least the Java part works.
Previous Topic:creating a new geronimo ear project
Next Topic:Eclipse overly complicated?
Goto Forum:
  


Current Time: Fri Oct 18 12:18:51 GMT 2024

Powered by FUDForum. Page generated in 0.30588 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top