1.ç½å§å®ä¸äºJava
2.ç½å§è¿ç¨è°ç¨
3.网吧计费管理系统的网吧网java程序,登录界面,源码源代管理员的管理汽车租售源码用户名密码输入正确,提示“登录成功”
4.Java(TM)2Platform是系统什么东西啊?在网吧上网时突然有了,重启还有,怎么还原卡都不好使?
ç½å§å®ä¸äºJava
é£æ¯ä½ çç¯å¢åé没设置好 1.æå¼æççµè--å±æ§--é«çº§--ç¯å¢åé 2.æ°å»ºç³»ç»åéJAVA_HOME åCLASSPATH åéåï¼JAVA_HOME åéå¼ï¼C:\Program Files\Java\jdk1.7.0 åéåï¼CLASSPATH åéå¼ï¼.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools...
ç½å§è¿ç¨è°ç¨
ä¸ãJavaä¸çè¿ç¨æ¹æ³è°ç¨
è¿ç¨æ¹æ³è°ç¨ï¼Remote Method Invocation, RMIï¼æ¯Java1.1å¼å ¥çåå¸å¼å¯¹è±¡è½¯ä»¶å ï¼å®çåºç°ç®åäºå¨å¤å°æºå¨ä¸çJavaåºç¨ä¹é´çéä¿¡ãç¸æ¯CORBAï¼RMIåè½è¾å¼±ä¸åªè½ç¨äºJavaç³»ç»ã
äºãå®ç°ä¸ä¸ªç®åçRMI
è¦ä½¿ç¨RMIï¼å¿ é¡»æé å个主è¦çç±»ï¼è¿ç¨å¯¹è±¡çæ¬å°æ¥å£ãRMI客æ·ãè¿ç¨å¯¹è±¡å®ç°åRMIæå¡å¨ãRMIæå¡å¨çæè¿ç¨å¯¹è±¡å®ç°çä¸ä¸ªå®ä¾ï¼å¹¶ç¨ä¸ä¸ªç¹æ®çURL注åå®ï¼RMI客æ·å¨è¿ç¨æå¡å¨ä¸æ¥æ¾å¯¹è±¡ï¼è¥æ¾å°å°±æå®è½¬æ¢ææ¬å°æ¥å£ç±»åï¼ç¶ååä¸ä¸ªæ¬å°å¯¹è±¡ä¸æ ·ä½¿ç¨å®ãä¸é¢æ¯ä¸ä¸ªç®åçRMIä¾åï¼è¿ç¨å¯¹è±¡åªè¿åä¸ä¸ªæ¶æ¯å符串ãè¦ä½¿è¿ä¸ªä¾åæ´æä»·å¼ï¼æ们éè¦åçå°±æ¯å®åè¿ç¨å¯¹è±¡å®ç°ç±»ã
1.è¿ç¨å¯¹è±¡çæ¬å°æ¥å£ç±»ï¼Rem.Javaï¼
è¯¥ç±»ä» ä» æ¯ä¸ä¸ªæ¥å£ï¼èä¸æ¯å®ç°ï¼RMI客æ·æºå¯ä»¥ç´æ¥ä½¿ç¨å®ï¼RMIæå¡å¨å¿ é¡»éè¿ä¸ä¸ªè¿ç¨å¯¹è±¡æ¥å®ç°å®ï¼å¹¶ç¨æ个URL注åå®çä¸ä¸ªå®ä¾ã
import Java.rmi.*;
public interface Rem extends Remote { public String getMessage() throws RemoteException;}
æ¬å°æ¥å£ï¼Remï¼å¿ é¡»æ¯å ¬å ±çï¼å¦å客æ·æºå¨å è½½ä¸ä¸ªå®ç°è¯¥æ¥å£çè¿ç¨å¯¹è±¡æ¶å°±ä¼åºéãæ¤å¤ï¼å®è¿å¿ é¡»ä»Java.rmi.Remote继æ¿èæ¥ï¼æ¥å£ä¸çæ¯ä¸ä¸ªæ¹æ³é½å¿ é¡»æåºè¿ç¨å¼å¸¸Java.rmi.RemoteExceptionã
2.RMI客æ·ç±»ï¼RemClient.Javaï¼
RMI客æ·ä½¿ç¨Naming.lookupå¨æå®çè¿ç¨ä¸»æºä¸æ¥æ¾å¯¹è±¡ï¼è¥æ¾å°å°±æå®è½¬æ¢ææ¬å°æ¥å£Remç±»åï¼ç¶ååä¸ä¸ªæ¬å°å¯¹è±¡ä¸æ ·ä½¿ç¨å®ãä¸CORBAä¸åä¹å¤å¨äºRMI客æ·å¿ é¡»ç¥éæä¾è¿ç¨æå¡ä¸»æºçURLï¼è¿ä¸ªURLå¯ä»¥éè¿rmi://host/pathærmi://host:port/pathæ¥æå®ï¼å¦æçç¥ç«¯å£å·ï¼å°±ä½¿ç¨ãNaming.lookupå¯è½äº§çä¸ä¸ªå¼å¸¸ï¼RemoteExceptionãNotBoundExceptionãMalformedURLExceptionï¼ä¸ä¸ªå¯»å¸¸é½éè¦æè·ãRemoteExceptionãNamingåNotBoundExceptionå¨Java.rmi.*ä¸å®ä¹ï¼MalformedURLExceptionå¨Java.net.*ä¸å®ä¹ãå¦å¤ï¼å®¢æ·æºå°åè¿ç¨å¯¹è±¡ä¼ é串è¡å对象Serializableï¼æ以è¿åºå¨ç¨åºä¸è¾å ¥Java.io.*ã
import Java.rmi.*;
import Java.net.*;
import Java.io.*;
public class RemClient {
public static void main(String[] args) {
try {
String host = (args.length > 0) ? args[0] : "localhost"; file://ä»å½ä»¤è¡è¯»åè¿ç¨ä¸»æºå
file://éè¿URLå¨è¿ç¨ä¸»æºä¸æ¥æ¾å¯¹è±¡ï¼å¹¶æå®è½¬å为æ¬å°æ¥å£Remç±»å
Rem remObject=(Rem)Naming.lookup("rmi://" + host + "/Rem");
System.out.println(remObject.getMessage()); file://è°ç¨è¿ç¨å¯¹è±¡çæ¹æ³
} catch(RemoteException re) { System.out.println("RemoteException: " + re); <br/><br/>} catch(NotBoundException nbe) { System.out.println("NotBoundException: " + nbe); <br/><br/>} catch(MalformedURLException mfe){ System.out.println("MalformedURLException:"+ mfe); <br/><br/>}}}
3.è¿ç¨å¯¹è±¡å®ç°ç±»ï¼RemImpl.Javaï¼
è¿ä¸ªç±»çæ£å®ç°RMI客æ·è°ç¨çè¿ç¨å¯¹è±¡ï¼å®å¿ é¡»ä»UnicastRemoteObject继æ¿ï¼å ¶æé å½æ°åºæåºRemoteExceptionå¼å¸¸ã
import Java.rmi.*;
import Java.rmi.server.UnicastRemoteObject;
public class RemImpl extends UnicastRemoteObject implements Rem {
public RemImpl() throws RemoteException { } file://æé å½æ°æåºRemoteExceptionå¼å¸¸
public String getMessage() throws RemoteException {
return("Here is a remote message."); }} file://åRMI客æ·è¿åä¸ä¸ªæ¶æ¯ä¸²
4.RMIæå¡å¨ç±»ï¼RemServer.Javaï¼
该类å建è¿ç¨å¯¹è±¡å®ç°RemImplçä¸ä¸ªå®ä¾ï¼ç¶åç¨ä¸ä¸ªç¹å®çURLæ¥æ³¨åå®ï¼æè°æ³¨åå°±æ¯éè¿Naming.bindæNaming.rebindæ¥å°RemImplå®ä¾ç»å®å°URLä¸ã
import Java.rmi.*;
import Java.net.*;
public class RemServer {
public static void main(String[] args) {
try {
RemImpl localObject = new RemImpl(); file://çæè¿ç¨å¯¹è±¡å®ç°çä¸ä¸ªå®ä¾
Naming.rebind("rmi:///Rem", localObject); file://å°è¿ç¨å¯¹è±¡å®ä¾ç»å®å°rmi:///Remä¸
}catch(RemoteException re){ System.out.println("RemoteException:"+re); <br/><br/>}catch(MalformedURLException mfe) { System.out.println("MalformedURLException: "+mfe); <br/><br/>}}}
ä¸ãç¼è¯åè¿è¡
1.å¦ä½å¨Javaä¸å®ç°è¿ç¨æ¹æ³è°ç¨(1)
2.å¦ä½å¨Javaä¸å®ç°è¿ç¨æ¹æ³è°ç¨(2)
ç¼è¯RMI客æ·åæå¡å¨ï¼è¿å°èªå¨ç¼è¯è¿ç¨å¯¹è±¡çæ¬å°æ¥å£åè¿ç¨å¯¹è±¡å®ç°
Javac RemClient.Java file://èªå¨ç¼è¯è¿ç¨å¯¹è±¡çæ¬å°æ¥å£Rem.Java
Javac RemServer.Java file://èªå¨ç¼è¯è¿ç¨å¯¹è±¡å®ç°RemImpl.Java
2. çæ客æ·æ¿æ¥æ¨¡ååæå¡å¨æ¡æ¶
rmic RemImpl
è¿å°æé RemImpl_Stub.classåRemImpl_Skeleton.classã请å°Rem.classãRemClient.classåRemImpl_Stub.classæ·è´å°RMI客æ·æºï¼å°Rem.classãRemImpl.class ãRemServer.classåRemImpl_Skeleton.classæ·è´å°RMIæå¡å¨ã
3. å¯å¨RMI注å
rmiregistry
file://å¨æå¡å¨ä¸æ§è¡ãä¸è®ºæå¤å°ä¸ªè¿ç¨å¯¹è±¡ï¼æ¬æä½åªéåä¸æ¬¡
4. è¿è¡
Java RemServer.class
file://å¯å¨RMIæå¡å¨ï¼å¨æå¡å¨ä¸æ§è¡ï¼
Java RemClient.class
file://å¯å¨RMI客æ·ï¼å°è¾åºâHere is a remote message.â
网吧计费管理系统的java程序,登录界面,网吧网数据库怎么弄出源码来管理员的源码源代仿奈雪 茶点餐小程序源码用户名密码输入正确,提示“登录成功”
AWT的管理一个,正确帐号密码为admin,系统.
import java.awt.Button;
import java.awt.Frame;
import java.awt.Label;
import java.awt.TextField;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.io.IOException;
@SuppressWarnings("serial")
public class Test extends Frame {
private Button b = new Button("登录");
private Label lb1 = new Label("帐号:");
private Label lb2 = new Label("密码:");
private Label lb3 = new Label("");
private TextField t1 = new TextField("");
private TextField t2 = new TextField("");
private void addListener() {
// 按钮添加监听 判断用户登录
b.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent actionevent) {
if ("".equals(t1.getText())) {
lb3.setText("请输入帐号!");
t1.setText("");
t2.setText("");
return;
}
if ("".equals(t2.getText())) {
lb3.setText("请输入密码!网吧网");
t2.setText("");
return;
}
if (!"admin".equals(t1.getText())
|| !"".equals(t2.getText())) {
lb3.setText("帐号或密码错误!源码源代");
t2.setText("");
return;
}
lb3.setText("登录成功!管理");
}
});
}
public Test() {
setTitle("网吧计费管理系统");
int y = ;
lb1.setBounds(,系统 y, , );
t1.setBounds(, y, , );
y += ;
lb2.setBounds(, y, , );
t2.setBounds(, y, , );
t2.setEchoChar('*');
y += ;
b.setBounds(, y, , );
y += ;
lb3.setBounds(, y, , );
setLayout(null);
add(lb1);
add(t1);
add(lb2);
add(t2);
add(b);
add(lb3);
addListener();
}
@SuppressWarnings("deprecation")
public static void main(String[] args) throws IOException {
Test t = new Test();
t.setBounds(, , , );
t.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
t.show();
}
}
Java(TM)2Platform是什么东西啊?在网吧上网时突然有了,重启还有,怎么还原卡都不好使?
java 应用程序的开发(或者是运行)平台,针对操作系统有不同的网吧网正规的源码交易平台哪个好实现版本。也就是源码源代一套基于命令行的应用程序。在各种操作系统上安装对应于操作系统的管理微信小程序任务源码怎么用JAVA平台后,JAVA应用程序就在这套平台上运行