Re: install network program
Can you explain how a java program would be useful for your task?
Re: install network program
Quote:
Originally Posted by
Norm
Can you explain how a java program would be useful for your task?
I have 2 pc's network here in my home is in one quarter and one of my daughter in another room, I wanted the program to install it without having to go there, I am advanced in visual basic but that I could not, so I'm trying here with friends from java, thanks for asking, some light???????
Re: install network program
could someone help me please
Re: install network program
what do you want to install? What does "install it" mean? What is the "it"?
What programs do you have now that you can use?
Are you going to write code for the server and client sides?
Re: install network program
No, I want the program only to the server, in fact I really wanted a java program that does not have to mess with the client machine, the client and server are shared, I want to install a server program on the client 10.0.0.1, 10.0.0.2 without the need to do anything on the client! understand?
Re: install network program
I still do not understand what you are trying to do.
If you have a server program on the PC at 10.0.0.1 then why is that called a client? I'd call the PC with the server program the server. The PC that connects to the server would be called the client.
If you have 2 PCs, with one a server and one a client, when the client machine connects to the server, what do you want the server to do? What software would you use on the client to connect to the server?
Quote:
without the need to do anything on the client!
That is hard to understand. How can nothing be done on the client?
Re: install network program
It is simply what I want, I want a program intalar the client machine (10.0.0.2) by the server (10.0.0.1), using only the server (10.0.0.1)
ex: I'm on the server (10.0.0.1) I want to do a program that installs software that is in 10.0.0.2 (client), or in this case the software will the client (10.0.0.2) I just want instador open the client (10.0.0.2)
understand now??
thanks for asking
a light???
Re: install network program
I still do not understand what you want to happen.
What software will be executed on the server?
What software will be executed on the client?
If you are on the server, what are you doing there? I think of the server as being passive and reacting to what the client does. The server does not start any process, the client does.
What is the "instador"?
Re: install network program
type so-----------------------------------------------------------------------------------------------
import java.io.InputStream;
import java.util.Scanner;
import jcifs.smb.SmbFile;
public class Compartilhamento {
public static void main(String[] args) throws Exception {
SmbFile file = new SmbFile("smb://10.0.0.2/public/program.exe");
if (file.exists()) {
InputStream stream = file.getInputStream();
Scanner sc = new Scanner(stream);
while (sc.hasNextLine()) {
System.out.println(sc.nextLine());
}
}
}
}
a light???
>>>>>>>>>>>>>This post has 3 pages<<<<<<<<<<<<<<<<<<<<
Re: install network program
Sorry, I'm not familiar with the rundll32 program. That looks like part of the Windows OS, not part of java. As you show, java can execute OS programs.
How would you use that in your project?
Re: install network program
I need to install. net framework in two pcs
Re: install network program
What does that have to do with writing a program in java?
Re: install network program
Can someone help me get started on a source code for me to open a networker please
thank you very much
Re: install network program
C:\DOCUME~1\ADMINI~1\DESKTOP>javac Compartilhamento.java
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_IN_PAGE_ERROR (0xc0000006) at pc=0x6da0f43f, pid=1512, tid=1588
#
# JRE version: 7.0_04-b22
# Java VM: Java HotSpot(TM) Client VM (23.0-b21 mixed mode, sharing windows-x86
)
# Problematic frame:
# V [jvm.dll+0x4f43f]
#
# Failed to write core dump. Minidumps are not enabled by default on client vers
ions of Windows
#
# An error report file with more information is saved as:
# C:\DOCUME~1\ADMINI~1\DESKTOP\hs_err_pid1512.log
#
# If you would like to submit a bug report, please visit:
# HotSpot Virtual Machine Error Reporting Page
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_IN_PAGE_ERROR (0xc0000006) at pc=0x6da0f43f, pid=1512, tid=1588
#
# JRE version: 7.0_04-b22
# Java VM: Java HotSpot(TM) Client VM (23.0-b21 mixed mode, sharing windows-x86 )
# Problematic frame:
# V [jvm.dll+0x4f43f]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# HotSpot Virtual Machine Error Reporting Page
#
--------------- T H R E A D ---------------
Current thread (0x003c8400): JavaThread "main" [_thread_in_vm, id=1588, stack(0x00960000,0x009b0000)]
siginfo: ExceptionCode=0xc0000006
Error accessing class data sharing archive. Mapped file inaccessible during execution, possible disk/network problem.
Registers:
EAX=0x2ec5f7f0, EBX=0x0000000c, ECX=0x2f720f98, EDX=0x00000000
ESP=0x009af284, EBP=0x009af284, ESI=0x2f720f98, EDI=0x2f720f98
EIP=0x6da0f43f, EFLAGS=0x00010202
Top of Stack: (sp=0x009af284)
0x009af284: 009af298 6da5bbf6 003c8d98 003c8400
0x009af294: 2f720f98 009af2e0 6d9eb8e6 003c8d98
0x009af2a4: 003c8400 2f720dd0 009af390 003c8400
0x009af2b4: 003c8400 003c8d90 00000001 2f714301
0x009af2c4: 00000000 003c8290 003c8968 003c8970
0x009af2d4: 00000008 00000000 003c8d94 009af304
0x009af2e4: 6d9ebd01 009af390 003c8d84 00000000
0x009af2f4: 003c8400 003c8400 003c8400 30188820
Instructions: (pc=0x6da0f43f)
0x6da0f41f: 08 83 e0 01 83 c8 02 5d c3 a8 01 74 07 b8 01 00
0x6da0f42f: 00 00 5d c3 80 3d de a1 ca 6d 00 74 14 8b 41 08
0x6da0f43f: 66 83 78 26 01 75 0a 80 79 28 8f 75 04 33 c0 5d
0x6da0f44f: c3 e8 1b bf 04 00 84 c0 74 07 b8 04 00 00 00 5d
Register to memory mapping:
EAX=
[error occurred during error reporting (printing register info), id 0xc0000006]
Stack: [0x00960000,0x009b0000], sp=0x009af284, free space=316k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [jvm.dll+0x4f43f]
V [jvm.dll+0x9bbf6]
V [jvm.dll+0x2b8e6]
V [jvm.dll+0x2bd01]
V [jvm.dll+0x2bd5d]
V [jvm.dll+0x2d1b8]
V [jvm.dll+0x2d87b]
V [jvm.dll+0x2d8ca]
V [jvm.dll+0x7a8bc]
V [jvm.dll+0x50a26]
V [jvm.dll+0x50a53]
j java.util.zip.ZipFile.getInputStream(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;+103
j java.util.jar.JarFile.hasClassPathAttribute()Z+47
j java.util.jar.JavaUtilJarAccessImpl.jarFileHasClas sPathAttribute(Ljava/util/jar/JarFile;)Z+1
j sun.misc.URLClassPath$JarLoader.getClassPath()[Ljava/net/URL;+33
j sun.misc.URLClassPath.getLoader(I)Lsun/misc/URLClassPath$Loader;+94
j sun.misc.URLClassPath.getResource(Ljava/lang/String;Z)Lsun/misc/Resource;+42
j java.net.URLClassLoader$1.run()Ljava/lang/Class;+26
j java.net.URLClassLoader$1.run()Ljava/lang/Object;+1
v ~StubRoutines::call_stub
V [jvm.dll+0x1296da]
V [jvm.dll+0x1d837e]
V [jvm.dll+0x12975d]
V [jvm.dll+0xd914a]
C [java.dll+0x1061] Java_java_security_AccessController_doPrivileged__ Ljava_security_PrivilegedExceptionAction_2Ljava_se curity_AccessControlContext_2+0x17
j java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class;+13
j java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+70
j sun.misc.Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+36
j java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;+3
j sun.launcher.LauncherHelper.checkAndLoadMain(ZILja va/lang/String;)Ljava/lang/Class;+114
v ~StubRoutines::call_stub
V [jvm.dll+0x1296da]
V [jvm.dll+0x1d837e]
V [jvm.dll+0x12975d]
V [jvm.dll+0xae214]
V [jvm.dll+0xb6b47]
C [jli.dll+0x14f1]
C [jli.dll+0x1edd] JLI_ReportMessage+0x218
C [jli.dll+0xbb02]
C [jli.dll+0xbb8c]
C [kernel32.dll+0xb713] GetModuleFileNameA+0x1b4
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j java.util.zip.ZipFile.getInputStream(Ljava/util/zip/ZipEntry;)Ljava/io/InputStream;+103
j java.util.jar.JarFile.hasClassPathAttribute()Z+47
j java.util.jar.JavaUtilJarAccessImpl.jarFileHasClas sPathAttribute(Ljava/util/jar/JarFile;)Z+1
j sun.misc.URLClassPath$JarLoader.getClassPath()[Ljava/net/URL;+33
j sun.misc.URLClassPath.getLoader(I)Lsun/misc/URLClassPath$Loader;+94
j sun.misc.URLClassPath.getResource(Ljava/lang/String;Z)Lsun/misc/Resource;+42
j java.net.URLClassLoader$1.run()Ljava/lang/Class;+26
j java.net.URLClassLoader$1.run()Ljava/lang/Object;+1
v ~StubRoutines::call_stub
j java.security.AccessController.doPrivileged(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;+0
j java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class;+13
j java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+70
j sun.misc.Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+36
j java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;+3
j sun.launcher.LauncherHelper.checkAndLoadMain(ZILja va/lang/String;)Ljava/lang/Class;+114
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x02b0c000 JavaThread "Service Thread" daemon [_thread_blocked, id=3440, stack(0x02e30000,0x02e80000)]
0x02b06000 JavaThread "C1 CompilerThread0" daemon [_thread_blocked, id=3996, stack(0x02de0000,0x02e30000)]
0x02b04400 JavaThread "Attach Listener" daemon [_thread_blocked, id=900, stack(0x02d90000,0x02de0000)]
0x02b03000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=1612, stack(0x02d40000,0x02d90000)]
0x02af5000 JavaThread "Finalizer" daemon [_thread_blocked, id=1596, stack(0x02cf0000,0x02d40000)]
0x02af0400 JavaThread "Reference Handler" daemon [_thread_blocked, id=1604, stack(0x02ca0000,0x02cf0000)]
=>0x003c8400 JavaThread "main" [_thread_in_vm, id=1588, stack(0x00960000,0x009b0000)]
Other Threads:
0x02aee800 VMThread [stack: 0x02c50000,0x02ca0000] [id=1584]
0x02b17c00 WatcherThread [stack: 0x02e80000,0x02ed0000] [id=3432]
VM state:synchronizing (normal execution)
VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x003c73a0] Threads_lock - owner thread: 0x02aee800
Heap
def new generation total 2432K, used 234K [0x22ab0000, 0x22d50000, 0x25550000)
eden space 2176K, 10% used [0x22ab0000, 0x22aeaba8, 0x22cd0000)
from space 256K, 0% used [0x22cd0000, 0x22cd0000, 0x22d10000)
to space 256K, 0% used [0x22d10000, 0x22d10000, 0x22d50000)
tenured generation total 5504K, used 0K [0x25550000, 0x25ab0000, 0x2aab0000)
the space 5504K, 0% used [0x25550000, 0x25550000, 0x25550200, 0x25ab0000)
compacting perm gen total 12288K, used 123K [0x2aab0000, 0x2b6b0000, 0x2eab0000)
the space 12288K, 1% used [0x2aab0000, 0x2aaced60, 0x2aacee00, 0x2b6b0000)
ro space 10240K, 45% used [0x2eab0000, 0x2ef33958, 0x2ef33a00, 0x2f4b0000)
rw space 12288K, 54% used [0x2f4b0000, 0x2fb37498, 0x2fb37600, 0x300b0000)
Code Cache [0x009e0000, 0x00a78000, 0x029e0000)
total_blobs=133 nmethods=4 adapters=65 free_code_cache=32188Kb largest_free_block=32960768
Compilation events (8 events):
Event: 2.222 Thread 0x02b06000 1 java.lang.String::hashCode (67 bytes)
Event: 2.360 Thread 0x02b06000 nmethod 1 0x00a6fcc8 code [0x00a6fdc0, 0x00a6feb0]
Event: 2.527 Thread 0x02b06000 2 java.lang.String::charAt (33 bytes)
Event: 2.540 Thread 0x02b06000 nmethod 2 0x00a70248 code [0x00a70350, 0x00a7047c]
Event: 2.558 Thread 0x02b06000 3 java.lang.String::indexOf (87 bytes)
Event: 2.558 Thread 0x02b06000 nmethod 3 0x00a70588 code [0x00a70690, 0x00a707cc]
Event: 2.916 Thread 0x02b06000 4 java.lang.String::equals (88 bytes)
Event: 2.917 Thread 0x02b06000 nmethod 4 0x00a70a88 code [0x00a70ba0, 0x00a70d40]
GC Heap History (0 events):
No events
Deoptimization events (0 events):
No events
Internal exceptions (2 events):
Event: 1.344 Thread 0x003c8400 Threw 0x22ab4e48 at C:\jdk7u2_32P\jdk7u4\hotspot\src\share\vm\prims\jn i.cpp:3993
Event: 2.557 Thread 0x003c8400 Threw 0x22ae4700 at C:\jdk7u2_32P\jdk7u4\hotspot\src\share\vm\prims\jv m.cpp:1166
Events (10 events):
Event: 2.862 loading class 0x02ed01e8 done
Event: 2.863 loading class 0x02ed0240
Event: 2.863 loading class 0x02ed0240 done
Event: 2.877 loading class 0x301b2f80
Event: 2.898 loading class 0x300e49d0
Event: 2.900 loading class 0x300e49d0 done
Event: 2.901 loading class 0x301b2f80 done
Event: 2.918 loading class 0x30193498
Event: 2.938 loading class 0x30193498 done
Event: 6.389 Executing VM operation: EnableBiasedLocking
Dynamic libraries:
0x00400000 - 0x00406000 C:\ARQUIV~1\Java\JDK17~1.0_0\bin\javac.exe
0x7c900000 - 0x7c9b3000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c900000 C:\WINDOWS\system32\kernel32.dll
0x6d010000 - 0x6d037000 C:\ARQUIV~1\Java\JDK17~1.0_0\bin\jli.dll
0x77f50000 - 0x77ffb000 C:\WINDOWS\system32\ADVAPI32.dll
0x77db0000 - 0x77e42000 C:\WINDOWS\system32\RPCRT4.dll
0x77f20000 - 0x77f31000 C:\WINDOWS\system32\Secur32.dll
0x773b0000 - 0x774b3000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\COMCTL32.dll
0x77bf0000 - 0x77c48000 C:\WINDOWS\system32\msvcrt.dll
0x77e50000 - 0x77e99000 C:\WINDOWS\system32\GDI32.dll
0x7e360000 - 0x7e3f1000 C:\WINDOWS\system32\USER32.dll
0x77ea0000 - 0x77f16000 C:\WINDOWS\system32\SHLWAPI.dll
0x78aa0000 - 0x78b5e000 C:\ARQUIV~1\Java\JDK17~1.0_0\bin\MSVCR100.dll
0x00820000 - 0x008de000 C:\ARQUIV~1\Java\JDK17~1.0_0\jre\bin\msvcr100.dll
0x6d9c0000 - 0x6dd0a000 C:\ARQUIV~1\Java\JDK17~1.0_0\jre\bin\client\jvm.dl l
0x71a90000 - 0x71a9a000 C:\WINDOWS\system32\WSOCK32.dll
0x71a70000 - 0x71a87000 C:\WINDOWS\system32\WS2_32.dll
0x71a60000 - 0x71a68000 C:\WINDOWS\system32\WS2HELP.dll
0x76b20000 - 0x76b4e000 C:\WINDOWS\system32\WINMM.dll
0x76bd0000 - 0x76bdb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d950000 - 0x6d95c000 C:\ARQUIV~1\Java\JDK17~1.0_0\jre\bin\verify.dll
0x6d400000 - 0x6d420000 C:\ARQUIV~1\Java\JDK17~1.0_0\jre\bin\java.dll
0x6d9a0000 - 0x6d9b3000 C:\ARQUIV~1\Java\JDK17~1.0_0\jre\bin\zip.dll
0x59ea0000 - 0x59f41000 C:\WINDOWS\system32\dbghelp.dll
0x77be0000 - 0x77be8000 C:\WINDOWS\system32\VERSION.dll
VM Arguments:
jvm_args: -Dapplication.home=C:\ARQUIV~1\Java\JDK17~1.0_0 -Xms8m
java_command: com.sun.tools.javac.Main Compartilhamento.java
Launcher Type: SUN_STANDARD
Environment Variables:
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\Sys tem32\Wbem;C:\ARQUIV~1\Java\JDK17~1.0_0\bin
USERNAME=Administrador
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 3
CPU:total 1 (1 cores per cpu, 1 threads per core) family 15 model 2 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2, tsc
Memory: 4k page, physical 523760k(72852k free), swap 1280184k(514408k free)
vm_info: Java HotSpot(TM) Client VM (23.0-b21) for windows-x86 JRE (1.7.0_04-b22), built on May 3 2012 00:03:48 by "java_re" with unknown MS VC++:1600
time: Wed May 30 07:53:11 2012
elapsed time: 10 seconds
Re: install network program
Re: install network program
My only suggestion is to uninstall the JDK and reinstall it.
Re: install network program
great Norm could you tell me what it is this line here, oh, I think that's it, then I say why, but you could tell me oh :::::::::
SmbFile SmbFile file = new ("smb :/ / 10.0.0.2/public/program.exe");
what is this "smb"???....... ▲▲▲
bars to the contrary I know that java is to recognize both the windows and in linux
I'll mention below because I think it is not the jdk, oh my jdk 7u4 is ....... is there any problem with it?
Re: install network program
Quote:
SmbFile SmbFile file = new XXXX("smb :/ / 10.0.0.2/public/program.exe");
That code is missing the classname where I have added the XXXX
The value in the "s looks like a URL with a protocol of smb however it has spaces in it.
Re: install network program
import javax.swing.*;
public class HelloWorldSwing
{
public static void main(String args[])
{
JFrame frame = new JFrame("Hello");
JLabel label = new JLabel("Hello, Swing World");
frame.getContentPane().add(label);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOS E);
frame.pack();
frame.setVisible(true);
}
}
ok no errors found, a window opens windows
a light
thank you so
continues in the third page
Re: install network program
which is great Norm SMB and I put the xxxx? can you be an example of???
Norm fought
Re: install network program
I do not know what SMB is or where it is defined.
Re: install network program
Norm, you would not have another example that's not easier? good at this point I think Mr.'ve got a very simple, just to open an installer on the pc 02 pc 10.0.0.2, 10.0.0.1 for pc
Thanks Norm, thank you very much
Re: install network program
I do not know what an "installer" is.
I also do not know how to execute a program on another PC without there being a special server on that PC that you can send instructions to using some protocol.
Re: install network program
PLEASE SOME SOUL LIVE KNOW HOW TO OPEN A NETWORK PROGRAM?????????