• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sun's j2sdkee Converter example  RSS feed

 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The URL for the example I am trying to implement is: http://java.sun.com/j2ee/sdk_1.2.1/techdocs/guides/ejb/html/Started2.html
In j2sdkee1.2.1, following this path:
j2sdkee1.2.1\doc\api\javax\ejb,

I find SessionBean.html and SessionContext.html which are the Sun documentation pages.

However, in the ConverterEJB.java file which is in j2sdkee1.2.1\doc\ guides\ejb\examples\converter , there is an import line which reads as follows:
import javax.ejb.SessionBean;
When I try to compile the ConverterEJB.java file, I get the following messages:
C:\jdk1.3.1\bin>javac c:\j2sdkee1.2.1\doc\guides\ejb\examples\converter\Convert
rEJB.java
c:\j2sdkee1.2.1\doc\guides\ejb\examples\converter\ConverterEJB.java:11: cannot resolve symbol
symbol : class SessionBean
location: package ejb
import javax.ejb.SessionBean;
^
c:\j2sdkee1.2.1\doc\guides\ejb\examples\converter\ConverterEJB.java:12: cannot resolve symbol
symbol : class SessionContext
location: package ejb
import javax.ejb.SessionContext;
^
c:\j2sdkee1.2.1\doc\guides\ejb\examples\converter\ConverterEJB.java:14: cannot resolve symbol
symbol : class SessionBean
location: class ConverterEJB
public class ConverterEJB implements SessionBean {
^
c:\j2sdkee1.2.1\doc\guides\ejb\examples\converter\ConverterEJB.java:31: cannot resolve symbol
symbol : class SessionContext
location: class ConverterEJB
public void setSessionContext(SessionContext sc) {}
^
4 error
Obviously, ConverterEJB is expecting to import the class files and finding the html files instead. I realize this is basic stuff, but I hope someone will help me get past this.
Thanks,
Betty
 
Joe Gilvary
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At http://java.sun.com/j2ee/sdk_1.2.1/ you
can download the classes for J2EE1.2.1 if you
didn't get them when you downloaded the docs.
You need to follow the installation instructions at http://java.sun.com/j2ee/sdk_1.2.1/install.html#win_soft
to complete the installation of the classes.
If you've done all that and it still doesn't work,
try copying any jar files it left on your system into
the C:\jdk1.3.1\jre\lib\ext\ directory. At least
javac should find the classes then.
You know that the 1.3 release is available from
Sun now, don't you?
Joe
 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know 1.3.1 is available for the jdk, but it appears the latest j2eesdk is 1.2.2.
I think I messed up by installing the docs first and have not succeeded in installing the classes properly. It's still not clear to me what to do now. Sun says, "If you install the software after you install the documentation, you should install the software in the parent directory of the documentation." I am not sure what they mean by "the parent directory of the documentation." I'm almost tempted to start over on this, but I might make the same mistakes again.
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you installed the docs in c:\j2ee then that is the parent directory of the docs.
 
Joe Gilvary
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look here:
http://java.sun.com/j2ee/sdk_1.3/
If you can uninstall the 1.2 release, then install
the 1.3 software and docs together, it may be simpler.
If you want to get the software for 1.2 after the
docs for 1.2, I think you would need to install it
to the "C:\" directory, based on what you've written.
Good luck.
Joe
 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

J2SDKee-1_3_01-win.exe:
I'm downloading the j2sdkee-1_3_01-win.exe now. Is there anything I need to do to remove j2sdkee.1.2.1 other than remove the directory?
Hopefully, I will succeed this time installing the j2sdkee. Thanks for all the advice and support.
 
Joe Gilvary
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you're using Windows, you should run the Uninstall
program to be sure that all the registry entries and
the like are cleaned up. System management on Windows
is a bear with settings strewn about different files
and registry keys so it's best to accept all the help
that those programs provide.
The "Add/Remove Programs" option in the W2K control
panel should let you remove the older SDK before you
install the new one. I don't know about any other
versions of Windows; this is the one my client provides
on their site.
Hope that helps.
Joe
 
Mary Taylor
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. That is what I did.
Unless I am missing something, the j2sdkee1.3 doesn't have this Converter example so I'll move on to the 1.3 tutorial. I lost the code with the install of 1.3.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!