java源代码选择 java源代码文件的命令

怎样交java源代码给老师交java源代码给老师办法java源代码选择:
1、点击工程或者包节点java源代码选择,右键选择Exportjava源代码选择,类型选择Java-Jar 。
2、选择要导出java源代码选择的文件或包,基本上不做修改 。
3、可以设置你java源代码选择的MainClass,发给老师 。
如何在Eclipse中Debug调试Java jdk源代码1. 在Eclipse中java源代码选择,Window-Preferences-Java-Compilerjava源代码选择,确保以下选项都勾选上:
2. 在Eclipse中,Window-Preferences-Java-Installed JREs,选择Add,在JRE Home中选择JDK路径(因为只有JDK支持源码调试),并且给它合适java源代码选择的命名 。退出保存后,选择JDK路径 。
3. 右键你的工程项目,Properties,Java Build Path-Libraries,找到JRE System Library,选择Edit 。使用Alternate JRE中你创建的JDK 。
4. 应该就大功告成了。
求java源代码 。使用swing或AWT 。实现功能:点击按钮 , 选择一个txt文本文件,并将txt中搞定了
package com.monubia;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JTextArea;
import javax.swing.WindowConstants;
import javax.swing.SwingUtilities;
import javax.swing.filechooser.FileNameExtensionFilter;
/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visitfor details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class Txt extends javax.swing.JFrame {
private JButton jButton_open;
private JTextArea jTextArea1;
/**
* Auto-generated main method to display this JFrame
*/
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
Txt inst = new Txt();
【java源代码选择 java源代码文件的命令】inst.setLocationRelativeTo(null);
inst.setVisible(true);
}
});
}
public Txt() {
super();
initGUI();
}
private void initGUI() {
try {
setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
getContentPane().setLayout(null);
{
jButton_open = new JButton();
getContentPane().add(jButton_open);
jButton_open.setText("Open");
jButton_open.setBounds(155, 114, 92, 49);
jButton_open.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent evt) {
jButton_openMouseClicked(evt);
}
});
}
{
jTextArea1 = new JTextArea();
getContentPane().add(jTextArea1);
jTextArea1.setBounds(0, 0, 384, 262);
}
pack();
setSize(400, 300);
} catch (Exception e) {
//add your error handling code here
e.printStackTrace();
}
}
private void jButton_openMouseClicked(MouseEvent evt) {
//点击了打开
JFileChooser open=new JFileChooser();
FileNameExtensionFilter txt= new FileNameExtensionFilter("Txt File", "txt");
open.setFileFilter(txt);
int ret=open.showOpenDialog(this);
if(ret==JFileChooser.APPROVE_OPTION)
{
jButton_open.setOpaque(false);

推荐阅读