
一般就是eclipse和mysql还有comcat(web服务器)
1。收费问题:JBuilder是收费的,Eclipse是免费的,如果给大企业做项目,有钱买工具就可以用JBuilder,没钱最好用Eclipse,因为会有侵权问题。如果自己做项目当然可以找个破解的来用。
2。JBuilder把开发J2EE的东西都集成了,直接用就行。Eclipse需要装一些其他插件,如果确实想用,最好选择MyEclipse这个集成版本
3。从长远角度考虑,推荐使用Eclipse,因为架构比较先进,并且以后JBuilder也要以插件方式嵌入Eclipse
我有个思路,就是不管它章节不章节的,何必去取章节的坐标,直接考虑 *** 作整个文件删除重复的行。
你去网上搜索下,java怎么去除文件中的重复行,估计应该有大把代码可以参考。
不管你什么小说,再大也就几百kb,现在的硬件水平处理个几百kb的文件不是问题,不会慢多少,怎么样老哥,我这思路还可以吧。
没有影响。java收费只是针对新发布的Java版本,之前的版本只是停止免费的新版本更新,已经发布的老的商用版和个人版仍然可以继续免费使用,是没有影响的,Java是一门面向对象编程语言,不仅吸收了C++语言的各种优点,还摒弃了C++里难以理解的多继承、指针等概念,因此Java语言具有功能强大和简单易用两个特征。
只提供一个小说阅读,如下
package reader;import javaawt;
import javaawtevent;
import javaio;
import javaxswing;
public class Notebook {
private JFrame frame;
private JTextArea textArea;
private JMenuBar menuBar;
private JMenu file, format, search, help;
private JMenuItem open, exit;
private JMenuItem font, color, background, speed;
private JMenuItem find, changeto;
private JMenuItem helps, about;
private Boolean autoLineWrap = true;
private String fileName = "未命名";// 文件名
// private File currentFile ;
private JScrollPane jsp;
private JScrollBar jsb;
private Speed sped;
private font font1;
int delay = 10;
Timer timer = new Timer(delay, new ActionListener() {
public void actionPerformed(ActionEvent evt) {
jsbsetValue(jsbgetValue() + jsbgetUnitIncrement());
}
});
public Notebook() {
frame = new JFrame();
framesetTitle("未命名");
framesetLayout(new BorderLayout());
textArea = new JTextArea();
textAreasetFont(new Font("宋体", FontPLAIN, 18));// 设置默认字体样式字号
// set input textArea 设置编辑区
textAreasetText("");
textAreasetEditable(false);
textAreasetLineWrap(autoLineWrap);// 设置自动换行
jsp = new JScrollPane(textArea);// set Scroll
jsb = jspgetVerticalScrollBar();
jsbaddAdjustmentListener(new AdjustmentListener() {
public void adjustmentValueChanged(AdjustmentEvent e) {
int i;
i = jsbgetUnitIncrement();
Systemoutprintln(i);
}
});
frameadd(jsp, BorderLayoutCENTER);
// 菜单
menuBar = new JMenuBar();
file = new JMenu("文件");
filesetMnemonic('F');
format = new JMenu("格式");
search = new JMenu("搜索");
help = new JMenu("帮助");
menuBaradd(file);
menuBaradd(format);
menuBaradd(search);
menuBaradd(help);
// 文件菜单项
open = new JMenuItem("打开", KeyEventVK_O);
exit = new JMenuItem("退出");
fileadd(open);
fileadd(exit);
// 格式菜单项
// autoLine = new JCheckBoxMenuItem("自动换行");
font = new JMenuItem("字体");
color = new JMenuItem("颜色");
background = new JMenuItem("背景颜色");
speed = new JMenuItem("滚屏速度");
// formatadd(autoLine);
formatadd(font);
formatadd(color);
formatadd(background);
formatadd(speed);
// 搜索菜单项
find = new JMenuItem("查找");
changeto = new JMenuItem("转到");
searchadd(find);
searchadd(changeto);
// 帮助菜单项
helps = new JMenuItem("帮助");
about = new JMenuItem("关于");
helpadd(helps);
helpadd(about);
// 设置菜单条
menuBaradd(file);
menuBaradd(format);
menuBaradd(search);
menuBaradd(help);
framesetJMenuBar(menuBar);
// sped///
sped = new Speed(jsb, timer);
font1 = new font(textArea);
// 调用监听方法
addEventHandler();
// ////
textAreaaddMouseListener(new MouseListener() {
public void mouseClicked(MouseEvent e) {
if (egetClickCount() == 2) {
timerstart();
}
if (egetClickCount() == 1) {
timerstop();
}
}
public void mouseEntered(MouseEvent arg0) {
}
public void mouseExited(MouseEvent arg0) {
}
public void mousePressed(MouseEvent arg0) {
}
public void mouseReleased(MouseEvent arg0) {
}
});
// 监听上下键//
textAreaaddKeyListener(new KeyListener() {
@Override
public void keyPressed(KeyEvent arg0) {
if (arg0getKeyCode() == KeyEventVK_UP) {
jsbsetValue(jsbgetValue() - jsbgetUnitIncrement());
}
if (arg0getKeyCode() == KeyEventVK_DOWN) {
jsbsetValue(jsbgetValue() + jsbgetUnitIncrement());
}
}
public void keyReleased(KeyEvent arg0) {
}
public void keyTyped(KeyEvent arg0) {
}
});
//
textAreaaddMouseListener(new MouseListener() {
@Override
public void mouseClicked(MouseEvent e) {
if (egetClickCount() == 2) {
timerstart();
}
if (egetClickCount() == 1) {
timerstop();
}
}
public void mouseEntered(MouseEvent arg0) {
}
public void mouseExited(MouseEvent arg0) {
}
public void mousePressed(MouseEvent arg0) {
}
public void mouseReleased(MouseEvent arg0) {
}
});
}
// /////////初始化frame////////////////
protected void frameInit() {
Dimension d = ToolkitgetDefaultToolkit()getScreenSize();
framesetSize(dwidth, dheight);
framesetVisible(true);
framesetDefaultCloseOperation(JFrameEXIT_ON_CLOSE);
Dimension b = framegetSize();
}
private void addEventHandler() {
// 文件项的监听
openaddActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fileOpen();
jsbsetValue(0);
}
});
exitaddActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
fileExit();
}
});
// 格式菜单的监听
fontaddActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
font1addEventHandler();
}
});
coloraddActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
formatColor();
}
});
backgroundaddActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
formatBackground();
}
});
speedaddActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
spedliser();
}
});
}
// ////////文件项的方法/////////////////////////
private void fileOpen() {
textAreasetText("");
JFileChooser fileChooser = new JFileChooser();
fileChoosershowOpenDialog(frame);
File file = fileChoosergetSelectedFile();
if (file == null)
return;
fileName = filegetName();// 获得文件名
framesetTitle(filegetAbsolutePath());
FileInputStream fis = null;
BufferedReader br = null;
try {
fis = new FileInputStream(file);
br = new BufferedReader(new InputStreamReader(fis));
String str = null;
while ((str = brreadLine()) != null) {
textAreaappend(str + "\n");
}
Systemoutprintln("打开成功");
textAreasetCaretPosition(0);
} catch (IOException e1) {
JOptionPaneshowMessageDialog(frame, "文件不存在或已被损坏");
} finally {
if (br != null)
try {
brclose();
} catch (IOException e) {
}
if (fis != null)
try {
fisclose();
} catch (IOException e) {
}
}
}
private void fileExit() {
int option = -1;
Object options[] = { "Yes", "No" };
option = JOptionPaneshowOptionDialog(frame, "是否退出阅读?", "exit",
JOptionPaneYES_NO_OPTION, JOptionPaneQUESTION_MESSAGE, null,
options, options[0]);
switch (option) {
case JOptionPaneYES_OPTION:
Systemexit(0);
}
}
// //////////////////////////////////////////////////////////
// ///////////////格式项的方法/////////////////////////////////
private void formatColor() {
// d出颜色色选择器对话框
Color color = JColorChoosershowDialog(textArea, "选择颜色", ColorBLACK);
textAreasetForeground(color);
}
private void formatBackground() {
// d出颜色色选择器对话框
Color color = JColorChoosershowDialog(textArea, "选择颜色", ColorBLACK);
textAreasetBackground(color);
}
// ////////////////////////////////////////////////////////////
public static void main(String args[]) {
Notebook nt = new Notebook();
ntframeInit();
}
}
class font {
private JTextArea textArea;
private JButton ok, cancel;
private JComboBox fontName, fontSize, fontStyle;
GraphicsEnvironment ge;// 定义系统字体对象
String[] size = { "8", "10", "12", "14", "16", "18", "20", "22", "24",
"26", "28", "32", "36", "48", "72", "96" };
String[] style = { "PLAIN", "BOLD", "ITALIC" };
JFrame jf = new JFrame("字体设置");
public font(JTextArea textArea) {
thistextArea = textArea;
JLabel label1 = new JLabel(
" 字体 ");
JLabel label2 = new JLabel(" 字号 ");
JLabel label3 = new JLabel(" 样式 ");
ge = GraphicsEnvironmentgetLocalGraphicsEnvironment();// 获取系统字体
String[] fontname = gegetAvailableFontFamilyNames();
fontName = new JComboBox(fontname);
fontSize = new JComboBox(size);
fontStyle = new JComboBox(style);
ok = new JButton("确定");
cancel = new JButton("取消");
jfsetLayout(new BorderLayout());
JPanel p1 = new JPanel();
JPanel p2 = new JPanel();
JPanel p3 = new JPanel();
p1add(label1);
p1add(label2);
p1add(label3);
p2add(fontName);
p2add(fontSize);
p2add(fontStyle);
p3add(ok);
p3add(cancel);
jfadd(p1, BorderLayoutNORTH);
jfadd(p2, BorderLayoutCENTER);
jfadd(p3, BorderLayoutSOUTH);
jfsetSize(360, 200);
jfsetLocation(300, 200);
jfsetVisible(false);
jfsetResizable(false);
// addEventHandler();
}
void addEventHandler() {
jfsetVisible(true);
okaddActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String n1 = (String) fontNamegetSelectedItem();
int n2 = fontStylegetSelectedIndex();
String n3 = (String) fontSizegetSelectedItem();
textAreasetFont(new Font(n1, n2, IntegerparseInt(n3)));
jfsetVisible(false);
}
});
canceladdActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
jfsetVisible(false);//
}
});
}
}
class Speed implements ItemListener {
private JScrollBar jsb;
private JFrame jfrm;
private JLabel jlb1;
// JLabel jlb2;
private JButton jbt;
// private JCheckBox jcheckbox;
private JComboBox jcbb;
Integer sudu;
Timer timer;
private Integer msg[] = { 1, 10, 18, 36, 48, 66, 80, 90 };
public Speed(final JScrollBar jsb, final Timer timer) {
thisjsb = jsb;
thistimer = timer;
jfrm = new JFrame();
jlb1 = new JLabel("滚屏速度");
jbt = new JButton("确定");
// jcheckbox = new JCheckBox("自动滚屏");
jcbb = new JComboBox(msg);
jfrmsetLayout(new FlowLayout());
jfrmadd(jlb1);
jfrmadd(jcbb);
// jfrmadd(jcheckbox); jfrmadd(jbt);
jfrmsetVisible(false);
jcbbsetEditable(true);
jfrmsetDefaultCloseOperation(JFrameHIDE_ON_CLOSE);
jfrmpack();
}
void liser() {
jfrmsetVisible(true);
// /////监听复选框///////////////////////////
jcbbaddItemListener(this);
/
jcbbaddActionListener(new ActionListener(){ public void
actionPerformed(ActionEvent e) {
jcbbsetSelectedIndex(jcbbgetSelectedIndex()); }});
/
// ///////监听按钮//////////////////////////
jbtaddActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
jfrmsetVisible(false);
}
});
// ////////////////////////////////////
/
jcheckboxaddItemListener(new ItemListener(){ public void
itemStateChanged(ItemEvent e) { if(jcheckboxisSelected()==false){
Systemoutprintln("false"); timerstop(); }
if(jcheckboxisSelected()==true){ timerstart(); } }} );
/
}
@Override
public void itemStateChanged(ItemEvent arg0) {
sudu = (Integer) jcbbgetSelectedItem();
// jcbbsetSelectedItem(msg);//jcbbupdateUI() ;
jsbsetUnitIncrement(suduintValue());
}
}
java是源代码,不需要收费的。自己开发的项目卖给别人,肯定是要收费啊(从别人的口袋里拿到自己的口袋里),eclipse软件是不收费的,myEclipse软件是需要买注册码,但现在网上一大堆破解码,这个你可以直接拿来用,所以你也就可以不花钱用myEclipse了
以上就是关于公司做java项目一般用什么软件工具全部的内容,包括:公司做java项目一般用什么软件工具、小说TXT文档中java怎么判断两个章节之间是否有内容 如果没有就讲其中一个删除 比如:、java收费影响等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)