Jbuilder7 on java 1.4
When I run jb7 on java1.4, I experience strange gui behaviour - for example some controls seems to steal focus from the edit pane. There are more of such glitches - rendering the gui almost unusable.
And since jbwheel doesn't work under jb7 anymore... java 1.4 sounds like the only option.
Has anyone tried running jb7 under 1.4? (can't live without my wheel!) :-)
1.4 is terribly borken with respect to Focus. If you read any of the JBuilder forums you would have been immediately instructed about that. But you can just as easily search the bug database here at Sun. Focus was probably the biggest change in 1.4, its completely new so expect some time to work out the bugs. I'm giving it 2 years.
Similar Messages
-
Hi!
I have been trying to make jBuilder7 Enterprise and WebLogic 7 Enterprise work
together for many days with no success. My problem is actually identical to one
issue recently posted on this user group:
From: CMPUser ([email protected])
Subject: Re: JB7+WL7 :Fail to run EJB and JSP in the same project
Date: 2002-09-20 10:40:48 PST
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=3d8b5b77%241%40newsgroups.borland.com
All I am trying to do is to use the Wizard to build a very simple Servlet. I am
following the intructions described in the following document:
http://bdn.borland.com/article/images/28943/12289_3jbweblogic.pdf.
Once the project is created, I get the following error message when I try to run
it:
<Oct 13, 2002 6:42:48 PM EDT> <Notice> <WebLogicServer> <000331> <Started WebLogic
Admin
Server "myserver" for domain "mydomain" running in Development Mode>
<Oct 13, 2002 6:42:49 PM EDT> <Error> <HTTP> <101018> <[ServletContext(id=824316,name=JBuilder_DefaultWebApp,context-path=)]
Servlet
failed with ServletException javax.servlet.UnavailableException: ServletContext(id=824316,name=JBuilder_DefaultWebApp,context-path=):
The server myserver is temporarily suspended
java.io.FileNotFoundException: no resource '/servlet/borland.demo.web.TestServlet'
Apparently WebLogic can not find the generated Servelet. Remember: all I am trying
to do is run a Servlet generated by the JBuilder wizard. Nothing else!
In my attempt to resolve the problem I tried moving the java file within the same
directory as the .shtml file. I also changed the Servlet section of the
.shtml from:
<servlet
codebase=""
code="borland.demo.web.TestServlet.class"
>
to
<servlet
codebase=""
code="TestServlet.class"
>
I still get an error but the error message has changed. Unfortunatelly the exception
message does not provide much insight into the cause of the problem. All
I know is that I get an servlet.UnavailableException:
<[ServletContext(id=4211180,name=JBuilder_DefaultWebApp,context-path=)] Servlet
failed with ServletExceptionjavax.servlet.UnavailableException:
ServletContext(id=4211180,name=JBuilder_DefaultWebApp,context-path=): The server
myserver is temporarily suspended at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3077)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2544)
at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)>
Could someone please help me solve this? What should I look for? How do I go about
resolving this?
I thank you in advance for your time.
Olga.Hi!
I have been trying to make jBuilder7 Enterprise and WebLogic 7 Enterprise work
together for many days with no success. My problem is actually identical to one
issue recently posted on this user group:
From: CMPUser ([email protected])
Subject: Re: JB7+WL7 :Fail to run EJB and JSP in the same project
Date: 2002-09-20 10:40:48 PST
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=3d8b5b77%241%40newsgroups.borland.com
All I am trying to do is to use the Wizard to build a very simple Servlet. I am
following the intructions described in the following document:
http://bdn.borland.com/article/images/28943/12289_3jbweblogic.pdf.
Once the project is created, I get the following error message when I try to run
it:
<Oct 13, 2002 6:42:48 PM EDT> <Notice> <WebLogicServer> <000331> <Started WebLogic
Admin
Server "myserver" for domain "mydomain" running in Development Mode>
<Oct 13, 2002 6:42:49 PM EDT> <Error> <HTTP> <101018> <[ServletContext(id=824316,name=JBuilder_DefaultWebApp,context-path=)]
Servlet
failed with ServletException javax.servlet.UnavailableException: ServletContext(id=824316,name=JBuilder_DefaultWebApp,context-path=):
The server myserver is temporarily suspended
java.io.FileNotFoundException: no resource '/servlet/borland.demo.web.TestServlet'
Apparently WebLogic can not find the generated Servelet. Remember: all I am trying
to do is run a Servlet generated by the JBuilder wizard. Nothing else!
In my attempt to resolve the problem I tried moving the java file within the same
directory as the .shtml file. I also changed the Servlet section of the
.shtml from:
<servlet
codebase=""
code="borland.demo.web.TestServlet.class"
>
to
<servlet
codebase=""
code="TestServlet.class"
>
I still get an error but the error message has changed. Unfortunatelly the exception
message does not provide much insight into the cause of the problem. All
I know is that I get an servlet.UnavailableException:
<[ServletContext(id=4211180,name=JBuilder_DefaultWebApp,context-path=)] Servlet
failed with ServletExceptionjavax.servlet.UnavailableException:
ServletContext(id=4211180,name=JBuilder_DefaultWebApp,context-path=): The server
myserver is temporarily suspended at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3077)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2544)
at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)>
Could someone please help me solve this? What should I look for? How do I go about
resolving this?
I thank you in advance for your time.
Olga. -
How to let users run your Java application
Hello,
I'm writing an application using JBuilder7 and it's wonderful designer: so far it is composed by only 2 class and imports java.awt.* and javax.swing.* (SDK 1.4)
Now, I've yet to finish it but I was wondering: "how will users be able to use it?"
I don't want them to install 30+ Mb of SDK so I've looked into the forums and elsewhere and come up with several answers:
1) Let them install JRE: but it's 10+ Mb and they would need to download it separately from my program.
2) Let them use somehow their browser's JVM..(should I turn my application into applet for this? I guess so)
3) Make an .exe: I know there are many programs to make .exe from java but they would make a one-platform-based file.
Also there were many hints about using .jar files to get things easier.
Is there a 4th option in which users have to download only a few mbs to use the application?
And about .jar, how should I use it?
Thank you very much for all your help :)Simply put - the users must download or be supplied the JRE. This must be installed before they can execute your java application.
As to distributing the application itself - You can jar (Java Archive) your classes into a single file.
You could as has been suggested create an EXE, but these generally are very large and tend to severely restrict the range of java technologies able to be used (EG Serialization, RMI, Reflection, class loading, ...)
Java is not intended for little tools that get installed separately - It is intended for larger applications or small applets in which case the download of the JRE is a minor concern.
Note that applets targeting Java 1.1.7 functionality work fine with most old browsers inbuilt JVMs - Your customers browser may not however have an inbuilt JVM and the user will still need to download the JRE to execute a SWING based applets.
Talden -
Can do applets at the Dos prompt but how in JBuilder7 ? HELP ! ! !
Dear People,
After two days of successfully doing applets at the Dos prompt
I am trying to do a first applet in JBuilder7 Personal Edition
I did
1) New
2) applet (double click)
3) renamed the .java file and .html file so the names
matched the name of my class.
4) typed in my source code
The error message said
"cannot access directory objectdraw"
but when I do:
Tools | Configure Libraries | Required Libraries
I see the objectdraw library listed
Your assistance is appreciated
below is the applet code
Stan
package stan_an_eventful_approach_ch1_makebox;
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import objectdraw.*;
public class MakeBox extends WindowController
public void begin()
public void onMousePress(Location point)
new FilledRect(30,150,30,20,canvas);
}Borland has an excellent set of newsgroups and very helpful assistants (known as TeamB). I suggest you visit borland.com and ask there.
-
Please I need a little help with Jbuilder7
Hello:
I�m working with Jbuilder7 Enterprise, i�m a trying to compile a program that use JMS Api, but when i make it, i always receive a message like this:
"Jms1.java": Error #: 750 : initialization error: com.borland.compiler.symtab.LoadError: java.io.IOException: class not found: class java.lang.Object.
I�ve revised project�s properties and it seems that they are well.
Even, this message appears if i use JMS wizard of Jbuilder.
Could anyone tell me what�s wrong?
Many thanks.
Sorry for my English ;-).Hi,
When u have this error message in JBuilder, generaly, that's 'cause ur JBuilder don't succes to locate ur JDK. Go to Tools / Configure JDKs... and verify if the JDK u're using in ur project is valid and/or try to re-configure it.
By default, JBuilder embed is own JDK located in $JBUILDER_HOME/jdk1.3.1
Hope this can help u
Seb -
Hi,
Facing a problem which is as follows. I am trying to run a java program using jdk1.3.1 by using the following command line but it gives me the error NoClassDefFoundError...although the path to the classes111.zip is set in my classpath variable still I am facing this problem. Help required :)
C:\Finland>C:\Devenv\JBuilder7\jdk1.3.1\bin\java -jar mdas.jar ParseInfo.prop
Starting Address Updation Program......
Input parameters checked........
writing to file operation started....
Loading default writer...
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/driver/Or
acleDriver
at com.dna.addressUpdate.util.Helper.getConnection(Helper.java:36)
at com.dna.addressUpdate.persistence.FileWriterPersistenceImpl.<init>(Fi
leWriterPersistenceImpl.java:26)
at com.dna.addressUpdate.util.StartUpdation.writeToFile(StartUpdation.ja
va:98)
at com.dna.addressUpdate.util.StartUpdation.main(StartUpdation.java:37)
C:\Finland>No luck, same result
C:\>set
ALLUSERSPROFILE=C:\Documents and Settings\All Users
APPDATA=C:\Documents and Settings\conmda\Application Data
CLASSPATH=C:\Mdas\classes12.zip;C:\Mdas\classes111.zip
COMMONHOME=C:\Program Files\Rational\common
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=AREA51
ComSpec=C:\WINNT\system32\cmd.exe
DISPLAY=:0.0
HOME=U:\
HOMEDRIVE=U:
HOMEPATH=\
HOMESHARE=\\fsecure\users\conmda
LOGONSERVER=\\NTS1
NUMBER_OF_PROCESSORS=1
C:\Finland>StartAddUpdateClient.bat ParseInfo.prop
Starting.......
All used variables initialized.....
Starting the main Client file........!!!!
C:\Devenv\JBuilder7\jdk1.3.1\bin\java -jar mdas.jar ParseInfo.prop
Starting Address Updation Program......
Input parameters checked........
writing to file operation started....
Loading default writer...
Exception in thread "main" java.lang.NoClassDefFoundError: oracle/jdbc/driver/Or
acleDriver
at com.dna.addressUpdate.util.Helper.getConnection(Helper.java:35)
at com.dna.addressUpdate.persistence.FileWriterPersistenceImpl.<init>(Fi
leWriterPersistenceImpl.java:26)
at com.dna.addressUpdate.util.StartUpdation.writeToFile(StartUpdation.ja
va:98)
at com.dna.addressUpdate.util.StartUpdation.main(StartUpdation.java:37) -
Error while running a Java Program
Can anyone help me,
I am getting the following error while running a Java program, Below is the exception thrown, please help.
java.nio.BufferOverflowException
at java.nio.Buffer.nextPutIndex(Buffer.java:425)
at java.nio.DirectByteBuffer.putChar(DirectByteBuffer.java:463)
at org.jetel.data.StringDataField.serialize(StringDataField.java:295)
at org.jetel.data.DataRecord.serialize(DataRecord.java:283)
at org.jetel.graph.DirectEdge.writeRecord(DirectEdge.java:216)
at org.jetel.graph.Edge.writeRecord(Edge.java:288)
at com.tcs.re.component.RESummer1.run(RESummer1.java:505)
java.nio.BufferOverflowException
at java.nio.Buffer.nextPutIndex(Buffer.java:425)
at java.nio.DirectByteBuffer.putChar(DirectByteBuffer.java:463)
at org.jetel.data.StringDataField.serialize(StringDataField.java:295)
at org.jetel.data.DataRecord.serialize(DataRecord.java:283)
at org.jetel.graph.DirectEdge.writeRecord(DirectEdge.java:216)
at org.jetel.graph.Edge.writeRecord(Edge.java:288)
at com.tcs.re.component.RECollectCont.run(RECollectCont.java:304)Ok, let's see. Write the following class:
public class Grunt {
public static void main(String[] args) {
System.out.println("Hello Mars");
}Save it as "C:\Grunt.java", compile by typing:
javac c:\Grunt.javaRun by typing:
java -classpath "C:\" GruntDoes it say "Hello Mars"? If yes, go back to your program and compare for differences (maybe you used the "package" statement?).
Regards -
Erro de SYSFAIL e Queda do Ambiente JAVA (PI)
Bom Dia
Estou num projeto de NFe e atualmente esta acontecendo o seguinte cenário de Erros:
Na SMQ2 , quando apresenta um aumento nas filas de Mensagens , aparece SYSFAIL em determinadas Filas , todas as outras travam , aumenta o numero de Filas.
Com essa mensagem de SYSFAIL nas filas , o serve0 (Parte JAVA do PI) cai e após isso estou tendo que efetuar manualmente um STOP/START em todos os canais de comunnicação para que os R/3 voltem a emitir NFe.
Isso esta ocorrendo com mais frequência após inserir uma nova empresa para emissão de NFe.
Alguem poderia me ajudar a entender por que ocorre o SYSFAIL as mensagens travam e derruba o ambiente JAVA ?
Sérgio.1º) Erro: Commit Fault: com.sap.aii.af.rfc.afcommunication.RfcAFWException:SenderA
2º) Foi alterado o numero de Filas O numero de Filas foi alterado , mas não consigo ver esse parametros na RZ10 , tem 3 entradas : X32_DVEBMGS32_NFISAP ; DEFAULT ; START_DVEBMGS32_NFISAP nessa transação ...onde eu vejo isso
3º) Esse parametro não tem nessa transação (/usr/sap//DVEBMGS00/j2ee/cluster/server0/log/). em qual desses diretórios abaixo eu encontro esse parametro ?
Existe esses:
DIR_ATRA /usr/sap/X32/DVEBMGS32/data
DIR_BINARY /usr/sap/X32/DVEBMGS32/exe
DIR_CCMS /usr/sap/ccms
DIR_CT_LOGGIN /usr/sap/X32/SYS/global
DIR_CT_RUN /usr/sap/X32/SYS/exe/run
DIR_DATA /usr/sap/X32/DVEBMGS32/data
DIR_DBMS /usr/sap/X32/SYS/SAPDB
DIR_EXECUTABLE /usr/sap/X32/DVEBMGS32/exe
DIR_EXE_ROOT /usr/sap/X32/SYS/exe
DIR_GEN /usr/sap/X32/SYS/gen/dbg
DIR_GEN_ROOT /usr/sap/X32/SYS/gen
DIR_GLOBAL /usr/sap/X32/SYS/global
DIR_GRAPH_EXE /usr/sap/X32/DVEBMGS32/exe
DIR_GRAPH_LIB /usr/sap/X32/DVEBMGS32/exe
DIR_HOME /usr/sap/X32/DVEBMGS32/work
DIR_INSTALL /usr/sap/X32/SYS
DIR_INSTANCE /usr/sap/X32/DVEBMGS32
DIR_LIBRARY /usr/sap/X32/DVEBMGS32/exe
DIR_LOGGING /usr/sap/X32/DVEBMGS32/log
DIR_MEMORY_INSPECTOR /usr/sap/X32/DVEBMGS32/data
DIR_ORAHOME /oracle/X32/102_64
DIR_PAGING /usr/sap/X32/DVEBMGS32/data
DIR_PUT /usr/sap/X32/put
DIR_PERF /usr/sap/tmp
DIR_PROFILE /usr/sap/X32/SYS/profile
DIR_PROTOKOLLS /usr/sap/X32/DVEBMGS32/log
DIR_REORG /usr/sap/X32/DVEBMGS32/data
DIR_ROLL /usr/sap/X32/DVEBMGS32/data
DIR_RSYN /usr/sap/X32/DVEBMGS32/exe
DIR_SAPHOSTAGENT /usr/sap/hostctrl
DIR_SAPUSERS ./
DIR_SETUPS /usr/sap/X32/SYS/profile
DIR_SORTTMP /usr/sap/X32/DVEBMGS32/data
DIR_SOURCE /usr/sap/X32/SYS/src
DIR_TEMP /tmp
DIR_TRANS /usr/sap/trans
DIR_TRFILES /usr/sap/trans
DIR_TRSUB /usr/sap/trans -
Starting deployment prerequisites: error in BI-Java installation sapinst
Hi all,
We are in process updating Bw 3.5 to BI 7.0 we hace sucessfully completed the Upgrade but while installing Bi java thru Sapinst in third step like java instance installtion i was stck with the below error.
We have downloaded the Cryptographic file and placed in jdk folder still the same problem is coming.
Please suggest...
Thanks,
Subhash.G
Starting deployment prerequisites:
Oct 13, 2007 2:42:18 AM Error: Creation of DataSource for database "BWQ" failed.
Original error message is:
com.sap.sql.log.OpenSQLException: Error while accessing secure store: Encryption or decryption is not possible because the full version of the SAP Java Crypto Toolkit was not found (iaik_jce.jar is required, iaik_jce_export.jar is not sufficient) or the JCE Jurisdiction Policy Files don't allow the use of the "PbeWithSHAAnd3_KeyTripleDES_CBC" algorithm..
Stack trace of original Exception or Error is:
com.sap.sql.log.OpenSQLException: Error while accessing secure store: Encryption or decryption is not possible because the full version of the SAP Java Crypto Toolkit was not found (iaik_jce.jar is required, iaik_jce_export.jar is not sufficient) or the JCE Jurisdiction Policy Files don't allow the use of the "PbeWithSHAAnd3_KeyTripleDES_CBC" algorithm..Problem solved followed the notes 1063396.
-
If Statement in java.awt paint
import java.applet.Applet; //bring in the applet class
import java.awt.*; //bring in the graphics class
import java.awt.event.*; //bring in the event class
import java.text.DecimalFormat; //bring in the decimal format class
import java.lang.Float; //bring in the float class
public class Bmi extends Applet implements ActionListener { //begin program and start ActionListener
Label weight, height; //define Label variable
TextField weighttext, heighttext; //define TextField variables
Button calculate; //define button variables
float index, wt, ht, max, min; //define float variables
DecimalFormat fmt2 = new DecimalFormat("#.00"); //set decimal format for reals
public void init() { //begin init()
weight = new Label("Please enter your weight in Kg. (2 decimal places): "); //define content of Label weight
weighttext = new TextField(6); //define size of TextField
height = new Label("Please enter your height in Metres (2 decimal places): "); //define content of Label height
heighttext = new TextField(5); //define size of TextField
calculate = new Button("Calculate!!"); //define content of Button
add(weight); //add Label weight to the GUI
add(weighttext); //add TextField weighttext to the GUI
add(height); //add Label height to the GUI
add(heighttext); //add TextField heighttext to the GUI
add(calculate); //add button calculate to the GUI
calculate.addActionListener(this); //wait for button to be returned
wt = 0; //reset wt to 0
index = 0; //reset index to 0
ht = 0; //reset ht to 0
max = 0; //reset max to 0
min = 0; //reset min to 0
public void actionPerformed( ActionEvent e ) { //run upon return of button
wt = Float.parseFloat(weighttext.getText()); //convert weighttext from String to Float
ht = Float.parseFloat(heighttext.getText()); //covert heighttext from String to Float
repaint(); //refresh paint area
public float indexer() //begin indexer method
float ind; //delare local variable ind
ind = wt/(ht*ht); //perform calculation
return ind; //make indexer() the value of variable ind
} // end of indexer method
public float maxWeight() //begin maxWeight method
float maxwt; //declare local variable maxwt
final float UPPER = 25.0f; //declare variable UPPER as a float with a decimal value of 25.0
maxwt = UPPER*ht*ht; //perform calculation
return maxwt; //make maxWeight() the value of variable maxwt
} // end of maxWeight method
public float minWeight() //begin minWeight method
float minwt; //declare local variable minwt
final float LOWER= 20.0f; //declare variable LOWER as a float with a decimal value of 20.0
minwt = LOWER*ht*ht; //perform calculation
return minwt; //make minWeight() the value of variable minwt
} // end of minWeight method
public void paint(Graphics g) //begin paint method, define g as Graphics
index=indexer(); //covert method indexer() to variable index
max=maxWeight(); //convert method maxWeight() to variable max
min=minWeight(); //convert method minWeight() to variable min
g.setFont(new Font("Verdana", Font.ITALIC, 15)); //define font, weight and size
g.setColor(new Color(90,90,90)); //set new colour
g.drawRect(5,100,300,75); //define size of rectangle
g.setColor(new Color(255,107,9)); //set new colour
g.drawString("BMI is " + fmt2.format(index) + " for " + fmt2.format(wt) + "kg",20,120); //create string in paint, define its on screen position
g.drawString("Maximum bodyweight is " + fmt2.format(max) + "kg", 20,140); //create string in paint, define its on screen position
g.drawString("Minimum bodyweight is " + fmt2.format(min) + "kg", 20,160); //create string in paint, define its on screen position
} // end of paint method
} // end of Bmi classI have written the above code to calculate someones BMI (Body Mass Index). Basically as you can see it recieves a weight and height from the user and calculates the rest. But whilst that good I would like to know how I can make it tell the user something to the effect of "Your overweight" or "Your underweight". The if statement runs like this:
if (wt > max)This forum doesn't quite handle <> properly. The greater and less than symbols. So above you will see > this is the html character code for a greater than symbol so please read it as such.
And then if wt is greater than max then it will say "Your overweight".
But I can't figure out how to include it in the above program. Becuase it won't run in paint, atleast it won't the way I have done it previously. So can you think of any other ways?
Help much appreciated,
SimonThanks very much that works well.
Simon
My code now looks like this: import java.applet.Applet; //bring in the applet class
import java.awt.*; //bring in the graphics class
import java.awt.event.*; //bring in the event class
import java.text.DecimalFormat; //bring in the decimal format class
import java.lang.Float; //bring in the float class
public class Bmi extends Applet implements ActionListener { //begin program and start ActionListener
Label weight, height; //define Label variable
TextField weighttext, heighttext; //define TextField variables
Button calculate; //define button variables
float index, wt, ht, max, min; //define float variables
DecimalFormat fmt2 = new DecimalFormat("#.00"); //set decimal format for reals
public void init() { //begin init()
weight = new Label("Please enter your weight in Kg. (2 decimal places): "); //define content of Label weight
weighttext = new TextField(6); //define size of TextField
height = new Label("Please enter your height in Metres (2 decimal places): "); //define content of Label height
heighttext = new TextField(5); //define size of TextField
calculate = new Button("Calculate!!"); //define content of Button
add(weight); //add Label weight to the GUI
add(weighttext); //add TextField weighttext to the GUI
add(height); //add Label height to the GUI
add(heighttext); //add TextField heighttext to the GUI
add(calculate); //add button calculate to the GUI
calculate.addActionListener(this); //wait for button to be returned
wt = 0; //reset wt to 0
index = 0; //reset index to 0
ht = 0; //reset ht to 0
max = 0; //reset max to 0
min = 0; //reset min to 0
public void actionPerformed( ActionEvent e ) { //run upon return of button
wt = Float.parseFloat(weighttext.getText()); //convert weighttext from String to Float
ht = Float.parseFloat(heighttext.getText()); //covert heighttext from String to Float
repaint(); //refresh paint area
public float indexer() //begin indexer method
float ind; //delare local variable ind
ind = wt/(ht*ht); //perform calculation
return ind; //make indexer() the value of variable ind
} // end of indexer method
public float maxWeight() //begin maxWeight method
float maxwt; //declare local variable maxwt
final float UPPER = 25.0f; //declare variable UPPER as a float with a decimal value of 25.0
maxwt = UPPER*ht*ht; //perform calculation
return maxwt; //make maxWeight() the value of variable maxwt
} // end of maxWeight method
public float minWeight() //begin minWeight method
float minwt; //declare local variable minwt
final float LOWER= 20.0f; //declare variable LOWER as a float with a decimal value of 20.0
minwt = LOWER*ht*ht; //perform calculation
return minwt; //make minWeight() the value of variable minwt
} // end of minWeight method
public void you(Graphics g)
String statement;
if(wt > max) statement="You are very fat";
else if(wt < min) statement="You are very thin";
else statement="You are in the recommended weight range for your height";
g.drawString(statement, 20,210);
public void paint(Graphics g) //begin paint method, define g as Graphics
you(g);
index=indexer(); //covert method indexer() to variable index
max=maxWeight(); //convert method maxWeight() to variable max
min=minWeight(); //convert method minWeight() to variable min
g.setFont(new Font("Verdana", Font.ITALIC, 15)); //define font, weight and size
g.setColor(new Color(90,90,90)); //set new colour
g.drawRect(5,100,300,75); //define size of rectangle
g.setColor(new Color(255,107,9)); //set new colour
g.drawString("BMI is " + fmt2.format(index) + " for " + fmt2.format(wt) + "kg",20,120); //create string in paint, define its on screen position
g.drawString("Maximum bodyweight is " + fmt2.format(max) + "kg", 20,140); //create string in paint, define its on screen position
g.drawString("Minimum bodyweight is " + fmt2.format(min) + "kg", 20,160); //create string in paint, define its on screen position
} // end of paint method
} // end of BmiThanks again,
Simon -
SSO java sample application problem
Hi all,
I am trying to run the SSO java sample application, but am experiencing a problem:
When I request the papp.jsp page I end up in an infinte loop, caught between papp.jsp and ssosignon.jsp.
An earlier thread in this forum discussed the same problem, guessing that the cookie handling was the problem. This thread recommended a particlar servlet , ShowCookie, for inspecting the cookies for the current session.
I have installed this cookie on the server, but don't see anything but one cookie, JSESSIONID.
At present I am running the jsp sample app on a Tomcat server, while Oracle 9iAS with sso and portal is running on another machine on the LAN.
The configuration of the SSO sample application is as follows:
Cut from SSOEnablerJspBean.java:
// Listener token for this partner application name
private static String m_listenerToken = "wmli007251:8080";
// Partner application session cookie name
private static String m_cookieName = "SSO_PAPP_JSP_ID";
// Partner application session domain
private static String m_cookieDomain = "wmli007251:8080/";
// Partner application session path scope
private static String m_cookiePath = "/";
// Host name of the database
private static String m_dbHostName = "wmsi001370";
// Port for database
private static String m_dbPort = "1521";
// Sehema name
private static String m_dbSchemaName = "testpartnerapp";
// Schema password
private static String m_dbSchemaPasswd = "testpartnerapp";
// Database SID name
private static String m_dbSID = "IASDB.WMDATA.DK";
// Requested URL (User requested page)
private static String m_requestUrl = "http://wmli007251:8080/testsso/papp.jsp";
// Cancel URL(Home page for this application which don't require authentication)
private static String m_cancelUrl = "http://wmli007251:8080/testsso/fejl.html";
Values specified in the Oracle Portal partner app administration page:
ID: 1326
Token: O87JOE971326
Encryption key: 67854625C8B9BE96
Logon-URL: http://wmsi001370:7777/pls/orasso/orasso.wwsso_app_admin.ls_login
single signoff-URL: http://wmsi001370:7777/pls/orasso/orasso.wwsso_app_admin.ls_logout
Name: testsso
Start-URL: http://wmli007251:8080/testsso/
Succes-URL: http://wmli007251:8080/testsso/ssosignon.jsp
Log off-URL: http://wmli007251:8080/testsso/papplogoff.jsp
Finally I have specified the cookie version to be v1.0 when running the regapp.sql script. Other parameters for this script are copied from the values specified above.
Unfortunately the discussion in the earlier thread did not go any further but to recognize the cookieproblem, so I am now looking for help to move further on from here.
Any ideas will be greatly appreciated!
/MadsPierre - When you work on the sample application, you should test the pages in a separate browser instance. Don't use the Run Page links from the Builder. The sample app has a different authentication scheme from that used in the development environment so it'll work better for you to use a separate development browser from the application testing browser. In the testing browser, to request the page you just modified, login to the application, then change the page ID in the URL. Then put some navigation controls into the application so you can run your page more easily by clicking links from other pages.
Scott -
SSO between a Java EE application (Running on CE) and r/3 backend
Hi All,
Over the past few days I have been trying to implement a SSO mechanism between NW CE Java Apps and R/3 backend without any success. I have been trying to use SAP logon tickets for implementing SSO.
Below is what I need:
I have a Java EE application which draws data from R/3 backend and does some processing before showing data to the users. As of now the only way the Java App on CE authenticates to r/3 backend is by passing the userid and pwds explicitly. See sample authentication code below:
BindingProvider bp = (BindingProvider) myService;
Map<String,Object> context = bp.getRequestContext();
context.put(BindingProvider.USERNAME_PROPERTY, userID);
context.put(BindingProvider.PASSWORD_PROPERTY, userPwd);
Now this is not the way we want to implement it. What we need is when the user authenticates to CE ( using CE's UME) CE issues a SAP logon ticket to the user. This ticket should be used to subsequently login to other system without having to pass the credentials. We have configured the CE and Backend to use SAP logon tickets as per SAP help.
What I am not able to figure out is: How to authenticate to SAP r/3 service from the java APP using SAP logon tickets. I couldnt find any sample Java code on SAP help to do this. (For example the above sample code authenticates the user by explicitly passing userid and pwd, I need something similar to pass a token to the backend)
Any help/pointers on this would be great.
Thanks,
DhananjayHi,
Have you imported the java certificate into R/3 backend system ? if so.
Then just go to backend system and check on sm50 for each applicaion instance of any error eg.
SM50-> Display files (ICON) as DB symbol with spect.(cntrlshiftF8)
You will get logon ticket details.
with thanks,
Rajat -
'Unable to Launch Application Error' - Java Web Start Running Under MS IIS.
I am attempting to render the following .jnlp in MS IE:
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File for LottoMadness Application -->
<jnlp
codebase="http://localhost/LottoMadness/"
href="LottoMadness.jnlp">
<information>
<title>LottoMadness Application</title>
<vendor>Rogers Cadenhead</vendor>
<homepage href="http://localhost/LottoMadness/"/>
<icon href="lottobigicon.gif"/>
</information>
<resources>
<j2se version="1.5"/>
<jar href="LottoMadness.jar"/>
</resources>
<application-desc main-class="LottoMadness"/>
</jnlp>I've deployed the .jnlp, .gif, and .jar to MS IIS, running locally on my PC.
When I attempt to render the .jnlp in IE I obtain an 'Application Error' window stating 'Unable to Launch Application'. Clicking details gives me:
com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://localhost/LottoMadness/LottoMadness.jnlp
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source)
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)
at com.sun.javaws.Launcher.launch(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)I have configured MS IIS for Web Start, by setting the Extension/Content Type fields to .jnlp and application/x-java-jnlp-file.
(The .jnlp is basically from 'Programming with Java in 24 Hours', as this is the book I am learning Java from.)AndrewThompson64 wrote:
I am not used to seeing references to a local server that do not include a port number.
E.G. http://localhost:8080/LottoMadness/
I have deployed the following HTML (HelpMe.html) to the web server:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Untitled</title>
</head>
<body>
Help Me!
</body>
</html>When I attempt to render the URL in IE, I see the page just fine. The URL is use is:
http://localhost/LottoMadness/HelpMe.htmlSo, I think my web server setup and usage is ok.
>
As an aside, what happens if (your MS IIS is running and) you click a direct link to..
[http://localhost/LottoMadness/LottoMadness.jnlp|http://localhost/LottoMadness/LottoMadness.jnlp]
When I click this link I get the error and exception I cited in my previous post. -
Partner Application written in other language than PL/SQL and Java
I have an application written in another language than PL/SQL or Java. I want to integrate this application as an Partner apps where I use the same user repository as Portal.
Can I integrate the application by calling a stored PL/SQL-procedure based on the PLSQL SSO APIs examples that authenticates the user based on the username/password in portal and redirects the user to the application ?
Are there any examples / references where this has been done ?
JensCheck out the PDK referance for URL-Services, which allow you to integrate with any web based service/content.
http://portalstudio.oracle.com/servlet/page?_pageid=350&_dad=ops&_schema=OPSTUDIO -
Possibility of drawing numbers on java bouncing balls?
Can anyone show me how to put numbers on these moving balls in my code. I need the numbers 1-60 on them. I have two sets the red and white. Here is my code. Any help is appreciated. I am trying to write a program to represent the powerball.
import java.awt.*;
import java.applet.*;
import java.util.*;
import javax.swing.*;
import java.awt.Rectangle;
class CollideBall{
int width, height;
public static final int diameter=20;
//coordinates and value of increment
double x, y, xinc, yinc, coll_x, coll_y;
boolean collide;
Color color;
Graphics g;
Rectangle r;
//the constructor
public CollideBall(int w, int h, int x, int y, double xinc, double yinc, Color c){
width=w;
height=h;
this.x=x;
this.y=y;
this.xinc=xinc;
this.yinc=yinc;
color=c;
r=new Rectangle(150,80,130,90);
public double getCenterX() {return x+diameter/2;}
public double getCenterY() {return y+diameter/2;}
public void alterRect(int x, int y, int w, int h){
r.setLocation(x,y);
r.setSize(w,h);
public void move(){
if (collide){
double xvect=coll_x-getCenterX();
double yvect=coll_y-getCenterY();
if((xinc>0 && xvect>0) || (xinc<0 && xvect<0))
xinc=-xinc;
if((yinc>0 && yvect>0) || (yinc<0 && yvect<0))
yinc=-yinc;
collide=false;
x+=xinc;
y+=yinc;
//when the ball bumps against a boundary, it bounces off
//ball width is 6 so if the ball becomes less then 6 it is touching the frame
//if ball is greater than the entire width-the diameter of the rectangle, then the ball is just touching the frame of the rectangle and must switch to negative to go in opposit direction
if(x<6 || x>width-diameter){
xinc=-xinc;
x+=xinc;
//same thing as about just about the Y-axis instead of the x-axis
if(y<6 || y>height-diameter){
yinc=-yinc;
y+=yinc;
public void hit(CollideBall b){
if(!collide){
coll_x=b.getCenterX();
coll_y=b.getCenterY();
collide=true;
public void paint(Graphics gr){
g=gr;
g.setColor(color);
//the coordinates in fillOval have to be int, so we cast
//explicitly from double to int
g.fillOval((int)x,(int)y,diameter,diameter);
//Draws half white and half dark gray arc around the balls to give light and shadow effect
g.setColor(Color.white);
g.drawArc((int)x,(int)y,diameter,diameter,45,180);
g.setColor(Color.darkGray);
g.drawArc((int)x,(int)y,diameter,diameter,225,180);
public class BouncingBalls extends Applet implements Runnable {
Thread runner;
Image Buffer;
Graphics gBuffer;
CollideBall ball[];
//Obstacle o;
//how many balls?
static final int MAX=60;
boolean intro=true,drag,shiftW,shiftN,shiftE,shiftS;
boolean shiftNW,shiftSW,shiftNE,shiftSE;
int xtemp,ytemp,startx,starty;
int west, north, east, south;
public void init() {
Buffer=createImage(getSize().width,getSize().height);
gBuffer=Buffer.getGraphics();
ball=new CollideBall[MAX];
int w=getSize().width-5;
int h=getSize().height-5;
//our balls have different start coordinates, increment values
//(speed, direction) and colors
for (int i = 0;i<30;i++){
ball=new CollideBall(w,h,48+i,500+i,1.5,2.0,Color.white);
ball[i+30]=new CollideBall(w,h,890+i,200+i,1.5,2.0,Color.red);
public void start(){
if (runner == null) {
runner = new Thread (this);
runner.start();
/* public void stop(){
if (runner != null) {
runner.stop();
runner = null;
public void run(){
while(true) {
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
try {runner.sleep(15);}
catch (Exception e) { }
//move our balls around
for(int i=0;i<MAX;i++){
ball[i].move();
handleCollision();
repaint();
boolean collide(CollideBall b1, CollideBall b2){
double wx=b1.getCenterX()-b2.getCenterX();
double wy=b1.getCenterY()-b2.getCenterY();
//we calculate the distance between the centers two
//colliding balls (theorem of Pythagoras)
double distance=Math.sqrt(wx*wx+wy*wy);
if(distance<b1.diameter)
return true;
return false;
private void handleCollision(){
//we iterate through all the balls, checking for collision
for(int i=0;i<MAX;i++)
for(int j=0;j<MAX;j++){
if(i!=j){
if(collide(ball[i], ball[j])){
ball[i].hit(ball[j]);
ball[j].hit(ball[i]);
public void update(Graphics g){
paint(g);
public void paint(Graphics g) {
gBuffer.setColor(Color.lightGray);
gBuffer.fillRect(0,0,getSize().width,getSize().height);
gBuffer.draw3DRect(5,5,getSize().width-10,getSize().height-10,false);
//paint our balls
for(int i=0;i<MAX;i++)
ball[i].paint(gBuffer);
g.drawImage (Buffer,0,0, this);
Thanks againthis.user wrote:
JakeG27 post your code within the code tab it will be more clear.
You can do this by clicking on CODE when you do this will appear { code} { code} post your code inbetween those to tags.
ie
{ code} code... { code}
and it will look like this
code
This must be the first sensible post you've ever made. At least you're able to copy someone else's response and pretend you know something.
Maybe you are looking for
-
CREATING NEW/Duplicate Master clips
Hi Guys...me again. I've been reading the manual all weekend...and decided that, since I SCREWED with this compressor thing...that I'd try to prevent the problem from happening again. I need to know if I'm on the right track. I'm working on a video o
-
Pbm creating WSDL in Weblogic Server 9.2
Hi, I deployed my web service in Weblogic Server 9.2. I tested the web service from the generated test script. Everything seems to work fine. Now I tried to create a stand-alone Java Client from the WSDL using MyEclipse. MyEclipse is complaining this
-
I have recently purchased an iPod Nano, and have noticed that I can hardly fit any songs on it at all. The most I have been able to squeeze is 124, a lot less than the billed "500 songs". While troubleshooting this problem I decided to delete all of
-
Route is notcoming in the sales order automatically
hi gurus my qt is when i did route determination in spro each and everything in the config. When am testing in the sales order the route is not coming autocmatically. The route I defined in the route determination it is taking manually. can any o
-
Configuring office 365 outlook on blackberry devices
Hi, Anyone help me to how to configure office 365 outlook on blackberry devices . My customer is already using blackberry server for exchange 2007 . So can i configure outlook for office 365 on existing blackberry devices or do i need to setup anyth