Sun Java Solaris Communities My SDN Account Join SDN
 

Sun Developer Expert Assistance-Examples

Your extended team is a click away
Get expert technical help from the source - engineer to engineer
Active TabTestimonials
 

Here are some excerpts of what customers are saying about Sun Developer Expert Assistance.

“...Thanks for this great help. Now it works fine!!!
I will never go back to windows again. SUN RULES!!!!!...”   <New Solaris user>
 
“...Thank you very much. your point (5) was exactly what i needed. I'm successfully migrated, and a happy new NetBeans user.”   <Developer migrating to NetBeans>
 
To get the full story about these customers and others, click on the links below.
 
New Java Developer
New Solaris User
NetBeans Developer
Developer migrating to NetBeans from JBuilder
EJB developer
System administrator learning the Solaris OS
 
From an actual email exchange with a new Java developer

<New Java developer> wrote:

I have created a GUI in which several JTextField are added to a JPanel, all named jTextField1, jTextField2, jTextField3 etc... but how can I convert these JTextField to jTextField[1], jTextField[2], jTextField[3] etc... so that they can be use in a FOR LOOP, this information seems to be missing from the available documentation.

<New Java developer>

Sun Developer Expert Assistance wrote:

Dear <New Java developer>,

Try the following as a response to your request:

We can store all the text field objects in an array with the help of Reflection API. Here are the steps.

  1. Generate getter methods for all the JTextFields in your PositionalValueApplet.java file using the Netbeans IDE.

    Open the PositionalValueApplet.java in the source editor. In the source editor,
    Right Click -> Select Refactor -> Encapsulate Fields ->Select getter method for all the Text field Fields ->Click Finish.

    Newly generated getter methods are available in your java file.

  2. These getter methods will be used to get the references of JTextField objects. All the generated methods starts with "getD" in your case.

  3. Declare a array which can hold the JText fields.JTextField jtf [] = new JTextField [10];

  4. Use the following code snippet to store the references into array in your PositionalValueApplet.java file. [ code withheld for privacy reasons ]

  5. Edit the above code to change (10) the number of text fields to the number of text fields which you want to use in your application.

  6. Once it is stored you can use the JTextField Array in your logic to implement your business needs.

Please let us know if this answer / suggestion worked.

We ask you respond to us within 5 business days. If we do not hear from you we will close your case.

- Sun Developer Support Services

<New Java developer> wrote:

Thank you for the response, I will try to implement your code snippet.
The information you have provided I have not come across in any of the documentation that I have and got online through many GOOGLE searches. Could you direct me to whatever documentation you may have used to come up with an answer to my request. I am in the process of learning both Java language programming and the Netbeans developer environment. Documentation will go a long way to relieve some of the frustration a self teaching "newbie" goes through.

Again thank you.

<New Java developer>

 
From an actual email exchange with a new Java developer

<New Java Developer> wrote

I want to create some programs.

When I write java at the command prompt, the list of the options available is displayed, however, when I write javac, it says, file not found. Why hasn't javac.exe also been downloaded when other development tools such as java.exe and javaw.exe has been downloaded. Please let me know if I have downloaded the correct software or not? Please let me know ASAP. If no, then which is the right one and if yes, what should I do?

<New Java Developer>

Sun Developer Expert Assistance wrote:

Dear <New Java Developer>,

Try the following as a response to your request:

You have selected a wrong product ,j2eesdk-1_4_02_2005Q2- windows.exe is required if you have plans to develop enterprise applications.

For writing a Core Java program you need J2SDK installation.
You can get this from following link.
http://java.sun.com/j2se/1.5.0/download.jsp

Please let us know if this answer / suggestion worked.
We ask you respond to us within 3 business days. If we do not hear from you we will close your case.

- Sun Developer Support Services

<New Java Developer> wrote

Now I have downloaded the correct product!!

Thanks for the information and timely support.

Thanks and Regards,

<New Java Developer>

 
From an actual email exchange with a new Solaris user

<New Solaris User> wrote

Just want to get it [Solaris 10] to run. Can't get internet setup work.
And screen resolution doesn't work. Bad desktop screen. No luck to get it done yet.

<New Solaris User>

Sun Developer Expert Assistance wrote

Try the following as a response to your request:

To make internet run;
It's not clear who you have your internet connection from ISP; I'm presuming you have DSL modem connection (VPN) follow the following steps below; before make sure you have following things from your ISP

