[
https://issues.apache.org/jira/browse/NETBEANS-5949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17470236#comment-17470236
]
pat commented on NETBEANS-5949:
-------------------------------
Here is the platform file that I am using. Hopefully that is the last of the
config files used to remote debug a program.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE platform PUBLIC "-//NetBeans//DTD Remote Java Platform Definition
1.0//EN" "http://www.netbeans.org/dtds/remote-java-platformdefinition-1_0.dtd">
<platform name="Remote Platform Raspberry Pi">
<properties>
<property name="platform.ant.name"
value="Remote_Platform_Raspberry_Pi"/>
<property name="platform.auth.keystore"
value="C:\Users\PATGI\.ssh\id_rsa"/>
<property name="platform.auth.kind" value="KEY"/>
<property name="platform.auth.username" value="pi"/>
<property name="platform.host" value="192.168.1.34"/>
<property name="platform.install.folder" value="/usr"/>
<property name="platform.port" value="22"/>
<property name="platform.work.folder"
value="/home/pi/NetBeansProjects/"/>
</properties>
<sysproperties>
<property name="awt.toolkit" value="sun.awt.X11.XToolkit"/>
<property name="file.encoding" value="UTF-8"/>
<property name="file.separator" value="/"/>
<property name="java.awt.graphicsenv"
value="sun.awt.X11GraphicsEnvironment"/>
<property name="java.awt.printerjob" value="sun.print.PSPrinterJob"/>
<property name="java.class.path"
value="org-netbeans-modules-java-j2seembedded-probe.jar"/>
<property name="java.class.version" value="55.0"/>
<property name="java.home" value="/usr/lib/jvm/java-11-openjdk-armhf"/>
<property name="java.io.tmpdir" value="/tmp"/>
<property name="java.library.path"
value="/usr/java/packages/lib:/usr/lib/arm-linux-gnueabihf/jni:/lib/arm-linux-gnueabihf:/usr/lib/arm-linux-gnueabihf:/usr/lib/jni:/lib:/usr/lib"/>
<property name="java.runtime.name" value="OpenJDK Runtime Environment"/>
<property name="java.runtime.version"
value="11.0.12+7-post-Raspbian-2deb10u1"/>
<property name="java.specification.name" value="Java Platform API
Specification"/>
<property name="java.specification.vendor" value="Oracle Corporation"/>
<property name="java.specification.version" value="11"/>
<property name="java.vendor" value="Raspbian"/>
<property name="java.vendor.url" value="Unknown"/>
<property name="java.vendor.url.bug" value="Unknown"/>
<property name="java.version" value="11.0.12"/>
<property name="java.version.date" value="2021-07-20"/>
<property name="java.vm.info" value="mixed mode"/>
<property name="java.vm.name" value="OpenJDK Server VM"/>
<property name="java.vm.specification.name" value="Java Virtual Machine
Specification"/>
<property name="java.vm.specification.vendor" value="Oracle
Corporation"/>
<property name="java.vm.specification.version" value="11"/>
<property name="java.vm.vendor" value="Raspbian"/>
<property name="java.vm.version"
value="11.0.12+7-post-Raspbian-2deb10u1"/>
<property name="jdk.debug" value="release"/>
<property name="line.separator" value=" "/>
<property name="os.arch" value="arm"/>
<property name="os.name" value="Linux"/>
<property name="os.version" value="5.10.52-v7+"/>
<property name="path.separator" value=":"/>
<property name="sun.arch.abi" value=""/>
<property name="sun.arch.data.model" value="32"/>
<property name="sun.boot.library.path"
value="/usr/lib/jvm/java-11-openjdk-armhf/lib"/>
<property name="sun.cpu.endian" value="little"/>
<property name="sun.cpu.isalist" value=""/>
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
<property name="sun.java.command"
value="org-netbeans-modules-java-j2seembedded-probe.jar platform.properties"/>
<property name="sun.java.launcher" value="SUN_STANDARD"/>
<property name="sun.jnu.encoding" value="UTF-8"/>
<property name="sun.management.compiler" value="HotSpot Tiered
Compilers"/>
<property name="sun.os.patch.level" value="unknown"/>
<property name="user.country" value="GB"/>
<property name="user.dir" value="/home/pi/NetBeansProjects"/>
<property name="user.home" value="/home/pi"/>
<property name="user.language" value="en"/>
<property name="user.name" value="pi"/>
<property name="user.timezone" value=""/>
</sysproperties>
</platform>
> remote debugger does not work
> ------------------------------
>
> Key: NETBEANS-5949
> URL: https://issues.apache.org/jira/browse/NETBEANS-5949
> Project: NetBeans
> Issue Type: Bug
> Components: debugger - Java, projects - Ant
> Affects Versions: 12.4
> Environment: Host is Windows 10, Netbeans 12.4
> Remote Host is raspberry pi with java 11.0.12.
> Reporter: pat
> Priority: Major
>
> Create a java application project.
> Add this code to main and fix the imports
> public static void main(String[] args) {
> try {
> InetAddress id = InetAddress.getLocalHost();
> System.out.println(id.getHostName());
> System.out.println("java version is " +
> System.getProperty("java.version"));
> System.out.println("VM is " +
>
> ManagementFactory.getRuntimeMXBean().getVmVersion());
> } catch (UnknownHostException ex) {
> Logger.getLogger(HelloWorld.class.getName()).log(Level.SEVERE,
> null, ex);
> }
> }
> Run natively to verify you got it right.
> Follow the instructions here to create a remote java standard edition
> platform targeting a different Linux computer. My computer is a raspberry
> pi with java 11 installed, Oracle Java SE 8 Embedded is no longer available
> for most people but java 11 works fine. (The bug is independent of java
> version on the target).
> https://netbeans.apache.org/kb/docs/java/javase-embedded.html?print=yes
> Select the remote platform you created and run the program. The output
> should show that it ran on the remote host.
> Now debug the program. I get the following error.
> ant -f C:\\Users\\PATGI\\OneDrive\\Documents\\NetBeansProjects\\HelloWorld
> -Dnb.internal.action.name=debug -Dremote.platform.passphrase=*****
> -Dremote.platform.rp.target=linuxarm-15
> -Dremote.platform.rp.filename=linuxarm -Ddebug.class=helloworld.HelloWorld
> -Dremote.platform.java.spec.ver=11 debug-remote
> init:
> deps-jar:
> Updating property file:
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build\built-jar.properties
> compile:
> Copying 1 file to
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\build
> Nothing to copy.
> To run this application from the command line without Ant, try:
> java -jar
> "C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\dist\HelloWorld.jar"
> deploy:
> jar:
> C:\Users\PATGI\OneDrive\Documents\NetBeansProjects\HelloWorld\nbproject\remote-platform-impl.xml:143:
> Unable to create javax script engine for javascript
> BUILD FAILED (total time: 0 seconds)
> I was able to for the debugger to work by manually starting the debugger on
> the remote host with something like
> /usr/bin/java
> -agentlib:jdwp=transport=dt_socket,address=*:8000,suspend=y,server=y
> -Dfile.encoding=UTF-8 -jar
> /home/pi/NetBeansProjects/HelloWorld/dist/HelloWorld.jar
> And then connect the debugger to a process already running on the remote host
> at port 8000.
> I traced this back to javascript not being supported in this installation of
> Ant. I also think several of the configuration variables for remote
> debugging are not setup. e.g. jdpa.address and jdpa.port but I could easily
> be wrong about this.
> The good news is it can be made to work and it is very nice when it is
> working.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists