Dear visitor, welcome to Jabaco - Community. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
I don't know what you mean. On Linux it works the same like on Windows.Can you give me a sample working code for linux
denizunlu have posted atQuoted
for opening files
Jabaco Source |
|
1 2 3 4 5 6 7 |
Public Sub Command1_Click() Dim mvFH As VBFileHandler Dim myTestFile As String mvFH=Open("/etc/hosts", vb#VBFileMode.Input) RichTextBox1.Text = mvFH.readAll mvFH.close End Sub |
Quoted
or executing commands in the terminal like "ls"?
Jabaco Source |
|
1 2 3 |
Public Sub Command1_Click() Shell "/usr/bin/xman" End Sub |
Jabaco Source |
|
1 |
Shell ("java -jar C:\Programme\Java\jdk1.7.0_07\demo\jfc\SwingSet2\SwingSet2.jar")
|
What does the .sh file do?how can I open a .sh file?
Jabaco Source |
|
1 |
Shell ("/bin/bash /home/panda/myapp/start.sh") |
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Dim p As Process p = Shell ("/bin/bash /home/panda/myapp/start.sh") Dim input As java#io#InputStream input = p.getInputStream Dim data As Integer = input.read While data <> -1 Dim cdata As java#lang#Character cdata = Cast(data, java#lang#Character) System.out.print(cdata) data = input.read Wend input.close p.destroy |
That code should launch a terminal window and execute my python script. Also my script works when typed manually in a terminal window.Quoted
#!/bin/sh
python start.py
Typing:Quoted
Shell "/usr/bin/x-terminal-emulator"
This post has been edited 3 times, last edit by "pandapipino" (Dec 3rd 2012, 3:19pm)
my .sh file has this command inside:
Quoted
#!/bin/sh
python start.py
Jabaco Source |
|
1 |
Shell ("python start.py") |
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Dim p As java#lang#Process p = Shell ("python start.py") Dim input As java#io#InputStream input = p.getInputStream Dim data As Integer = input.read While data <> -1 Dim cdata As java#lang#Character cdata = Cast(data, java#lang#Character) System.out.print(cdata) data = input.read Wend input.close p.destroy |
Jabaco Source |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Dim p As java#lang#Process Dim s as String p = Shell ("python start.py") Dim input As java#io#InputStream input = p.getInputStream Dim data As Integer = input.read While data <> -1 Dim cdata As java#lang#Character cdata = Cast(data, java#lang#Character) s = s + cdata.toString data = input.read Wend input.close MsgBox s p.destroy |
This post has been edited 2 times, last edit by "theuserbl" (Dec 3rd 2012, 4:26pm)
This post has been edited 1 times, last edit by "theuserbl" (Dec 4th 2012, 8:06am)
Thanks man!!! this solved my problem. TYTYTY !!!!Quoted
java -jar myjava.jar