|
|
|
|
![]() ![]() |
Jun 25 2006, 05:36 AM
Post
#1
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 10 Joined: 20-June 06 Member No.: 14,020 |
Well..can someone introduce me?(picture introduce is well)
|
|
|
|
Jun 25 2006, 06:53 AM
Post
#2
|
|
|
Member [ Level 2 ] Group: Members Posts: 54 Joined: 28-May 06 Member No.: 13,691 |
Dear Thaiddr
I could not understand the question you asked. What I make out of is you want to start programming in java. Assuming that I will give some advices. Frist and foremost we need Java Development Kit(JDK1.4 or 1.5). You can download it from Sun Microsystems’s web site. The url is http://java.sun.com/j2se/1.5.0/download.jsp Assuming you are using windows XP; run the setup wizard. It will guide through installation process. After installation you need to set path and class path. 1. Click on START 2. Click on run 3. Where is says open type in CMD and click OK. This gets you to the DOS prompt. 4. Type cd c:\ 5. Type notepad autoexec.bat -- this will bring up the notepad editor. In this editor type the following two lines: set PATH=%PATH%;C:\Program Files\Java\jdk1.5.0_02\bin; set CLASSPATH==%CLASSPATH%;C:\Program Files\Java\jdk1.5.0_02\LIB; 6. Exit notepad. 7. Type autoexec.bat 8. Test your installation by opening up a DOS window and verifying that both the commands java and javac are recognized. There is another mehtod though. It can be done by editing Environment Variables. 1. Click on START 2. Under Settings click on Control Panel 3. Click on the System.( You can also find the System Properties by Right clicking on MyComputer Icon and selecting the properties option.) 4. Click on the Advanced tab. 5. Click on the Environment Variables button (bottom). 6. Highlight PATH (in the top window) and click the edit button. 7. Edit the "PATH" so it begins C:\Program Files\Java\jdk1.5.0_02\bin; (note: if you install Java into a different directory, you may need to change the directory from that listed above) 8. For example, the full "PATH" on my computer is: C:\Program Files\Java\jdk1.5.0_02\bin;C:\Program Files\SSH Communications Security\SSH Secure Shell 9. After you have finished editing the PATH, click OK. You are done setting your PATH. Now you have to create a new variable, called your CLASSPATH. 10. Click on the NEW button below the top window. 11. Under variable name type CLASSPATH 12. Under 'variable value' type . (type a single period(Full Stop)). 13. Click OK. 14. EXIT the control panel. 15. Restart your computer. 16. Test your installation by opening up a DOS window and verifying that both the commands java and javac are recognized. I hope it may help you to get going.Bye |
|
|
|
Jun 25 2006, 07:30 AM
Post
#3
|
|
|
Member [ Level 1 ] Group: Members Posts: 47 Joined: 24-June 06 Member No.: 14,107 |
Well Test Complete lets u test Java applications that use the Swing, AWT, SWT or WFC libraries. These applications must be created with a development tool that supports one of the following Java virtual machines:
MSVM - Build 3309 or later Sun JDK (or JRE) - version 1.1.8 or later BEA JRockit 5.0 For instance, this can be Microsoft Visual J++ 1.1 or later, Borland JBuilder 3.0 or later, Sun Forte 1.0 or later. When you start using TestComplete to automate testing of your Java applications, you will be able to access all private, protected and public methods and fields in the target application, without any changes in the application. The way you access objects of your Java application depends on whether or not these objects are visual. Available visual objects Java applications as well as properties, fields, methods and events of these objects are displayed in the Object Browser panel. To access visual objects of Java applications, TestComplete provides the SwingObject, AWTObject, SWTObject and WFCObject methods. The method to use is determined by the library that is compiled within the Java application. All of these methods allow you to address the objects by their name, or by the object's class name, caption or index. To access a non-visual object, you need to find a property, field or method of another object (visual or non-visual) that would return a reference to that object. You can find this property, field or method by exploring your application in the Object Browser. Non-visual objects that can be obtained in application code through static fields, properties or methods are currently not available in TestComplete. Additionally, with the help of TestComplete's industry first language independent scripting technology, you can construct (or record) test scripts using a language of choice. For those building Java applications, this means you will not be forced into using or learning a proprietary scripting language - your scripts can be written using a Java-like scripting language known as JScript. For further informatoion you can visit www.javaverified.com/ |
|
|
|
Aug 19 2006, 03:40 PM
Post
#4
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 18 Joined: 19-August 06 Member No.: 15,398 |
Well..can someone introduce me?(picture introduce is well) You can try out Borland JBuilder. It is a software for you to run your Java applications. This software is free and you can download it from http://www.borland.com. There are other softwares provided by Borland too. The softwares will allow you to run your C++, Pascal or even other programming languages' applications. I hope that what I said would aid you in your work. |
|
|
|
Aug 19 2006, 04:14 PM
Post
#5
|
|
|
Advanced Member Group: Members Posts: 153 Joined: 8-May 06 From: Houston, TX Member No.: 13,291 |
There is something that I heard about called JIT
It compiles Java Byte code directly into machince code so you don't need the Java VM to use it. I'm not sure what you are asking for. |
|
|
|
Aug 20 2006, 04:55 PM
Post
#6
|
|
|
Colonel Panic Group: [MODERATOR] Posts: 2,847 Joined: 25-March 05 From: Toronto, Ontario, Canada Member No.: 3,233 myCENTs:31.07 |
You can make a Java test applet and embed it to your website. The following code is an example:
CODE import java.applet.Applet; import java.awt.event.*; import java.awt.*; //intializes the Applet and the ActionListener public class Problem1 extends Applet implements ActionListener { // creates space for the labels and textfields Label lblPrice = new Label ("Product Price: "); Label lblQuantity = new Label ("Quantity: "); TextField txtPrice = new TextField(25); TextField txtQuantity = new TextField(10); TextArea txaOutput = new TextArea("Calculation Result" + "\n", 10,30); Button btnCalculate = new Button ("Calculate Price"); // initializes the objects to be created and link it with an ActionListener public void init() { DesignLayout(); txtPrice.requestFocus(); txtPrice.addActionListener(this); txtQuantity.addActionListener(this); btnCalculate.addActionListener(this); } // tells what the ActionListener to do public void actionPerformed(ActionEvent evt) { float Price = Float.valueOf(txtPrice.getText()).floatValue(); float Quantity = Float.valueOf(txtQuantity.getText()).floatValue(); float Total; Total = Price*Quantity; txaOutput.append("\n" + Price + "\t" + Quantity + "\t" + Total); ClearTextFields(); } // shows how things are placed using the DesignLayout() tool public void DesignLayout() { GridBagLayout gridbag = new GridBagLayout(); GridBagConstraints constraints = new GridBagConstraints(); setLayout(gridbag); constraints.insets = new Insets(5,5,5,5); //Row 1 Label constraints.weightx = 1.0; constraints.anchor = GridBagConstraints.WEST; constraints.fill = GridBagConstraints.NONE; gridbag.setConstraints(lblPrice, constraints); add (lblPrice); //Row 1 Text constraints.weightx = 3.0; constraints.gridwidth = GridBagConstraints.REMAINDER; constraints.anchor = GridBagConstraints.EAST; gridbag.setConstraints(txtPrice, constraints); add(txtPrice); //Row 2 Label constraints.weightx = 0; constraints.anchor = GridBagConstraints.WEST; constraints.fill = GridBagConstraints.NONE; gridbag.setConstraints(lblQuantity, constraints); add(lblQuantity); //Row 2 Text constraints.gridwidth = GridBagConstraints.REMAINDER; constraints.anchor = GridBagConstraints.EAST; gridbag.setConstraints(txtQuantity, constraints); add(txtQuantity); //Row 3 Button constraints.gridwidth = GridBagConstraints.REMAINDER; constraints.gridx = 0; constraints.anchor = GridBagConstraints.EAST; gridbag.setConstraints(btnCalculate, constraints); add(btnCalculate); //Row 4 Text Area constraints.gridx = 0; constraints.gridwidth = 2; constraints.anchor = GridBagConstraints.CENTER; gridbag.setConstraints(txaOutput, constraints); txaOutput.setEditable(false); add(txaOutput); } // this method sets ClearTextFields to clear all the text after each query public void ClearTextFields() { txtPrice.setText(""); txtQuantity.setText(""); } } All you need is a Java IDE to run this file. I recommend NetBeans xboxrulz |
|
|
|
Aug 20 2006, 07:30 PM
Post
#7
|
|
|
Premium Member Group: [HOSTED] Posts: 377 Joined: 17-June 06 From: Adblock life Member No.: 13,992 |
I'd recommend one of Sun's JDKs or JREs. But using any of those takes some time to customize, so you might want to just mess around with Borland if you don't feel like customizing that stuff to fit your needs.
|
|
|
|
Aug 25 2006, 02:07 AM
Post
#8
|
|
|
Advanced Member Group: Members Posts: 153 Joined: 8-May 06 From: Houston, TX Member No.: 13,291 |
JCreator is a pretty neat IDE.
I have also used Gel which is cool because it is portable and I can carry it around on my flash drive. |
|
|
|
Jul 24 2007, 02:37 PM
Post
#9
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 2 Joined: 24-July 07 Member No.: 23,572 |
I don't don't understand what this thread is really about...
If you want to test your Java Applications try JUnit. It's great for automated unit testing of your Java Applications and it's pretty simple to use. As for the IDE I would recommend Eclipse. It has a lot of pretty neat features, plus loads of plug-ins so you can easily extend its functionality, and already has a built in support for JUnit so you can do your unit tests easier. There are a lot of different distros of eclipse available but if you don't want to do much configuration I think EasyEclipse would be the one for you. You would need a machine with at least 512 MB of ram though. But I think that wouldn't be much of a problem nowadays. |
|
|
|
Jul 26 2007, 05:40 AM
Post
#10
|
|
|
Premium Member Group: [HOSTED] Posts: 286 Joined: 17-June 07 From: Tasmania Member No.: 22,699 |
Your IDE should come with a function to run/test a program. Remember that you must compile it before doing so. If your IDE doesn't have this, you can always try putting it in a webpage as an applet.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 21st November 2008 - 12:14 AM |