a. DNS domainname/ip-addresses
b. DSL Modem preconfigured by ISP, if not ask your ISP to set to DHCP mode
  1. Configure Ethernet to DHCP
    a. Ethernet Configured and Running
    # ifconfig -a
    [this will show you the which ethernet is configured; leave 'lo0', this is loopback device; find the other device;
    ex: rtls0, elxl0 ...

    If you do not see any thing beside 'lo0' then check with your system regarding your ethernet device supported by solaris;
    NOTE: You must have your ethernet adapter supported for Solaris 10; check with Solaris HCL; link below;
    http://www.sun.com/bigadmin/hcl/data/sol/

    example: to set your ethernet (for example; 'rtls0' device) to DHCP mode; simply # touch /etc/dhcp.rtls0
    [the format is # touch /etc/dhcp.<ethernet_name>]

    Let me know the output of following command if you are using VPN connection and unable to configure it as DHCP; or you don't understand the ethernet name.

  2. Domain Name entries configured; ask your ISP about DNS server domainname and IP addresses
    1. edit '/etc/resolv.conf', if exists; if not create and make your dns entries; ie. # vi /etc/resolv.conf
      domain   dns.ispname.com
      nameserver   192.168.1.1
      nameserver   192.168.1.1

    2. copy '/etc/nsswitch.dns' to '/etc/nsswitch.conf'; ie.
      # cp /etc/nsswitch.dns /etc/nsswitch.conf

    3. check with your ISP if they provide and proxy settings; add them to browser you are using;

    4. reboot your machine; next boot will have solaris ethernet configured as DHCP default automatically.
      # reboot

    5. afterboot; ping google.com;
      [you will see its response like; 'google.com is alive']

To make Resolution Fixed;
/usr/sbin/kdmconfig
[select your correct Graphics Adapter and Resolution; use arrow keys to scroll, space key to select and F2 key to accept]

NOTE: You must have your graphics adapter supported for Solaris 10; check with Solaris HCL; link below;
http://www.sun.com/bigadmin/hcl/data/sol/

Hope this helps. Please let us know if this answer/suggestion worked.
We ask you respond to us within 3 business days. If we do not hear from you we will close your case.

Sun Developer Support Services

<New Solaris User> wrote

Hi, Thanks for this great help. Now it works fine!!!

I will never get back to windows again.
SUN RULES!!!!!

<New Solaris user>

 
From an actual email exchange with a NetBeans Developer

<NetBeans Developer> wrote

I cannot find a directory called:

/Users/<my_name>/.netbeans

by using Finder in OS X.

Can you give me more details.

Thanks.

<NetBeans Developer>

Sun Developer Expert Assistance wrote:

Dear <NetBeans Developer>,

Try the following as a response to your request:

After opening Netbeans IDE -> Select the Help Menu -> Select About -> Select Detail Tab, which displays all the information regarding the Netbeans Product Information in that you will find the User Dir. Go to the User Dir location mentioned in the Netbeans Product information window & clear the netbeans folder & restart your Netbeans IDE again.

For more details about Netbeans on Mac you can refer to the below link

http://www.netbeans.org/kb/articles/mac.html

Can you send us the config/Services/Platforms/org-netbeans-api-java-Platform/default_platform.xml file in your userdir along with error log file which would be helpful for us.

Please let us know if this answer / suggestion worked. We ask you respond to us within 5 business days. If we do not hear from you we will close your case.

- Sun Developer Support Services

<NetBeans Developer> wrote

Thank you very much for your help. I finally found the .netbeans directory (with the help of the terminal) and removed it. That solved all my problems and now both 5.0 and 5.5 beta2 work fine.

Please be aware that on OS X, the "about" is under the "netbeans" menu, not the "help" menu as it is on a PC.

Thanks again for your help. In the future, I will know what to do if I have this problem again.

Regards,

<NetBeans Developer>

 
From an actual email exchange with a developer migrating to NetBeans from JBuilder

<Developer migrating to NetBeans> wrote

Hello, we're having problems trying to get past one of the dialog windows for importing a JBuilder project into NetBeans -- what are the JBuilder User Home and JBuilder installation folders? no matter what we put in these fields, the dialog box will not allow us to continue. we're a mixed mac/solaris shop and everything is NFS mounted. i'm wondering if somehow netbeans cannot follow directory links. maybe we just don't understand what jbuilder user home and jbuilder installation directories are, although one would think its what the names suggest :) we're using NB5.5 beta

<Developer migrating to NetBeans>

Sun Developer Assistance wrote

Try the following as a response to your request:

For importing JBuilder Project in Netbeans you need to Downloading JBuilder Project Importer Module You can download the JBuilder Project Importer Module to import projects that you have developed with JBuilder 2005 into NetBeans IDE. (For NetBeans IDE 5.5, this module can also import projects developed with JBuilder 2006). This module eliminates or greatly reduces the amount of work you have to do get your projects working in NetBeans IDE as they worked in JBuilder. For more details of JBuilder project migration to Netbeans IDE refer the following link http://www.netbeans.org/kb/articles/import-jbuilder.html Trying to import an existing JBuilder project into Netbeans, Steps :

  1. Open Netbeans 5.5beta2 IDE-> File -> Import Project -> Select JBuilder Poject Importer.

  2. A new window "Import JBuilder Java Project" opens, in the window you have enter or select four options.

  3. In "Project to Import" option, specify or select the java project files which contains *.jpr and *.jpx files for JBuilder2005, JBuilder2006 which is to be imported into Netbeans IDE.

  4. In "Destination Folder" option, specify or select the path of destination location where you want the Netbeans to save the newly imported JBuilder project on your local disk or drive.

  5. In "JBuilder User Home" option, specify the location of the instance of the Jbuilder which contains information about the IDE default settings loaded while starting Jbuilder IDE (e.g: /Users/(Your User Name)/Documents/.jbuilder)

  6. In "JBuilder Installation Folder" option, specify the path JBuilder 2005 or 2006 installation location on your local disk (e.g location : /Developer/Applications/JBuilder 2005 or /Developer/Applications/JBuilder 2006).7.

  7. Click Finish to complete to import JBuilder project into Netbeans.

Please let us know if this answer / suggestion worked.

We ask you respond to us within 3 business days. If we do not hear from you we will close your case.

Sun Developer Support Services

<Developer migrating to NetBeans> wrote

Thank you very much. your point (5) was exactly what i needed. i'm successfully migrated, and a happy new NetBeans user.

<Developer migrating to NetBeans>

 
From an actual email exchange with a customer using EJB technology

<EJB developer> wrote

<EJB developer>

Sun Developer Expert Assistance wrote:

Dear <EJB developer>,

Try the following as a response to your request:

It seems to us that the Glassfish persistence code (e.g. TopLink) is not able to find the descriptors for the entity classes it is trying to persist.  This can be either because it can't find the persistence.xml file or the persistence.xml file is missing the descriptor for the entity class.

The persistence classes are in EJB module along with the persistence.xml. But the controller classes which are trying to access the entity classes are in the WAR. You have to define persistence.xml in the project where you use it. Either use a session facade and keep the persistence.xml in EJB module or create a persistence.xml in WAR module.

Note that in the later case you also have to list the jar file of EJB module in persistence.xml so that the entity manager can find the classes - it normally only looks in the current module.

In addition to above suggestions, a third option would be to create a JAR containing the entities and the persistence.xml file and put it in the library directory of the EAR. The entities and the persistence unit would then be visible to all modules in the application.

Please let us know if this answer / suggestion worked.

We ask you respond to us within 5 business days. If we do not hear from you we will close your case.

Sun Developer Support Services

<EJB developer> wrote

Many thanks for the email and the mentoring type advice conveyed. The architecture you propose is highly appropriate for my teaching objectives...

I have what I think should be one final request for advice on how I now plan to amend my development sequence.

  1. In an EJB module, create the domain layer as Entities with the focus on capturing the data model and using the appropriate annotations to achieve a major increase in the proportion of the solution's executable specification which is human readable.

  2. Use the Entities from 1 to create the database tables.

  3. In a WEB module, add a Persistence Manager and employ the JSF Framework to generate CRUD functionality from the Entities.

  4. Use the CRUD functions to set up the content of my test database. Carry out a major refactoring task as follows.

  5. Reproduce the CRUD functionality in DAOs and remove the same from the generated JSF Controllers. Remove the WEB module Persistence manager.

  6. Employ a SessionBean and Interfaces to create an application facade to include the methods to invoke the CRUD operations in the DAOs, plus the business logic and business rules relating to processes which involve the Entity relationships, i.e. book borrowing and book reserving, accessing the DAOs when required.

  7. In the WEB module, create the additional JSPs for the relationship processing and controllers for these plus controllers for the CRUD JSPs.

I would be grateful if you could let me know of any major deficiencies in the approach outlined above.

regards

<EJB developer>

PS I am very grateful for the 'promo' which has allowed me to test drive the support service and expect to sign up soon.

 
From an actual email exchange with a system administrator learning to tune the OS

<System Administrator> wrote:

what is the significance of using sysdef command?

Sun Developer Expert Assistance wrote:

Dear <System Administrator>,

Try the following as a response to your request;

# sysdef
this will output all the system hardware details; including all the devices
and kernel tunable parameters.
inshot; system definition.

Please let us know if this answer / suggestion worked.
We ask you respond to us within 3 business days. If we do not hear from
you we will close your case.

Sun Developer Support Services

<System Administrator> wrote

hello sir,
your answer was very much helpful for me and i thank you for the reply

thanking you,

<System Administrator>

 

Deployed Java Application Support

Mission-critical support for Java applications on Solaris, Linux, and Windows platforms.

Why use Developer Services?
Watch the animation:
SPECIAL OFFER!
Get 25% off standard Sun Studio Software Service Plan. Use promo code "studio11" to get discount. Promotion ends 2/14/07
-->
It's 2:00 AM. Is your Java app up and running?